From 773fe012944f639f6aabb2b2b523b043f8d2f519 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 20 Apr 2024 00:24:16 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2537) --- .../v1/accesscontextmanager-api.json | 8 +- .../v1/accesscontextmanager-gen.go | 24 +- alloydb/v1/alloydb-api.json | 98 +- alloydb/v1/alloydb-gen.go | 160 + alloydb/v1alpha/alloydb-api.json | 50 +- alloydb/v1alpha/alloydb-gen.go | 115 +- alloydb/v1beta/alloydb-api.json | 50 +- alloydb/v1beta/alloydb-gen.go | 115 +- backupdr/v1/backupdr-api.json | 10 +- backupdr/v1/backupdr-gen.go | 8 +- batch/v1/batch-api.json | 4 +- batch/v1/batch-gen.go | 6 +- beyondcorp/v1alpha/beyondcorp-api.json | 36 +- beyondcorp/v1alpha/beyondcorp-gen.go | 44 +- chat/v1/chat-api.json | 4 +- chat/v1/chat-gen.go | 2 +- config/v1/config-api.json | 2690 ++++++ config/v1/config-gen.go | 7979 +++++++++++++++++ connectors/v1/connectors-api.json | 151 +- connectors/v1/connectors-gen.go | 331 +- dataplex/v1/dataplex-api.json | 40 +- dataplex/v1/dataplex-gen.go | 31 +- datastream/v1/datastream-api.json | 22 +- datastream/v1/datastream-gen.go | 26 +- gkebackup/v1/gkebackup-api.json | 4 +- gkebackup/v1/gkebackup-gen.go | 5 +- gkehub/v1/gkehub-api.json | 10 +- gkehub/v1/gkehub-gen.go | 6 +- gkehub/v1alpha/gkehub-api.json | 10 +- gkehub/v1alpha/gkehub-gen.go | 6 +- gkehub/v1beta/gkehub-api.json | 10 +- gkehub/v1beta/gkehub-gen.go | 6 +- lifesciences/v2beta/lifesciences-api.json | 4 +- lifesciences/v2beta/lifesciences-gen.go | 2 +- looker/v1/looker-api.json | 4 +- looker/v1/looker-gen.go | 2 +- metastore/v1/metastore-api.json | 4 +- metastore/v1/metastore-gen.go | 4 +- metastore/v1alpha/metastore-api.json | 58 +- metastore/v1alpha/metastore-gen.go | 140 +- .../v1/networkmanagement-api.json | 4 +- networkmanagement/v1/networkmanagement-gen.go | 4 +- .../v1beta1/networkmanagement-api.json | 312 +- .../v1beta1/networkmanagement-gen.go | 1011 ++- networkservices/v1/networkservices-api.json | 8 +- networkservices/v1/networkservices-gen.go | 30 +- .../v1beta1/networkservices-api.json | 8 +- .../v1beta1/networkservices-gen.go | 30 +- privateca/v1/privateca-api.json | 20 +- privateca/v1/privateca-gen.go | 38 +- redis/v1/redis-api.json | 6 +- redis/v1/redis-gen.go | 4 + redis/v1beta1/redis-api.json | 6 +- redis/v1beta1/redis-gen.go | 4 + servicecontrol/v1/servicecontrol-api.json | 20 +- servicecontrol/v1/servicecontrol-gen.go | 15 + servicecontrol/v2/servicecontrol-api.json | 20 +- servicecontrol/v2/servicecontrol-gen.go | 15 + sts/v1/sts-api.json | 4 +- sts/v1/sts-gen.go | 2 +- tpu/v2alpha1/tpu-api.json | 25 +- tpu/v2alpha1/tpu-gen.go | 12 + vmmigration/v1/vmmigration-api.json | 4 +- vmmigration/v1/vmmigration-gen.go | 3 +- vmmigration/v1alpha1/vmmigration-api.json | 4 +- vmmigration/v1alpha1/vmmigration-gen.go | 3 +- vmwareengine/v1/vmwareengine-api.json | 12 +- vmwareengine/v1/vmwareengine-gen.go | 3 + 68 files changed, 13279 insertions(+), 627 deletions(-) create mode 100644 config/v1/config-api.json create mode 100644 config/v1/config-gen.go diff --git a/accesscontextmanager/v1/accesscontextmanager-api.json b/accesscontextmanager/v1/accesscontextmanager-api.json index 1d3dff98c5e..939039236c1 100644 --- a/accesscontextmanager/v1/accesscontextmanager-api.json +++ b/accesscontextmanager/v1/accesscontextmanager-api.json @@ -1290,7 +1290,7 @@ } } }, - "revision": "20240221", + "revision": "20240417", "rootUrl": "https://accesscontextmanager.googleapis.com/", "schemas": { "AccessContextManagerOperationMetadata": { @@ -1689,7 +1689,7 @@ "id": "EgressFrom", "properties": { "identities": { - "description": "A list of identities that are allowed access through this [EgressPolicy], in the format of `user:{email_id}` or `serviceAccount:{email_id}`.", + "description": "A list of identities that are allowed access through [EgressPolicy]. Identities can be an individual user, service account, Google group, or third-party identity. The `v1` identities that have the prefix `user`, `group`, `serviceAccount`, `principal`, and `principalSet` in https://cloud.google.com/iam/docs/principal-identifiers#v1 are supported.", "items": { "type": "string" }, @@ -1766,7 +1766,7 @@ "id": "EgressTo", "properties": { "externalResources": { - "description": "A list of external resources that are allowed to be accessed. Only AWS and Azure resources are supported. For Amazon S3, the supported format is s3://BUCKET_NAME. For Azure Storage, the supported format is azure://myaccount.blob.core.windows.net/CONTAINER_NAME. A request matches if it contains an external resource in this list (Example: s3://bucket/path). Currently '*' is not allowed.", + "description": "A list of external resources that are allowed to be accessed. Only AWS and Azure resources are supported. For Amazon S3, the supported formats are s3://BUCKET_NAME, s3a://BUCKET_NAME, and s3n://BUCKET_NAME. For Azure Storage, the supported format is azure://myaccount.blob.core.windows.net/CONTAINER_NAME. A request matches if it contains an external resource in this list (Example: s3://bucket/path). Currently '*' is not allowed.", "items": { "type": "string" }, @@ -1881,7 +1881,7 @@ "id": "IngressFrom", "properties": { "identities": { - "description": "A list of identities that are allowed access through this ingress policy, in the format of `user:{email_id}` or `serviceAccount:{email_id}`.", + "description": "A list of identities that are allowed access through [IngressPolicy]. Identities can be an individual user, service account, Google group, or third-party identity. The `v1` identities that have the prefix `user`, `group`, `serviceAccount`, `principal`, and `principalSet` in https://cloud.google.com/iam/docs/principal-identifiers#v1 are supported.", "items": { "type": "string" }, diff --git a/accesscontextmanager/v1/accesscontextmanager-gen.go b/accesscontextmanager/v1/accesscontextmanager-gen.go index d4f43d664b5..0f101901f7f 100644 --- a/accesscontextmanager/v1/accesscontextmanager-gen.go +++ b/accesscontextmanager/v1/accesscontextmanager-gen.go @@ -1006,9 +1006,13 @@ func (s *DevicePolicy) MarshalJSON() ([]byte, error) { // an IngressPolicy which allows access in order for this request to // succeed. type EgressFrom struct { - // Identities: A list of identities that are allowed access through this - // [EgressPolicy], in the format of `user:{email_id}` or - // `serviceAccount:{email_id}`. + // Identities: A list of identities that are allowed access through + // [EgressPolicy]. Identities can be an individual user, service + // account, Google group, or third-party identity. The `v1` identities + // that have the prefix `user`, `group`, `serviceAccount`, `principal`, + // and `principalSet` in + // https://cloud.google.com/iam/docs/principal-identifiers#v1 are + // supported. Identities []string `json:"identities,omitempty"` // IdentityType: Specifies the type of identities that are allowed @@ -1164,8 +1168,8 @@ func (s *EgressSource) MarshalJSON() ([]byte, error) { type EgressTo struct { // ExternalResources: A list of external resources that are allowed to // be accessed. Only AWS and Azure resources are supported. For Amazon - // S3, the supported format is s3://BUCKET_NAME. For Azure Storage, the - // supported format is + // S3, the supported formats are s3://BUCKET_NAME, s3a://BUCKET_NAME, + // and s3n://BUCKET_NAME. For Azure Storage, the supported format is // azure://myaccount.blob.core.windows.net/CONTAINER_NAME. A request // matches if it contains an external resource in this list (Example: // s3://bucket/path). Currently '*' is not allowed. @@ -1419,9 +1423,13 @@ func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { // source of the request. The request must satisfy what is defined in // `sources` AND identity related fields in order to match. type IngressFrom struct { - // Identities: A list of identities that are allowed access through this - // ingress policy, in the format of `user:{email_id}` or - // `serviceAccount:{email_id}`. + // Identities: A list of identities that are allowed access through + // [IngressPolicy]. Identities can be an individual user, service + // account, Google group, or third-party identity. The `v1` identities + // that have the prefix `user`, `group`, `serviceAccount`, `principal`, + // and `principalSet` in + // https://cloud.google.com/iam/docs/principal-identifiers#v1 are + // supported. Identities []string `json:"identities,omitempty"` // IdentityType: Specifies the type of identities that are allowed diff --git a/alloydb/v1/alloydb-api.json b/alloydb/v1/alloydb-api.json index 536f43ee930..5d653e8dcfe 100644 --- a/alloydb/v1/alloydb-api.json +++ b/alloydb/v1/alloydb-api.json @@ -1461,7 +1461,7 @@ } } }, - "revision": "20240315", + "revision": "20240410", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -1856,6 +1856,10 @@ "description": "Labels as key value pairs", "type": "object" }, + "maintenanceUpdatePolicy": { + "$ref": "MaintenanceUpdatePolicy", + "description": "Optional. The maintenance update policy determines when to allow or deny updates." + }, "migrationSource": { "$ref": "MigrationSource", "description": "Output only. Cluster created via DMS migration.", @@ -1879,6 +1883,10 @@ "description": "Output only. Cross Region replication config specific to PRIMARY cluster.", "readOnly": true }, + "pscConfig": { + "$ref": "PscConfig", + "description": "Optional. The configuration for Private Service Connect (PSC) for the cluster." + }, "reconciling": { "description": "Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set to true if the current state of Cluster does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.", "readOnly": true, @@ -2332,6 +2340,10 @@ "readOnly": true, "type": "array" }, + "pscInstanceConfig": { + "$ref": "PscInstanceConfig", + "description": "Optional. The configuration for Private Service Connect (PSC) for the instance." + }, "publicIpAddress": { "description": "Output only. The public IP addresses for the Instance. This is available ONLY when enable_public_ip is set. This is the connection endpoint for an end-user application.", "readOnly": true, @@ -2584,6 +2596,55 @@ }, "type": "object" }, + "MaintenanceUpdatePolicy": { + "description": "MaintenanceUpdatePolicy defines the policy for system updates.", + "id": "MaintenanceUpdatePolicy", + "properties": { + "maintenanceWindows": { + "description": "Preferred windows to perform maintenance. Currently limited to 1.", + "items": { + "$ref": "MaintenanceWindow" + }, + "type": "array" + } + }, + "type": "object" + }, + "MaintenanceWindow": { + "description": "MaintenanceWindow specifies a preferred day and time for maintenance.", + "id": "MaintenanceWindow", + "properties": { + "day": { + "description": "Preferred day of the week for maintenance, e.g. MONDAY, TUESDAY, etc.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "startTime": { + "$ref": "GoogleTypeTimeOfDay", + "description": "Preferred time to start the maintenance operation on the specified day. Maintenance will start within 1 hour of this time." + } + }, + "type": "object" + }, "MigrationSource": { "description": "Subset of the source instance configuration that is available when reading the cluster resource.", "id": "MigrationSource", @@ -2765,6 +2826,41 @@ }, "type": "object" }, + "PscConfig": { + "description": "PscConfig contains PSC related configuration at a cluster level.", + "id": "PscConfig", + "properties": { + "pscEnabled": { + "description": "Optional. Create an instance that allows connections from Private Service Connect endpoints to the instance.", + "type": "boolean" + } + }, + "type": "object" + }, + "PscInstanceConfig": { + "description": "PscInstanceConfig contains PSC related configuration at an instance level.", + "id": "PscInstanceConfig", + "properties": { + "allowedConsumerProjects": { + "description": "Optional. List of consumer projects that are allowed to create PSC endpoints to service-attachments to this instance.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pscDnsName": { + "description": "Output only. The DNS name of the instance for PSC connectivity. Name convention: ...alloydb-psc.goog", + "readOnly": true, + "type": "string" + }, + "serviceAttachmentLink": { + "description": "Output only. The service attachment created when Private Service Connect (PSC) is enabled for the instance. The name of the resource will be in the format of `projects//regions//serviceAttachments/`", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "QuantityBasedExpiry": { "description": "A backup's position in a quantity-based retention queue, of backups with the same source cluster and type, with length, retention, specified by the backup's retention policy. Once the position is greater than the retention, the backup is eligible to be garbage collected. Example: 5 backups from the same source cluster and type with a quantity-based retention of 3 and denoted by backup_id (position, retention). Safe: backup_5 (1, 3), backup_4, (2, 3), backup_3 (3, 3). Awaiting garbage collection: backup_2 (4, 3), backup_1 (5, 3)", "id": "QuantityBasedExpiry", diff --git a/alloydb/v1/alloydb-gen.go b/alloydb/v1/alloydb-gen.go index 79ee408f6c1..1c0c96ce6b8 100644 --- a/alloydb/v1/alloydb-gen.go +++ b/alloydb/v1/alloydb-gen.go @@ -688,6 +688,10 @@ type Cluster struct { // Labels: Labels as key value pairs Labels map[string]string `json:"labels,omitempty"` + // MaintenanceUpdatePolicy: Optional. The maintenance update policy + // determines when to allow or deny updates. + MaintenanceUpdatePolicy *MaintenanceUpdatePolicy `json:"maintenanceUpdatePolicy,omitempty"` + // MigrationSource: Output only. Cluster created via DMS migration. MigrationSource *MigrationSource `json:"migrationSource,omitempty"` @@ -713,6 +717,10 @@ type Cluster struct { // to PRIMARY cluster. PrimaryConfig *PrimaryConfig `json:"primaryConfig,omitempty"` + // PscConfig: Optional. The configuration for Private Service Connect + // (PSC) for the cluster. + PscConfig *PscConfig `json:"pscConfig,omitempty"` + // Reconciling: Output only. Reconciling // (https://google.aip.dev/128#reconciliation). Set to true if the // current state of Cluster does not match the user's intended state, @@ -1389,6 +1397,10 @@ type Instance struct { // including the standby for a PRIMARY instance. Nodes []*Node `json:"nodes,omitempty"` + // PscInstanceConfig: Optional. The configuration for Private Service + // Connect (PSC) for the instance. + PscInstanceConfig *PscInstanceConfig `json:"pscInstanceConfig,omitempty"` + // PublicIpAddress: Output only. The public IP addresses for the // Instance. This is available ONLY when enable_public_ip is set. This // is the connection endpoint for an end-user application. @@ -1797,6 +1809,81 @@ func (s *MachineConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MaintenanceUpdatePolicy: MaintenanceUpdatePolicy defines the policy +// for system updates. +type MaintenanceUpdatePolicy struct { + // MaintenanceWindows: Preferred windows to perform maintenance. + // Currently limited to 1. + MaintenanceWindows []*MaintenanceWindow `json:"maintenanceWindows,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaintenanceWindows") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MaintenanceWindows") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *MaintenanceUpdatePolicy) MarshalJSON() ([]byte, error) { + type NoMethod MaintenanceUpdatePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MaintenanceWindow: MaintenanceWindow specifies a preferred day and +// time for maintenance. +type MaintenanceWindow struct { + // Day: Preferred day of the week for maintenance, e.g. MONDAY, TUESDAY, + // etc. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + Day string `json:"day,omitempty"` + + // StartTime: Preferred time to start the maintenance operation on the + // specified day. Maintenance will start within 1 hour of this time. + StartTime *GoogleTypeTimeOfDay `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) { + type NoMethod MaintenanceWindow + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MigrationSource: Subset of the source instance configuration that is // available when reading the cluster resource. type MigrationSource struct { @@ -2120,6 +2207,79 @@ func (s *PromoteClusterRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PscConfig: PscConfig contains PSC related configuration at a cluster +// level. +type PscConfig struct { + // PscEnabled: Optional. Create an instance that allows connections from + // Private Service Connect endpoints to the instance. + PscEnabled bool `json:"pscEnabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PscEnabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PscEnabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PscConfig) MarshalJSON() ([]byte, error) { + type NoMethod PscConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PscInstanceConfig: PscInstanceConfig contains PSC related +// configuration at an instance level. +type PscInstanceConfig struct { + // AllowedConsumerProjects: Optional. List of consumer projects that are + // allowed to create PSC endpoints to service-attachments to this + // instance. + AllowedConsumerProjects []string `json:"allowedConsumerProjects,omitempty"` + + // PscDnsName: Output only. The DNS name of the instance for PSC + // connectivity. Name convention: ...alloydb-psc.goog + PscDnsName string `json:"pscDnsName,omitempty"` + + // ServiceAttachmentLink: Output only. The service attachment created + // when Private Service Connect (PSC) is enabled for the instance. The + // name of the resource will be in the format of + // `projects//regions//serviceAttachments/` + ServiceAttachmentLink string `json:"serviceAttachmentLink,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AllowedConsumerProjects") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowedConsumerProjects") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PscInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod PscInstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // QuantityBasedExpiry: A backup's position in a quantity-based // retention queue, of backups with the same source cluster and type, // with length, retention, specified by the backup's retention policy. diff --git a/alloydb/v1alpha/alloydb-api.json b/alloydb/v1alpha/alloydb-api.json index 2761e50eb93..f0904b3d7b3 100644 --- a/alloydb/v1alpha/alloydb-api.json +++ b/alloydb/v1alpha/alloydb-api.json @@ -1461,7 +1461,7 @@ } } }, - "revision": "20240320", + "revision": "20240410", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -2096,25 +2096,6 @@ }, "type": "object" }, - "DenyMaintenancePeriod": { - "description": "DenyMaintenancePeriod definition. Excepting emergencies, maintenance will not be scheduled to start within this deny period. The start_date must be less than the end_date.", - "id": "DenyMaintenancePeriod", - "properties": { - "endDate": { - "$ref": "GoogleTypeDate", - "description": "Deny period end date. This can be: * A full date, with non-zero year, month and day values. * A month and day value, with a zero year for recurring. Date matching this period will have to be before the end." - }, - "startDate": { - "$ref": "GoogleTypeDate", - "description": "Deny period start date. This can be: * A full date, with non-zero year, month and day values. * A month and day value, with a zero year for recurring. Date matching this period will have to be the same or after the start." - }, - "time": { - "$ref": "GoogleTypeTimeOfDay", - "description": "Time in UTC when the deny period starts on start_date and ends on end_date. This can be: * Full time. * All zeros for 00:00:00 UTC" - } - }, - "type": "object" - }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -2253,28 +2234,6 @@ }, "type": "object" }, - "GoogleTypeDate": { - "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", - "id": "GoogleTypeDate", - "properties": { - "day": { - "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", - "format": "int32", - "type": "integer" - }, - "month": { - "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", - "format": "int32", - "type": "integer" - }, - "year": { - "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "GoogleTypeTimeOfDay": { "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", "id": "GoogleTypeTimeOfDay", @@ -2728,13 +2687,6 @@ "description": "MaintenanceUpdatePolicy defines the policy for system updates.", "id": "MaintenanceUpdatePolicy", "properties": { - "denyMaintenancePeriods": { - "description": "Periods to deny maintenance. Currently limited to 1.", - "items": { - "$ref": "DenyMaintenancePeriod" - }, - "type": "array" - }, "maintenanceWindows": { "description": "Preferred windows to perform maintenance. Currently limited to 1.", "items": { diff --git a/alloydb/v1alpha/alloydb-gen.go b/alloydb/v1alpha/alloydb-gen.go index 8c045d83ea2..b78ec730e9e 100644 --- a/alloydb/v1alpha/alloydb-gen.go +++ b/alloydb/v1alpha/alloydb-gen.go @@ -1001,49 +1001,6 @@ func (s *ContinuousBackupSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DenyMaintenancePeriod: DenyMaintenancePeriod definition. Excepting -// emergencies, maintenance will not be scheduled to start within this -// deny period. The start_date must be less than the end_date. -type DenyMaintenancePeriod struct { - // EndDate: Deny period end date. This can be: * A full date, with - // non-zero year, month and day values. * A month and day value, with a - // zero year for recurring. Date matching this period will have to be - // before the end. - EndDate *GoogleTypeDate `json:"endDate,omitempty"` - - // StartDate: Deny period start date. This can be: * A full date, with - // non-zero year, month and day values. * A month and day value, with a - // zero year for recurring. Date matching this period will have to be - // the same or after the start. - StartDate *GoogleTypeDate `json:"startDate,omitempty"` - - // Time: Time in UTC when the deny period starts on start_date and ends - // on end_date. This can be: * Full time. * All zeros for 00:00:00 UTC - Time *GoogleTypeTimeOfDay `json:"time,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EndDate") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EndDate") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DenyMaintenancePeriod) MarshalJSON() ([]byte, error) { - type NoMethod DenyMaintenancePeriod - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -1333,53 +1290,6 @@ func (s *GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeDate: Represents a whole or partial calendar date, such as -// a birthday. The time of day and time zone are either specified -// elsewhere or are insignificant. The date is relative to the Gregorian -// Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values. * A month and day, with a -// zero year (for example, an anniversary). * A year on its own, with a -// zero month and a zero day. * A year and month, with a zero day (for -// example, a credit card expiration date). Related types: * -// google.type.TimeOfDay * google.type.DateTime * -// google.protobuf.Timestamp -type GoogleTypeDate struct { - // Day: Day of a month. Must be from 1 to 31 and valid for the year and - // month, or 0 to specify a year by itself or a year and month where the - // day isn't significant. - Day int64 `json:"day,omitempty"` - - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year - // without a month and day. - Month int64 `json:"month,omitempty"` - - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a - // date without a year. - Year int64 `json:"year,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Day") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Day") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleTypeTimeOfDay: Represents a time of day. The date and time zone // are either not significant or are specified elsewhere. An API may // choose to allow leap seconds. Related types are google.type.Date and @@ -2045,27 +1955,22 @@ func (s *MaintenanceSchedule) MarshalJSON() ([]byte, error) { // MaintenanceUpdatePolicy: MaintenanceUpdatePolicy defines the policy // for system updates. type MaintenanceUpdatePolicy struct { - // DenyMaintenancePeriods: Periods to deny maintenance. Currently - // limited to 1. - DenyMaintenancePeriods []*DenyMaintenancePeriod `json:"denyMaintenancePeriods,omitempty"` - // MaintenanceWindows: Preferred windows to perform maintenance. // Currently limited to 1. MaintenanceWindows []*MaintenanceWindow `json:"maintenanceWindows,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "DenyMaintenancePeriods") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "MaintenanceWindows") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DenyMaintenancePeriods") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "MaintenanceWindows") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. diff --git a/alloydb/v1beta/alloydb-api.json b/alloydb/v1beta/alloydb-api.json index abfc34adfae..0a87ecea22f 100644 --- a/alloydb/v1beta/alloydb-api.json +++ b/alloydb/v1beta/alloydb-api.json @@ -1458,7 +1458,7 @@ } } }, - "revision": "20240320", + "revision": "20240410", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -2077,25 +2077,6 @@ }, "type": "object" }, - "DenyMaintenancePeriod": { - "description": "DenyMaintenancePeriod definition. Excepting emergencies, maintenance will not be scheduled to start within this deny period. The start_date must be less than the end_date.", - "id": "DenyMaintenancePeriod", - "properties": { - "endDate": { - "$ref": "GoogleTypeDate", - "description": "Deny period end date. This can be: * A full date, with non-zero year, month and day values. * A month and day value, with a zero year for recurring. Date matching this period will have to be before the end." - }, - "startDate": { - "$ref": "GoogleTypeDate", - "description": "Deny period start date. This can be: * A full date, with non-zero year, month and day values. * A month and day value, with a zero year for recurring. Date matching this period will have to be the same or after the start." - }, - "time": { - "$ref": "GoogleTypeTimeOfDay", - "description": "Time in UTC when the deny period starts on start_date and ends on end_date. This can be: * Full time. * All zeros for 00:00:00 UTC" - } - }, - "type": "object" - }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -2234,28 +2215,6 @@ }, "type": "object" }, - "GoogleTypeDate": { - "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", - "id": "GoogleTypeDate", - "properties": { - "day": { - "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", - "format": "int32", - "type": "integer" - }, - "month": { - "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", - "format": "int32", - "type": "integer" - }, - "year": { - "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "GoogleTypeTimeOfDay": { "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", "id": "GoogleTypeTimeOfDay", @@ -2704,13 +2663,6 @@ "description": "MaintenanceUpdatePolicy defines the policy for system updates.", "id": "MaintenanceUpdatePolicy", "properties": { - "denyMaintenancePeriods": { - "description": "Periods to deny maintenance. Currently limited to 1.", - "items": { - "$ref": "DenyMaintenancePeriod" - }, - "type": "array" - }, "maintenanceWindows": { "description": "Preferred windows to perform maintenance. Currently limited to 1.", "items": { diff --git a/alloydb/v1beta/alloydb-gen.go b/alloydb/v1beta/alloydb-gen.go index 5c79a40a179..2c96e93ceb0 100644 --- a/alloydb/v1beta/alloydb-gen.go +++ b/alloydb/v1beta/alloydb-gen.go @@ -990,49 +990,6 @@ func (s *ContinuousBackupSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DenyMaintenancePeriod: DenyMaintenancePeriod definition. Excepting -// emergencies, maintenance will not be scheduled to start within this -// deny period. The start_date must be less than the end_date. -type DenyMaintenancePeriod struct { - // EndDate: Deny period end date. This can be: * A full date, with - // non-zero year, month and day values. * A month and day value, with a - // zero year for recurring. Date matching this period will have to be - // before the end. - EndDate *GoogleTypeDate `json:"endDate,omitempty"` - - // StartDate: Deny period start date. This can be: * A full date, with - // non-zero year, month and day values. * A month and day value, with a - // zero year for recurring. Date matching this period will have to be - // the same or after the start. - StartDate *GoogleTypeDate `json:"startDate,omitempty"` - - // Time: Time in UTC when the deny period starts on start_date and ends - // on end_date. This can be: * Full time. * All zeros for 00:00:00 UTC - Time *GoogleTypeTimeOfDay `json:"time,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EndDate") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EndDate") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DenyMaintenancePeriod) MarshalJSON() ([]byte, error) { - type NoMethod DenyMaintenancePeriod - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -1322,53 +1279,6 @@ func (s *GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeDate: Represents a whole or partial calendar date, such as -// a birthday. The time of day and time zone are either specified -// elsewhere or are insignificant. The date is relative to the Gregorian -// Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values. * A month and day, with a -// zero year (for example, an anniversary). * A year on its own, with a -// zero month and a zero day. * A year and month, with a zero day (for -// example, a credit card expiration date). Related types: * -// google.type.TimeOfDay * google.type.DateTime * -// google.protobuf.Timestamp -type GoogleTypeDate struct { - // Day: Day of a month. Must be from 1 to 31 and valid for the year and - // month, or 0 to specify a year by itself or a year and month where the - // day isn't significant. - Day int64 `json:"day,omitempty"` - - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year - // without a month and day. - Month int64 `json:"month,omitempty"` - - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a - // date without a year. - Year int64 `json:"year,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Day") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Day") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleTypeTimeOfDay: Represents a time of day. The date and time zone // are either not significant or are specified elsewhere. An API may // choose to allow leap seconds. Related types are google.type.Date and @@ -2031,27 +1941,22 @@ func (s *MaintenanceSchedule) MarshalJSON() ([]byte, error) { // MaintenanceUpdatePolicy: MaintenanceUpdatePolicy defines the policy // for system updates. type MaintenanceUpdatePolicy struct { - // DenyMaintenancePeriods: Periods to deny maintenance. Currently - // limited to 1. - DenyMaintenancePeriods []*DenyMaintenancePeriod `json:"denyMaintenancePeriods,omitempty"` - // MaintenanceWindows: Preferred windows to perform maintenance. // Currently limited to 1. MaintenanceWindows []*MaintenanceWindow `json:"maintenanceWindows,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "DenyMaintenancePeriods") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "MaintenanceWindows") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DenyMaintenancePeriods") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "MaintenanceWindows") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. diff --git a/backupdr/v1/backupdr-api.json b/backupdr/v1/backupdr-api.json index 63eaeea91e1..8130e497c52 100644 --- a/backupdr/v1/backupdr-api.json +++ b/backupdr/v1/backupdr-api.json @@ -567,7 +567,7 @@ } } }, - "revision": "20240221", + "revision": "20240410", "rootUrl": "https://backupdr.googleapis.com/", "schemas": { "AuditConfig": { @@ -774,6 +774,14 @@ "description": "ManagementServer describes a single BackupDR ManagementServer instance.", "id": "ManagementServer", "properties": { + "baProxyUri": { + "description": "Output only. The hostname or ip address of the exposed AGM endpoints, used by BAs to connect to BA proxy.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "createTime": { "description": "Output only. The time when the instance was created.", "format": "google-datetime", diff --git a/backupdr/v1/backupdr-gen.go b/backupdr/v1/backupdr-gen.go index 484c4193997..276e073f93e 100644 --- a/backupdr/v1/backupdr-gen.go +++ b/backupdr/v1/backupdr-gen.go @@ -669,6 +669,10 @@ func (s *Location) MarshalJSON() ([]byte, error) { // ManagementServer: ManagementServer describes a single BackupDR // ManagementServer instance. type ManagementServer struct { + // BaProxyUri: Output only. The hostname or ip address of the exposed + // AGM endpoints, used by BAs to connect to BA proxy. + BaProxyUri []string `json:"baProxyUri,omitempty"` + // CreateTime: Output only. The time when the instance was created. CreateTime string `json:"createTime,omitempty"` @@ -746,7 +750,7 @@ type ManagementServer struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "BaProxyUri") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -754,7 +758,7 @@ type ManagementServer struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "BaProxyUri") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as diff --git a/batch/v1/batch-api.json b/batch/v1/batch-api.json index d4367872b62..7531db640bc 100644 --- a/batch/v1/batch-api.json +++ b/batch/v1/batch-api.json @@ -561,7 +561,7 @@ } } }, - "revision": "20240324", + "revision": "20240411", "rootUrl": "https://batch.googleapis.com/", "schemas": { "Accelerator": { @@ -1597,7 +1597,7 @@ "id": "LocationPolicy", "properties": { "allowedLocations": { - "description": "A list of allowed location names represented by internal URLs. Each location can be a region or a zone. Only one region or multiple zones in one region is supported now. For example, [\"regions/us-central1\"] allow VMs in any zones in region us-central1. [\"zones/us-central1-a\", \"zones/us-central1-c\"] only allow VMs in zones us-central1-a and us-central1-c. All locations end up in different regions would cause errors. For example, [\"regions/us-central1\", \"zones/us-central1-a\", \"zones/us-central1-b\", \"zones/us-west1-a\"] contains 2 regions \"us-central1\" and \"us-west1\". An error is expected in this case.", + "description": "A list of allowed location names represented by internal URLs. Each location can be a region or a zone. Only one region or multiple zones in one region is supported now. For example, [\"regions/us-central1\"] allow VMs in any zones in region us-central1. [\"zones/us-central1-a\", \"zones/us-central1-c\"] only allow VMs in zones us-central1-a and us-central1-c. Mixing locations from different regions would cause errors. For example, [\"regions/us-central1\", \"zones/us-central1-a\", \"zones/us-central1-b\", \"zones/us-west1-a\"] contains locations from two distinct regions: us-central1 and us-west1. This combination will trigger an error.", "items": { "type": "string" }, diff --git a/batch/v1/batch-gen.go b/batch/v1/batch-gen.go index d667ec1d411..66ad75c778f 100644 --- a/batch/v1/batch-gen.go +++ b/batch/v1/batch-gen.go @@ -1963,11 +1963,11 @@ type LocationPolicy struct { // region or multiple zones in one region is supported now. For example, // ["regions/us-central1"] allow VMs in any zones in region us-central1. // ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs in - // zones us-central1-a and us-central1-c. All locations end up in + // zones us-central1-a and us-central1-c. Mixing locations from // different regions would cause errors. For example, // ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - // "zones/us-west1-a"] contains 2 regions "us-central1" and "us-west1". - // An error is expected in this case. + // "zones/us-west1-a"] contains locations from two distinct regions: + // us-central1 and us-west1. This combination will trigger an error. AllowedLocations []string `json:"allowedLocations,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowedLocations") to diff --git a/beyondcorp/v1alpha/beyondcorp-api.json b/beyondcorp/v1alpha/beyondcorp-api.json index fa02f766b72..c06a7880bdf 100644 --- a/beyondcorp/v1alpha/beyondcorp-api.json +++ b/beyondcorp/v1alpha/beyondcorp-api.json @@ -3903,7 +3903,7 @@ } } }, - "revision": "20240320", + "revision": "20240410", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -6027,25 +6027,6 @@ }, "type": "object" }, - "GoogleCloudBeyondcorpSecuritygatewaysV1alphaRegionConfig": { - "description": "Message contains the configuration for each supported region for the securityGateway instance.", - "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaRegionConfig", - "properties": { - "egressIpAddresses": { - "description": "Output only. External IP addresses that will be used for establishing connection to the egress endpoints.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "region": { - "description": "Required. The region where the egress connectivity is required.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway": { "description": "Information about a BeyoncCorp SecurityGateway resource.", "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway", @@ -6060,17 +6041,18 @@ "description": "Optional. An arbitrary user-provided name for the SecurityGateway. Cannot exceed 64 characters.", "type": "string" }, - "name": { - "description": "Identifier. Name of the resource.", - "type": "string" - }, - "regionConfigs": { - "description": "Optional. List of regions where the egress connectivity is required.", + "externalIps": { + "description": "Output only. IP addresses that will be used for establishing connection to the endpoints.", "items": { - "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaRegionConfig" + "type": "string" }, + "readOnly": true, "type": "array" }, + "name": { + "description": "Identifier. Name of the resource.", + "type": "string" + }, "state": { "description": "Output only. The operational state of the SecurityGateway.", "enum": [ diff --git a/beyondcorp/v1alpha/beyondcorp-gen.go b/beyondcorp/v1alpha/beyondcorp-gen.go index 603ab47eb53..f26350dc978 100644 --- a/beyondcorp/v1alpha/beyondcorp-gen.go +++ b/beyondcorp/v1alpha/beyondcorp-gen.go @@ -3472,42 +3472,6 @@ func (s *GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysRespons return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudBeyondcorpSecuritygatewaysV1alphaRegionConfig: Message -// contains the configuration for each supported region for the -// securityGateway instance. -type GoogleCloudBeyondcorpSecuritygatewaysV1alphaRegionConfig struct { - // EgressIpAddresses: Output only. External IP addresses that will be - // used for establishing connection to the egress endpoints. - EgressIpAddresses []string `json:"egressIpAddresses,omitempty"` - - // Region: Required. The region where the egress connectivity is - // required. - Region string `json:"region,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EgressIpAddresses") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EgressIpAddresses") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudBeyondcorpSecuritygatewaysV1alphaRegionConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaRegionConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway: // Information about a BeyoncCorp SecurityGateway resource. type GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway struct { @@ -3518,13 +3482,13 @@ type GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway struct { // SecurityGateway. Cannot exceed 64 characters. DisplayName string `json:"displayName,omitempty"` + // ExternalIps: Output only. IP addresses that will be used for + // establishing connection to the endpoints. + ExternalIps []string `json:"externalIps,omitempty"` + // Name: Identifier. Name of the resource. Name string `json:"name,omitempty"` - // RegionConfigs: Optional. List of regions where the egress - // connectivity is required. - RegionConfigs []*GoogleCloudBeyondcorpSecuritygatewaysV1alphaRegionConfig `json:"regionConfigs,omitempty"` - // State: Output only. The operational state of the SecurityGateway. // // Possible values: diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index 1e3f1b3a97d..1c667b1a830 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -1109,7 +1109,7 @@ } } }, - "revision": "20240414", + "revision": "20240416", "rootUrl": "https://chat.googleapis.com/", "schemas": { "AccessoryWidget": { @@ -1887,7 +1887,7 @@ "id": "GoogleAppsCardV1Action", "properties": { "function": { - "description": "A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).", + "description": "A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).", "type": "string" }, "interaction": { diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 192d02b484e..47202b3e18f 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -1744,7 +1744,7 @@ func (s *FormAction) MarshalJSON() ([]byte, error) { // (https://developers.google.com/workspace/extend): type GoogleAppsCardV1Action struct { // Function: A custom function to invoke when the containing element is - // clicked or othrwise activated. For example usage, see Read form data + // clicked or otherwise activated. For example usage, see Read form data // (https://developers.google.com/workspace/chat/read-form-data). Function string `json:"function,omitempty"` diff --git a/config/v1/config-api.json b/config/v1/config-api.json new file mode 100644 index 00000000000..5d5f315a90e --- /dev/null +++ b/config/v1/config-api.json @@ -0,0 +1,2690 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://config.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Config", + "description": "Creates and manages Google Cloud Platform resources and infrastructure.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/infrastructure-manager/docs", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "config:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://config.mtls.googleapis.com/", + "name": "config", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "config.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "config.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "deployments": { + "methods": { + "create": { + "description": "Creates a Deployment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments", + "httpMethod": "POST", + "id": "config.projects.locations.deployments.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "deploymentId": { + "description": "Required. The Deployment ID.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent in whose context the Deployment is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/deployments", + "request": { + "$ref": "Deployment" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Deployment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}", + "httpMethod": "DELETE", + "id": "config.projects.locations.deployments.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "deletePolicy": { + "description": "Optional. Policy on how resources actuated by the deployment should be deleted. If unspecified, the default behavior is to delete the underlying resources.", + "enum": [ + "DELETE_POLICY_UNSPECIFIED", + "DELETE", + "ABANDON" + ], + "enumDescriptions": [ + "Unspecified policy, resources will be deleted.", + "Deletes resources actuated by the deployment.", + "Abandons resources and only deletes the deployment and its metadata." + ], + "location": "query", + "type": "string" + }, + "force": { + "description": "Optional. If set to true, any revisions for this deployment will also be deleted. (Otherwise, the request will only work if the deployment has no revisions.)", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. The name of the Deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "deleteState": { + "description": "Deletes Terraform state file in a given deployment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:deleteState", + "httpMethod": "POST", + "id": "config.projects.locations.deployments.deleteState", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:deleteState", + "request": { + "$ref": "DeleteStatefileRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "exportLock": { + "description": "Exports the lock info on a locked deployment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:exportLock", + "httpMethod": "GET", + "id": "config.projects.locations.deployments.exportLock", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:exportLock", + "response": { + "$ref": "LockInfo" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "exportState": { + "description": "Exports Terraform state file from a given deployment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:exportState", + "httpMethod": "POST", + "id": "config.projects.locations.deployments.exportState", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent in whose context the statefile is listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}:exportState", + "request": { + "$ref": "ExportDeploymentStatefileRequest" + }, + "response": { + "$ref": "Statefile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details about a Deployment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}", + "httpMethod": "GET", + "id": "config.projects.locations.deployments.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the deployment. Format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Deployment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:getIamPolicy", + "httpMethod": "GET", + "id": "config.projects.locations.deployments.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "importState": { + "description": "Imports Terraform state file in a given deployment. The state file does not take effect until the Deployment has been unlocked.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:importState", + "httpMethod": "POST", + "id": "config.projects.locations.deployments.importState", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent in whose context the statefile is listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}:importState", + "request": { + "$ref": "ImportStatefileRequest" + }, + "response": { + "$ref": "Statefile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Deployments in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments", + "httpMethod": "GET", + "id": "config.projects.locations.deployments.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Lists the Deployments that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form '{field} {operator} {value}' where operators: '\u003c', '\u003e', '\u003c=', '\u003e=', '!=', '=', ':' are supported (colon ':' represents a HAS operator which is roughly synonymous with equality). {field} can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = \"projects/foo/locations/us-central1/deployments/bar - Filter by labels: - Resources that have a key called 'foo' labels.foo:* - Resources that have a key called 'foo' whose value is 'bar' labels.foo = bar - Filter by state: - Deployments in CREATING state. state=CREATING", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field to use to sort the list.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "When requesting a page of resources, 'page_size' specifies number of resources to return. If unspecified, at most 500 will be returned. The maximum value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Token returned by previous call to 'ListDeployments' which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent in whose context the Deployments are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/deployments", + "response": { + "$ref": "ListDeploymentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "lock": { + "description": "Locks a deployment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:lock", + "httpMethod": "POST", + "id": "config.projects.locations.deployments.lock", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:lock", + "request": { + "$ref": "LockDeploymentRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Deployment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}", + "httpMethod": "PATCH", + "id": "config.projects.locations.deployments.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name of the deployment. Format: `projects/{project}/locations/{location}/deployments/{deployment}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask used to specify the fields to be overwritten in the Deployment resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Deployment" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:setIamPolicy", + "httpMethod": "POST", + "id": "config.projects.locations.deployments.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:testIamPermissions", + "httpMethod": "POST", + "id": "config.projects.locations.deployments.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "unlock": { + "description": "Unlocks a locked deployment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:unlock", + "httpMethod": "POST", + "id": "config.projects.locations.deployments.unlock", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:unlock", + "request": { + "$ref": "UnlockDeploymentRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "revisions": { + "methods": { + "exportState": { + "description": "Exports Terraform state file from a given revision.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}/revisions/{revisionsId}:exportState", + "httpMethod": "POST", + "id": "config.projects.locations.deployments.revisions.exportState", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent in whose context the statefile is listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+/revisions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}:exportState", + "request": { + "$ref": "ExportRevisionStatefileRequest" + }, + "response": { + "$ref": "Statefile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details about a Revision.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}/revisions/{revisionsId}", + "httpMethod": "GET", + "id": "config.projects.locations.deployments.revisions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Revision in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+/revisions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Revision" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Revisions of a deployment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}/revisions", + "httpMethod": "GET", + "id": "config.projects.locations.deployments.revisions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Lists the Revisions that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form '{field} {operator} {value}' where operators: '\u003c', '\u003e', '\u003c=', '\u003e=', '!=', '=', ':' are supported (colon ':' represents a HAS operator which is roughly synonymous with equality). {field} can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = \"projects/foo/locations/us-central1/deployments/dep/revisions/bar - Filter by labels: - Resources that have a key called 'foo' labels.foo:* - Resources that have a key called 'foo' whose value is 'bar' labels.foo = bar - Filter by state: - Revisions in CREATING state. state=CREATING", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field to use to sort the list.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "When requesting a page of resources, `page_size` specifies number of resources to return. If unspecified, at most 500 will be returned. The maximum value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Token returned by previous call to 'ListRevisions' which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent in whose context the Revisions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/revisions", + "response": { + "$ref": "ListRevisionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "resources": { + "methods": { + "get": { + "description": "Gets details about a Resource deployed by Infra Manager.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}/revisions/{revisionsId}/resources/{resourcesId}", + "httpMethod": "GET", + "id": "config.projects.locations.deployments.revisions.resources.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Resource in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+/revisions/[^/]+/resources/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Resource" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Resources in a given revision.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}/revisions/{revisionsId}/resources", + "httpMethod": "GET", + "id": "config.projects.locations.deployments.revisions.resources.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Lists the Resources that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form '{field} {operator} {value}' where operators: '\u003c', '\u003e', '\u003c=', '\u003e=', '!=', '=', ':' are supported (colon ':' represents a HAS operator which is roughly synonymous with equality). {field} can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = \"projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field to use to sort the list.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "When requesting a page of resources, 'page_size' specifies number of resources to return. If unspecified, at most 500 will be returned. The maximum value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Token returned by previous call to 'ListResources' which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent in whose context the Resources are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+/revisions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/resources", + "response": { + "$ref": "ListResourcesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "config.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "config.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "config.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "config.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "previews": { + "methods": { + "create": { + "description": "Creates a Preview.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/previews", + "httpMethod": "POST", + "id": "config.projects.locations.previews.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent in whose context the Preview is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "previewId": { + "description": "Optional. The preview ID.", + "location": "query", + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/previews", + "request": { + "$ref": "Preview" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Preview.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/previews/{previewsId}", + "httpMethod": "DELETE", + "id": "config.projects.locations.previews.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Preview in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/previews/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "export": { + "description": "Export Preview results.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/previews/{previewsId}:export", + "httpMethod": "POST", + "id": "config.projects.locations.previews.export", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The preview whose results should be exported. The preview value is in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/previews/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}:export", + "request": { + "$ref": "ExportPreviewResultRequest" + }, + "response": { + "$ref": "ExportPreviewResultResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details about a Preview.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/previews/{previewsId}", + "httpMethod": "GET", + "id": "config.projects.locations.previews.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the preview. Format: 'projects/{project_id}/locations/{location}/previews/{preview}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/previews/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Preview" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Previews in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/previews", + "httpMethod": "GET", + "id": "config.projects.locations.previews.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Lists the Deployments that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form '{field} {operator} {value}' where operators: '\u003c', '\u003e', '\u003c=', '\u003e=', '!=', '=', ':' are supported (colon ':' represents a HAS operator which is roughly synonymous with equality). {field} can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = \"projects/foo/locations/us-central1/deployments/bar - Filter by labels: - Resources that have a key called 'foo' labels.foo:* - Resources that have a key called 'foo' whose value is 'bar' labels.foo = bar - Filter by state: - Deployments in CREATING state. state=CREATING", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Field to use to sort the list.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. When requesting a page of resources, 'page_size' specifies number of resources to return. If unspecified, at most 500 will be returned. The maximum value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Token returned by previous call to 'ListDeployments' which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent in whose context the Previews are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/previews", + "response": { + "$ref": "ListPreviewsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "terraformVersions": { + "methods": { + "get": { + "description": "Gets details about a TerraformVersion.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/terraformVersions/{terraformVersionsId}", + "httpMethod": "GET", + "id": "config.projects.locations.terraformVersions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the TerraformVersion. Format: 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/terraformVersions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "TerraformVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists TerraformVersions in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/terraformVersions", + "httpMethod": "GET", + "id": "config.projects.locations.terraformVersions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Lists the TerraformVersions that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form '{field} {operator} {value}' where operators: '\u003c', '\u003e', '\u003c=', '\u003e=', '!=', '=', ':' are supported (colon ':' represents a HAS operator which is roughly synonymous with equality). {field} can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Field to use to sort the list.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. When requesting a page of resources, 'page_size' specifies number of resources to return. If unspecified, at most 500 will be returned. The maximum value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Token returned by previous call to 'ListTerraformVersions' which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent in whose context the TerraformVersions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/terraformVersions", + "response": { + "$ref": "ListTerraformVersionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20240410", + "rootUrl": "https://config.googleapis.com/", + "schemas": { + "ApplyResults": { + "description": "Outputs and artifacts from applying a deployment.", + "id": "ApplyResults", + "properties": { + "artifacts": { + "description": "Location of artifacts (e.g. logs) in Google Cloud Storage. Format: `gs://{bucket}/{object}`", + "type": "string" + }, + "content": { + "description": "Location of a blueprint copy and other manifests in Google Cloud Storage. Format: `gs://{bucket}/{object}`", + "type": "string" + }, + "outputs": { + "additionalProperties": { + "$ref": "TerraformOutput" + }, + "description": "Map of output name to output info.", + "type": "object" + } + }, + "type": "object" + }, + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "DeleteStatefileRequest": { + "description": "A request to delete a state file passed to a 'DeleteStatefile' call.", + "id": "DeleteStatefileRequest", + "properties": { + "lockId": { + "description": "Required. Lock ID of the lock file to verify that the user who is deleting the state file previously locked the Deployment.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "Deployment": { + "description": "A Deployment is a group of resources and configs managed and provisioned by Infra Manager.", + "id": "Deployment", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Arbitrary key-value metadata storage e.g. to help client tools identifiy deployments during automation. See https://google.aip.dev/148#annotations for details on format and size limitations.", + "type": "object" + }, + "artifactsGcsBucket": { + "description": "Optional. User-defined location of Cloud Build logs and artifacts in Google Cloud Storage. Format: `gs://{bucket}/{folder}` A default bucket will be bootstrapped if the field is not set or empty. Default bucket format: `gs://--blueprint-config` Constraints: - The bucket needs to be in the same project as the deployment - The path cannot be within the path of `gcs_source` - The field cannot be updated, including changing its presence", + "type": "string" + }, + "createTime": { + "description": "Output only. Time when the deployment was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteBuild": { + "description": "Output only. Cloud Build instance UUID associated with deleting this deployment.", + "readOnly": true, + "type": "string" + }, + "deleteLogs": { + "description": "Output only. Location of Cloud Build logs in Google Cloud Storage, populated when deleting this deployment. Format: `gs://{bucket}/{object}`.", + "readOnly": true, + "type": "string" + }, + "deleteResults": { + "$ref": "ApplyResults", + "description": "Output only. Location of artifacts from a DeleteDeployment operation.", + "readOnly": true + }, + "errorCode": { + "description": "Output only. Error code describing errors that may have occurred.", + "enum": [ + "ERROR_CODE_UNSPECIFIED", + "REVISION_FAILED", + "CLOUD_BUILD_PERMISSION_DENIED", + "DELETE_BUILD_API_FAILED", + "DELETE_BUILD_RUN_FAILED", + "BUCKET_CREATION_PERMISSION_DENIED", + "BUCKET_CREATION_FAILED" + ], + "enumDescriptions": [ + "No error code was specified.", + "The revision failed. See Revision for more details.", + "Cloud Build failed due to a permission issue.", + "Cloud Build job associated with a deployment deletion could not be started.", + "Cloud Build job associated with a deployment deletion was started but failed.", + "Cloud Storage bucket creation failed due to a permission issue.", + "Cloud Storage bucket creation failed due to an issue unrelated to permissions." + ], + "readOnly": true, + "type": "string" + }, + "errorLogs": { + "description": "Output only. Location of Terraform error logs in Google Cloud Storage. Format: `gs://{bucket}/{object}`.", + "readOnly": true, + "type": "string" + }, + "importExistingResources": { + "description": "By default, Infra Manager will return a failure when Terraform encounters a 409 code (resource conflict error) during actuation. If this flag is set to true, Infra Manager will instead attempt to automatically import the resource into the Terraform state (for supported resource types) and continue actuation. Not all resource types are supported, refer to documentation.", + "type": "boolean" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined metadata for the deployment.", + "type": "object" + }, + "latestRevision": { + "description": "Output only. Revision name that was most recently applied. Format: `projects/{project}/locations/{location}/deployments/{deployment}/ revisions/{revision}`", + "readOnly": true, + "type": "string" + }, + "lockState": { + "description": "Output only. Current lock state of the deployment.", + "enum": [ + "LOCK_STATE_UNSPECIFIED", + "LOCKED", + "UNLOCKED", + "LOCKING", + "UNLOCKING", + "LOCK_FAILED", + "UNLOCK_FAILED" + ], + "enumDescriptions": [ + "The default value. This value is used if the lock state is omitted.", + "The deployment is locked.", + "The deployment is unlocked.", + "The deployment is being locked.", + "The deployment is being unlocked.", + "The deployment has failed to lock.", + "The deployment has failed to unlock." + ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Resource name of the deployment. Format: `projects/{project}/locations/{location}/deployments/{deployment}`", + "type": "string" + }, + "quotaValidation": { + "description": "Optional. Input to control quota checks for resources in terraform configuration files. There are limited resources on which quota validation applies.", + "enum": [ + "QUOTA_VALIDATION_UNSPECIFIED", + "ENABLED", + "ENFORCED" + ], + "enumDescriptions": [ + "The default value. QuotaValidation on terraform configuration files will be disabled in this case.", + "Enable computing quotas for resources in terraform configuration files to get visibility on resources with insufficient quotas.", + "Enforce quota checks so deployment fails if there isn't sufficient quotas available to deploy resources in terraform configuration files." + ], + "type": "string" + }, + "serviceAccount": { + "description": "Optional. User-specified Service Account (SA) credentials to be used when actuating resources. Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`", + "type": "string" + }, + "state": { + "description": "Output only. Current state of the deployment.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING", + "FAILED", + "SUSPENDED", + "DELETED" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "The deployment is being created.", + "The deployment is healthy.", + "The deployment is being updated.", + "The deployment is being deleted.", + "The deployment has encountered an unexpected error.", + "The deployment is no longer being actively reconciled. This may be the result of recovering the project after deletion.", + "The deployment has been deleted." + ], + "readOnly": true, + "type": "string" + }, + "stateDetail": { + "description": "Output only. Additional information regarding the current state.", + "readOnly": true, + "type": "string" + }, + "terraformBlueprint": { + "$ref": "TerraformBlueprint", + "description": "A blueprint described using Terraform's HashiCorp Configuration Language as a root module." + }, + "tfErrors": { + "description": "Output only. Errors encountered when deleting this deployment. Errors are truncated to 10 entries, see `delete_results` and `error_logs` for full details.", + "items": { + "$ref": "TerraformError" + }, + "readOnly": true, + "type": "array" + }, + "tfVersion": { + "description": "Output only. The current Terraform version set on the deployment. It is in the format of \"Major.Minor.Patch\", for example, \"1.3.10\".", + "readOnly": true, + "type": "string" + }, + "tfVersionConstraint": { + "description": "Optional. The user-specified Terraform version constraint. Example: \"=1.3.10\".", + "type": "string" + }, + "updateTime": { + "description": "Output only. Time when the deployment was last modified.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "workerPool": { + "description": "Optional. The user-specified Cloud Build worker pool resource in which the Cloud Build job will execute. Format: `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. If this field is unspecified, the default Cloud Build worker pool will be used.", + "type": "string" + } + }, + "type": "object" + }, + "DeploymentOperationMetadata": { + "description": "Ephemeral metadata content describing the state of a deployment operation.", + "id": "DeploymentOperationMetadata", + "properties": { + "applyResults": { + "$ref": "ApplyResults", + "description": "Outputs and artifacts from applying a deployment." + }, + "build": { + "description": "Output only. Cloud Build instance UUID associated with this operation.", + "readOnly": true, + "type": "string" + }, + "logs": { + "description": "Output only. Location of Deployment operations logs in `gs://{bucket}/{object}` format.", + "readOnly": true, + "type": "string" + }, + "step": { + "description": "The current step the deployment operation is running.", + "enum": [ + "DEPLOYMENT_STEP_UNSPECIFIED", + "PREPARING_STORAGE_BUCKET", + "DOWNLOADING_BLUEPRINT", + "RUNNING_TF_INIT", + "RUNNING_TF_PLAN", + "RUNNING_TF_APPLY", + "RUNNING_TF_DESTROY", + "RUNNING_TF_VALIDATE", + "UNLOCKING_DEPLOYMENT", + "SUCCEEDED", + "FAILED", + "VALIDATING_REPOSITORY", + "RUNNING_QUOTA_VALIDATION" + ], + "enumDescriptions": [ + "Unspecified deployment step", + "Infra Manager is creating a Google Cloud Storage bucket to store artifacts and metadata about the deployment and revision", + "Downloading the blueprint onto the Google Cloud Storage bucket", + "Initializing Terraform using `terraform init`", + "Running `terraform plan`", + "Actuating resources using Terraform using `terraform apply`", + "Destroying resources using Terraform using `terraform destroy`", + "Validating the uploaded TF state file when unlocking a deployment", + "Unlocking a deployment", + "Operation was successful", + "Operation failed", + "Validating the provided repository.", + "Running quota validation" + ], + "type": "string" + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "ExportDeploymentStatefileRequest": { + "description": "A request to export a state file passed to a 'ExportDeploymentStatefile' call.", + "id": "ExportDeploymentStatefileRequest", + "properties": { + "draft": { + "description": "Optional. If this flag is set to true, the exported deployment state file will be the draft state. This will enable the draft file to be validated before copying it over to the working state on unlock.", + "type": "boolean" + } + }, + "type": "object" + }, + "ExportPreviewResultRequest": { + "description": "A request to export preview results.", + "id": "ExportPreviewResultRequest", + "properties": {}, + "type": "object" + }, + "ExportPreviewResultResponse": { + "description": "A response to `ExportPreviewResult` call. Contains preview results.", + "id": "ExportPreviewResultResponse", + "properties": { + "result": { + "$ref": "PreviewResult", + "description": "Output only. Signed URLs for accessing the plan files.", + "readOnly": true + } + }, + "type": "object" + }, + "ExportRevisionStatefileRequest": { + "description": "A request to export a state file passed to a 'ExportRevisionStatefile' call.", + "id": "ExportRevisionStatefileRequest", + "properties": {}, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "GitSource": { + "description": "A set of files in a Git repository.", + "id": "GitSource", + "properties": { + "directory": { + "description": "Optional. Subdirectory inside the repository. Example: 'staging/my-package'", + "type": "string" + }, + "ref": { + "description": "Optional. Git reference (e.g. branch or tag).", + "type": "string" + }, + "repo": { + "description": "Optional. Repository URL. Example: 'https://github.com/kubernetes/examples.git'", + "type": "string" + } + }, + "type": "object" + }, + "ImportStatefileRequest": { + "description": "A request to import a state file passed to a 'ImportStatefile' call.", + "id": "ImportStatefileRequest", + "properties": { + "lockId": { + "description": "Required. Lock ID of the lock file to verify that the user who is importing the state file previously locked the Deployment.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "ListDeploymentsResponse": { + "id": "ListDeploymentsResponse", + "properties": { + "deployments": { + "description": "List of Deployments.", + "items": { + "$ref": "Deployment" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to be supplied to the next ListDeployments request via `page_token` to obtain the next set of results.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListPreviewsResponse": { + "description": "A response to a `ListPreviews` call. Contains a list of Previews.", + "id": "ListPreviewsResponse", + "properties": { + "nextPageToken": { + "description": "Token to be supplied to the next ListPreviews request via `page_token` to obtain the next set of results.", + "type": "string" + }, + "previews": { + "description": "List of Previewss.", + "items": { + "$ref": "Preview" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListResourcesResponse": { + "description": "A response to a 'ListResources' call. Contains a list of Resources.", + "id": "ListResourcesResponse", + "properties": { + "nextPageToken": { + "description": "A token to request the next page of resources from the 'ListResources' method. The value of an empty string means that there are no more resources to return.", + "type": "string" + }, + "resources": { + "description": "List of Resourcess.", + "items": { + "$ref": "Resource" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListRevisionsResponse": { + "description": "A response to a 'ListRevisions' call. Contains a list of Revisions.", + "id": "ListRevisionsResponse", + "properties": { + "nextPageToken": { + "description": "A token to request the next page of resources from the 'ListRevisions' method. The value of an empty string means that there are no more resources to return.", + "type": "string" + }, + "revisions": { + "description": "List of Revisions.", + "items": { + "$ref": "Revision" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListTerraformVersionsResponse": { + "description": "The response message for the `ListTerraformVersions` method.", + "id": "ListTerraformVersionsResponse", + "properties": { + "nextPageToken": { + "description": "Token to be supplied to the next ListTerraformVersions request via `page_token` to obtain the next set of results.", + "type": "string" + }, + "terraformVersions": { + "description": "List of TerraformVersions.", + "items": { + "$ref": "TerraformVersion" + }, + "type": "array" + }, + "unreachable": { + "description": "Unreachable resources, if any.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents a Google Cloud location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "LockDeploymentRequest": { + "description": "A request to lock a deployment passed to a 'LockDeployment' call.", + "id": "LockDeploymentRequest", + "properties": {}, + "type": "object" + }, + "LockInfo": { + "description": "Details about the lock which locked the deployment.", + "id": "LockInfo", + "properties": { + "createTime": { + "description": "Time that the lock was taken.", + "format": "google-datetime", + "type": "string" + }, + "info": { + "description": "Extra information to store with the lock, provided by the caller.", + "type": "string" + }, + "lockId": { + "description": "Unique ID for the lock to be overridden with generation ID in the backend.", + "format": "int64", + "type": "string" + }, + "operation": { + "description": "Terraform operation, provided by the caller.", + "type": "string" + }, + "version": { + "description": "Terraform version", + "type": "string" + }, + "who": { + "description": "user@hostname when available", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Time when the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deploymentMetadata": { + "$ref": "DeploymentOperationMetadata", + "description": "Output only. Metadata about the deployment operation state.", + "readOnly": true + }, + "endTime": { + "description": "Output only. Time when the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "previewMetadata": { + "$ref": "PreviewOperationMetadata", + "description": "Output only. Metadata about the preview operation state.", + "readOnly": true + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "Preview": { + "description": "A preview represents a set of actions Infra Manager would perform to move the resources towards the desired state as specified in the configuration.", + "id": "Preview", + "properties": { + "artifactsGcsBucket": { + "description": "Optional. User-defined location of Cloud Build logs, artifacts, and in Google Cloud Storage. Format: `gs://{bucket}/{folder}` A default bucket will be bootstrapped if the field is not set or empty Default Bucket Format: `gs://--blueprint-config` Constraints: - The bucket needs to be in the same project as the deployment - The path cannot be within the path of `gcs_source` If omitted and deployment resource ref provided has artifacts_gcs_bucket defined, that artifact bucket is used.", + "type": "string" + }, + "build": { + "description": "Output only. Cloud Build instance UUID associated with this preview.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Time the preview was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deployment": { + "description": "Optional. Optional deployment reference. If specified, the preview will be performed using the provided deployment's current state and use any relevant fields from the deployment unless explicitly specified in the preview create request.", + "type": "string" + }, + "errorCode": { + "description": "Output only. Code describing any errors that may have occurred.", + "enum": [ + "ERROR_CODE_UNSPECIFIED", + "CLOUD_BUILD_PERMISSION_DENIED", + "BUCKET_CREATION_PERMISSION_DENIED", + "BUCKET_CREATION_FAILED", + "DEPLOYMENT_LOCK_ACQUIRE_FAILED", + "PREVIEW_BUILD_API_FAILED", + "PREVIEW_BUILD_RUN_FAILED" + ], + "enumDescriptions": [ + "No error code was specified.", + "Cloud Build failed due to a permissions issue.", + "Cloud Storage bucket failed to create due to a permissions issue.", + "Cloud Storage bucket failed for a non-permissions-related issue.", + "Acquiring lock on provided deployment reference failed.", + "Preview encountered an error when trying to access Cloud Build API.", + "Preview created a build but build failed and logs were generated." + ], + "readOnly": true, + "type": "string" + }, + "errorLogs": { + "description": "Output only. Link to tf-error.ndjson file, which contains the full list of the errors encountered during a Terraform preview. Format: `gs://{bucket}/{object}`.", + "readOnly": true, + "type": "string" + }, + "errorStatus": { + "$ref": "Status", + "description": "Output only. Additional information regarding the current state.", + "readOnly": true + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User-defined labels for the preview.", + "type": "object" + }, + "logs": { + "description": "Output only. Location of preview logs in `gs://{bucket}/{object}` format.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. Resource name of the preview. Resource name can be user provided or server generated ID if unspecified. Format: `projects/{project}/locations/{location}/previews/{preview}`", + "type": "string" + }, + "previewArtifacts": { + "$ref": "PreviewArtifacts", + "description": "Output only. Artifacts from preview.", + "readOnly": true + }, + "previewMode": { + "description": "Optional. Current mode of preview.", + "enum": [ + "PREVIEW_MODE_UNSPECIFIED", + "DEFAULT", + "DELETE" + ], + "enumDescriptions": [ + "Unspecified policy, default mode will be used.", + "DEFAULT mode generates an execution plan for reconciling current resource state into expected resource state.", + "DELETE mode generates as execution plan for destroying current resources." + ], + "type": "string" + }, + "serviceAccount": { + "description": "Optional. User-specified Service Account (SA) credentials to be used when previewing resources. Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`", + "type": "string" + }, + "state": { + "description": "Output only. Current state of the preview.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "SUCCEEDED", + "APPLYING", + "STALE", + "DELETING", + "FAILED", + "DELETED" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is unknown.", + "The preview is being created.", + "The preview has succeeded.", + "The preview is being applied.", + "The preview is stale. A preview can become stale if a revision has been applied after this preview was created.", + "The preview is being deleted.", + "The preview has encountered an unexpected error.", + "The preview has been deleted." + ], + "readOnly": true, + "type": "string" + }, + "terraformBlueprint": { + "$ref": "TerraformBlueprint", + "description": "The terraform blueprint to preview." + }, + "tfErrors": { + "description": "Output only. Summary of errors encountered during Terraform preview. It has a size limit of 10, i.e. only top 10 errors will be summarized here.", + "items": { + "$ref": "TerraformError" + }, + "readOnly": true, + "type": "array" + }, + "workerPool": { + "description": "Optional. The user-specified Worker Pool resource in which the Cloud Build job will execute. Format projects/{project}/locations/{location}/workerPools/{workerPoolId} If this field is unspecified, the default Cloud Build worker pool will be used. If omitted and deployment resource ref provided has worker_pool defined, that worker pool is used.", + "type": "string" + } + }, + "type": "object" + }, + "PreviewArtifacts": { + "description": "Artifacts created by preview.", + "id": "PreviewArtifacts", + "properties": { + "artifacts": { + "description": "Output only. Location of artifacts in Google Cloud Storage. Format: `gs://{bucket}/{object}`", + "readOnly": true, + "type": "string" + }, + "content": { + "description": "Output only. Location of a blueprint copy and other content in Google Cloud Storage. Format: `gs://{bucket}/{object}`", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "PreviewOperationMetadata": { + "description": "Ephemeral metadata content describing the state of a preview operation.", + "id": "PreviewOperationMetadata", + "properties": { + "build": { + "description": "Output only. Cloud Build instance UUID associated with this preview.", + "readOnly": true, + "type": "string" + }, + "logs": { + "description": "Output only. Location of preview logs in `gs://{bucket}/{object}` format.", + "readOnly": true, + "type": "string" + }, + "previewArtifacts": { + "$ref": "PreviewArtifacts", + "description": "Artifacts from preview." + }, + "step": { + "description": "The current step the preview operation is running.", + "enum": [ + "PREVIEW_STEP_UNSPECIFIED", + "PREPARING_STORAGE_BUCKET", + "DOWNLOADING_BLUEPRINT", + "RUNNING_TF_INIT", + "RUNNING_TF_PLAN", + "FETCHING_DEPLOYMENT", + "LOCKING_DEPLOYMENT", + "UNLOCKING_DEPLOYMENT", + "SUCCEEDED", + "FAILED", + "VALIDATING_REPOSITORY" + ], + "enumDescriptions": [ + "Unspecified preview step.", + "Infra Manager is creating a Google Cloud Storage bucket to store artifacts and metadata about the preview.", + "Downloading the blueprint onto the Google Cloud Storage bucket.", + "Initializing Terraform using `terraform init`.", + "Running `terraform plan`.", + "Fetching a deployment.", + "Locking a deployment.", + "Unlocking a deployment.", + "Operation was successful.", + "Operation failed.", + "Validating the provided repository." + ], + "type": "string" + } + }, + "type": "object" + }, + "PreviewResult": { + "description": "Contains a signed Cloud Storage URLs.", + "id": "PreviewResult", + "properties": { + "binarySignedUri": { + "description": "Output only. Plan binary signed URL", + "readOnly": true, + "type": "string" + }, + "jsonSignedUri": { + "description": "Output only. Plan JSON signed URL", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Resource": { + "description": "Resource represents a Google Cloud Platform resource actuated by IM. Resources are child resources of Revisions.", + "id": "Resource", + "properties": { + "caiAssets": { + "additionalProperties": { + "$ref": "ResourceCAIInfo" + }, + "description": "Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI ID). CAI type format follows https://cloud.google.com/asset-inventory/docs/supported-asset-types", + "readOnly": true, + "type": "object" + }, + "intent": { + "description": "Output only. Intent of the resource.", + "enum": [ + "INTENT_UNSPECIFIED", + "CREATE", + "UPDATE", + "DELETE", + "RECREATE", + "UNCHANGED" + ], + "enumDescriptions": [ + "The default value. This value is used if the intent is omitted.", + "Infra Manager will create this Resource.", + "Infra Manager will update this Resource.", + "Infra Manager will delete this Resource.", + "Infra Manager will destroy and recreate this Resource.", + "Infra Manager will leave this Resource untouched." + ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. Resource name. Format: `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. Current state of the resource.", + "enum": [ + "STATE_UNSPECIFIED", + "PLANNED", + "IN_PROGRESS", + "RECONCILED", + "FAILED" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "Resource has been planned for reconcile.", + "Resource is actively reconciling into the intended state.", + "Resource has reconciled to intended state.", + "Resource failed to reconcile." + ], + "readOnly": true, + "type": "string" + }, + "terraformInfo": { + "$ref": "ResourceTerraformInfo", + "description": "Output only. Terraform-specific info if this resource was created using Terraform.", + "readOnly": true + } + }, + "type": "object" + }, + "ResourceCAIInfo": { + "description": "CAI info of a Resource.", + "id": "ResourceCAIInfo", + "properties": { + "fullResourceName": { + "description": "CAI resource name in the format following https://cloud.google.com/apis/design/resource_names#full_resource_name", + "type": "string" + } + }, + "type": "object" + }, + "ResourceTerraformInfo": { + "description": "Terraform info of a Resource.", + "id": "ResourceTerraformInfo", + "properties": { + "address": { + "description": "TF resource address that uniquely identifies this resource within this deployment.", + "type": "string" + }, + "id": { + "description": "ID attribute of the TF resource", + "type": "string" + }, + "type": { + "description": "TF resource type", + "type": "string" + } + }, + "type": "object" + }, + "Revision": { + "description": "A child resource of a Deployment generated by a 'CreateDeployment' or 'UpdateDeployment' call. Each Revision contains metadata pertaining to a snapshot of a particular Deployment.", + "id": "Revision", + "properties": { + "action": { + "description": "Output only. The action which created this revision", + "enum": [ + "ACTION_UNSPECIFIED", + "CREATE", + "UPDATE", + "DELETE" + ], + "enumDescriptions": [ + "The default value. This value is used if the action is omitted.", + "The revision was generated by creating a deployment.", + "The revision was generated by updating a deployment.", + "The revision was deleted." + ], + "readOnly": true, + "type": "string" + }, + "applyResults": { + "$ref": "ApplyResults", + "description": "Output only. Outputs and artifacts from applying a deployment.", + "readOnly": true + }, + "build": { + "description": "Output only. Cloud Build instance UUID associated with this revision.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Time when the revision was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "errorCode": { + "description": "Output only. Code describing any errors that may have occurred.", + "enum": [ + "ERROR_CODE_UNSPECIFIED", + "CLOUD_BUILD_PERMISSION_DENIED", + "APPLY_BUILD_API_FAILED", + "APPLY_BUILD_RUN_FAILED", + "QUOTA_VALIDATION_FAILED" + ], + "enumDescriptions": [ + "No error code was specified.", + "Cloud Build failed due to a permission issue.", + "Cloud Build job associated with creating or updating a deployment could not be started.", + "Cloud Build job associated with creating or updating a deployment was started but failed.", + "quota validation failed for one or more resources in terraform configuration files." + ], + "readOnly": true, + "type": "string" + }, + "errorLogs": { + "description": "Output only. Location of Terraform error logs in Google Cloud Storage. Format: `gs://{bucket}/{object}`.", + "readOnly": true, + "type": "string" + }, + "importExistingResources": { + "description": "Output only. By default, Infra Manager will return a failure when Terraform encounters a 409 code (resource conflict error) during actuation. If this flag is set to true, Infra Manager will instead attempt to automatically import the resource into the Terraform state (for supported resource types) and continue actuation. Not all resource types are supported, refer to documentation.", + "readOnly": true, + "type": "boolean" + }, + "logs": { + "description": "Output only. Location of Revision operation logs in `gs://{bucket}/{object}` format.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Revision name. Format: `projects/{project}/locations/{location}/deployments/{deployment}/ revisions/{revision}`", + "type": "string" + }, + "quotaValidation": { + "description": "Optional. Input to control quota checks for resources in terraform configuration files. There are limited resources on which quota validation applies.", + "enum": [ + "QUOTA_VALIDATION_UNSPECIFIED", + "ENABLED", + "ENFORCED" + ], + "enumDescriptions": [ + "The default value. QuotaValidation on terraform configuration files will be disabled in this case.", + "Enable computing quotas for resources in terraform configuration files to get visibility on resources with insufficient quotas.", + "Enforce quota checks so deployment fails if there isn't sufficient quotas available to deploy resources in terraform configuration files." + ], + "type": "string" + }, + "quotaValidationResults": { + "description": "Output only. Cloud Storage path containing quota validation results. This field is set when a user sets Deployment.quota_validation field to ENABLED or ENFORCED. Format: `gs://{bucket}/{object}`.", + "readOnly": true, + "type": "string" + }, + "serviceAccount": { + "description": "Output only. User-specified Service Account (SA) to be used as credential to manage resources. Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. Current state of the revision.", + "enum": [ + "STATE_UNSPECIFIED", + "APPLYING", + "APPLIED", + "FAILED" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "The revision is being applied.", + "The revision was applied successfully.", + "The revision could not be applied successfully." + ], + "readOnly": true, + "type": "string" + }, + "stateDetail": { + "description": "Output only. Additional info regarding the current state.", + "readOnly": true, + "type": "string" + }, + "terraformBlueprint": { + "$ref": "TerraformBlueprint", + "description": "Output only. A blueprint described using Terraform's HashiCorp Configuration Language as a root module.", + "readOnly": true + }, + "tfErrors": { + "description": "Output only. Errors encountered when creating or updating this deployment. Errors are truncated to 10 entries, see `delete_results` and `error_logs` for full details.", + "items": { + "$ref": "TerraformError" + }, + "readOnly": true, + "type": "array" + }, + "tfVersion": { + "description": "Output only. The version of Terraform used to create the Revision. It is in the format of \"Major.Minor.Patch\", for example, \"1.3.10\".", + "readOnly": true, + "type": "string" + }, + "tfVersionConstraint": { + "description": "Output only. The user-specified Terraform version constraint. Example: \"=1.3.10\".", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Time when the revision was last modified.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "workerPool": { + "description": "Output only. The user-specified Cloud Build worker pool resource in which the Cloud Build job will execute. Format: `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. If this field is unspecified, the default Cloud Build worker pool will be used.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "Statefile": { + "description": "Contains info about a Terraform state file", + "id": "Statefile", + "properties": { + "signedUri": { + "description": "Output only. Cloud Storage signed URI used for downloading or uploading the state file.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "TerraformBlueprint": { + "description": "TerraformBlueprint describes the source of a Terraform root module which describes the resources and configs to be deployed.", + "id": "TerraformBlueprint", + "properties": { + "gcsSource": { + "description": "Required. URI of an object in Google Cloud Storage. Format: `gs://{bucket}/{object}` URI may also specify an object version for zipped objects. Format: `gs://{bucket}/{object}#{version}`", + "type": "string" + }, + "gitSource": { + "$ref": "GitSource", + "description": "Required. URI of a public Git repo." + }, + "inputValues": { + "additionalProperties": { + "$ref": "TerraformVariable" + }, + "description": "Input variable values for the Terraform blueprint.", + "type": "object" + } + }, + "type": "object" + }, + "TerraformError": { + "description": "Errors encountered during actuation using Terraform", + "id": "TerraformError", + "properties": { + "error": { + "$ref": "Status", + "description": "Original error response from underlying Google API, if available." + }, + "errorDescription": { + "description": "A human-readable error description.", + "type": "string" + }, + "httpResponseCode": { + "description": "HTTP response code returned from Google Cloud Platform APIs when Terraform fails to provision the resource. If unset or 0, no HTTP response code was returned by Terraform.", + "format": "int32", + "type": "integer" + }, + "resourceAddress": { + "description": "Address of the resource associated with the error, e.g. `google_compute_network.vpc_network`.", + "type": "string" + } + }, + "type": "object" + }, + "TerraformOutput": { + "description": "Describes a Terraform output.", + "id": "TerraformOutput", + "properties": { + "sensitive": { + "description": "Identifies whether Terraform has set this output as a potential sensitive value.", + "type": "boolean" + }, + "value": { + "description": "Value of output.", + "type": "any" + } + }, + "type": "object" + }, + "TerraformVariable": { + "description": "A Terraform input variable.", + "id": "TerraformVariable", + "properties": { + "inputValue": { + "description": "Input variable value.", + "type": "any" + } + }, + "type": "object" + }, + "TerraformVersion": { + "description": "A TerraformVersion represents the support state the corresponding Terraform version.", + "id": "TerraformVersion", + "properties": { + "deprecateTime": { + "description": "Output only. When the version is deprecated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. The version name is in the format: 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'.", + "type": "string" + }, + "obsoleteTime": { + "description": "Output only. When the version is obsolete.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The state of the version, ACTIVE, DEPRECATED or OBSOLETE.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "DEPRECATED", + "OBSOLETE" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "The version is actively supported.", + "The version is deprecated.", + "The version is obsolete." + ], + "readOnly": true, + "type": "string" + }, + "supportTime": { + "description": "Output only. When the version is supported.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "UnlockDeploymentRequest": { + "description": "A request to unlock a state file passed to a 'UnlockDeployment' call.", + "id": "UnlockDeploymentRequest", + "properties": { + "lockId": { + "description": "Required. Lock ID of the lock file to be unlocked.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Infrastructure Manager API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/config/v1/config-gen.go b/config/v1/config-gen.go new file mode 100644 index 00000000000..79290fe9335 --- /dev/null +++ b/config/v1/config-gen.go @@ -0,0 +1,7979 @@ +// Copyright 2024 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package config provides access to the Infrastructure Manager API. +// +// For product documentation, see: https://cloud.google.com/infrastructure-manager/docs +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/config/v1" +// ... +// ctx := context.Background() +// configService, err := config.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// configService, err := config.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// configService, err := config.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package config // import "google.golang.org/api/config/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "config:v1" +const apiName = "config" +const apiVersion = "v1" +const basePath = "https://config.googleapis.com/" +const basePathTemplate = "https://config.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://config.mtls.googleapis.com/" +const defaultUniverseDomain = "googleapis.com" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.WithDefaultUniverseDomain(defaultUniverseDomain)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Deployments = NewProjectsLocationsDeploymentsService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.Previews = NewProjectsLocationsPreviewsService(s) + rs.TerraformVersions = NewProjectsLocationsTerraformVersionsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Deployments *ProjectsLocationsDeploymentsService + + Operations *ProjectsLocationsOperationsService + + Previews *ProjectsLocationsPreviewsService + + TerraformVersions *ProjectsLocationsTerraformVersionsService +} + +func NewProjectsLocationsDeploymentsService(s *Service) *ProjectsLocationsDeploymentsService { + rs := &ProjectsLocationsDeploymentsService{s: s} + rs.Revisions = NewProjectsLocationsDeploymentsRevisionsService(s) + return rs +} + +type ProjectsLocationsDeploymentsService struct { + s *Service + + Revisions *ProjectsLocationsDeploymentsRevisionsService +} + +func NewProjectsLocationsDeploymentsRevisionsService(s *Service) *ProjectsLocationsDeploymentsRevisionsService { + rs := &ProjectsLocationsDeploymentsRevisionsService{s: s} + rs.Resources = NewProjectsLocationsDeploymentsRevisionsResourcesService(s) + return rs +} + +type ProjectsLocationsDeploymentsRevisionsService struct { + s *Service + + Resources *ProjectsLocationsDeploymentsRevisionsResourcesService +} + +func NewProjectsLocationsDeploymentsRevisionsResourcesService(s *Service) *ProjectsLocationsDeploymentsRevisionsResourcesService { + rs := &ProjectsLocationsDeploymentsRevisionsResourcesService{s: s} + return rs +} + +type ProjectsLocationsDeploymentsRevisionsResourcesService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsPreviewsService(s *Service) *ProjectsLocationsPreviewsService { + rs := &ProjectsLocationsPreviewsService{s: s} + return rs +} + +type ProjectsLocationsPreviewsService struct { + s *Service +} + +func NewProjectsLocationsTerraformVersionsService(s *Service) *ProjectsLocationsTerraformVersionsService { + rs := &ProjectsLocationsTerraformVersionsService{s: s} + return rs +} + +type ProjectsLocationsTerraformVersionsService struct { + s *Service +} + +// ApplyResults: Outputs and artifacts from applying a deployment. +type ApplyResults struct { + // Artifacts: Location of artifacts (e.g. logs) in Google Cloud Storage. + // Format: `gs://{bucket}/{object}` + Artifacts string `json:"artifacts,omitempty"` + + // Content: Location of a blueprint copy and other manifests in Google + // Cloud Storage. Format: `gs://{bucket}/{object}` + Content string `json:"content,omitempty"` + + // Outputs: Map of output name to output info. + Outputs map[string]TerraformOutput `json:"outputs,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Artifacts") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Artifacts") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ApplyResults) MarshalJSON() ([]byte, error) { + type NoMethod ApplyResults + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AuditConfig: Specifies the audit configuration for a service. The +// configuration determines which permission types are logged, and what +// identities, if any, are exempted from logging. An AuditConfig must +// have one or more AuditLogConfigs. If there are AuditConfigs for both +// `allServices` and a specific service, the union of the two +// AuditConfigs is used for that service: the log_types specified in +// each AuditConfig are enabled, and the exempted_members in each +// AuditLogConfig are exempted. Example Policy with multiple +// AuditConfigs: { "audit_configs": [ { "service": "allServices", +// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": +// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { +// "log_type": "ADMIN_READ" } ] }, { "service": +// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": +// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ +// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy +// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts +// `jose@example.com` from DATA_READ logging, and `aliya@example.com` +// from DATA_WRITE logging. +type AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` + + // Service: Specifies a service that will be enabled for audit logging. + // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AuditLogConfig: Provides the configuration for logging a type of +// permissions. Example: { "audit_log_configs": [ { "log_type": +// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { +// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and +// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ +// logging. +type AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of permission. Follows the same format of + // Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExemptedMembers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Binding: Associates `members`, or principals, with a `role`. +type Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the + // current request. If the condition evaluates to `false`, then this + // binding does not apply to the current request. However, a different + // role binding might grant the same role to one or more of the + // principals in this binding. To learn which resources support + // conditions in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *Expr `json:"condition,omitempty"` + + // Members: Specifies the principals requesting access for a Google + // Cloud resource. `members` can have the following values: * + // `allUsers`: A special identifier that represents anyone who is on the + // internet; with or without a Google account. * + // `allAuthenticatedUsers`: A special identifier that represents anyone + // who is authenticated with a Google account or a service account. Does + // not include identities that come from external identity providers + // (IdPs) through identity federation. * `user:{emailid}`: An email + // address that represents a specific Google account. For example, + // `alice@example.com` . * `serviceAccount:{emailid}`: An email address + // that represents a Google service account. For example, + // `my-other-app@appspot.gserviceaccount.com`. * + // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: + // An identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. + // * `group:{emailid}`: An email address that represents a Google group. + // For example, `admins@example.com`. * `domain:{domain}`: The G Suite + // domain (primary) that represents all the users of that domain. For + // example, `google.com` or `example.com`. * + // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_ + // id}/subject/{subject_attribute_value}`: A single identity in a + // workforce identity pool. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{po + // ol_id}/group/{group_id}`: All workforce identities in a group. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{po + // ol_id}/attribute.{attribute_name}/{attribute_value}`: All workforce + // identities with a specific attribute value. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{po + // ol_id}/*`: All identities in a workforce identity pool. * + // `principal://iam.googleapis.com/projects/{project_number}/locations/gl + // obal/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value} + // `: A single identity in a workload identity pool. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations + // /global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload + // identity pool group. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations + // /global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{at + // tribute_value}`: All identities in a workload identity pool with a + // certain attribute. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations + // /global/workloadIdentityPools/{pool_id}/*`: All identities in a + // workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An + // email address (plus unique identifier) representing a user that has + // been recently deleted. For example, + // `alice@example.com?uid=123456789012345678901`. If the user is + // recovered, this value reverts to `user:{emailid}` and the recovered + // user retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address + // (plus unique identifier) representing a service account that has been + // recently deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + // If the service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains + // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: + // An email address (plus unique identifier) representing a Google group + // that has been recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is + // recovered, this value reverts to `group:{emailid}` and the recovered + // group retains the role in the binding. * + // `deleted:principal://iam.googleapis.com/locations/global/workforcePool + // s/{pool_id}/subject/{subject_attribute_value}`: Deleted single + // identity in a workforce identity pool. For example, + // `deleted:principal://iam.googleapis.com/locations/global/workforcePool + // s/my-pool-id/subject/my-subject-attribute-value`. + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to the list of `members`, or principals. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Binding) MarshalJSON() ([]byte, error) { + type NoMethod Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: The request message for +// Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// DeleteStatefileRequest: A request to delete a state file passed to a +// 'DeleteStatefile' call. +type DeleteStatefileRequest struct { + // LockId: Required. Lock ID of the lock file to verify that the user + // who is deleting the state file previously locked the Deployment. + LockId int64 `json:"lockId,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "LockId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LockId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeleteStatefileRequest) MarshalJSON() ([]byte, error) { + type NoMethod DeleteStatefileRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Deployment: A Deployment is a group of resources and configs managed +// and provisioned by Infra Manager. +type Deployment struct { + // Annotations: Optional. Arbitrary key-value metadata storage e.g. to + // help client tools identifiy deployments during automation. See + // https://google.aip.dev/148#annotations for details on format and size + // limitations. + Annotations map[string]string `json:"annotations,omitempty"` + + // ArtifactsGcsBucket: Optional. User-defined location of Cloud Build + // logs and artifacts in Google Cloud Storage. Format: + // `gs://{bucket}/{folder}` A default bucket will be bootstrapped if the + // field is not set or empty. Default bucket format: + // `gs://--blueprint-config` Constraints: - The bucket needs to be in + // the same project as the deployment - The path cannot be within the + // path of `gcs_source` - The field cannot be updated, including + // changing its presence + ArtifactsGcsBucket string `json:"artifactsGcsBucket,omitempty"` + + // CreateTime: Output only. Time when the deployment was created. + CreateTime string `json:"createTime,omitempty"` + + // DeleteBuild: Output only. Cloud Build instance UUID associated with + // deleting this deployment. + DeleteBuild string `json:"deleteBuild,omitempty"` + + // DeleteLogs: Output only. Location of Cloud Build logs in Google Cloud + // Storage, populated when deleting this deployment. Format: + // `gs://{bucket}/{object}`. + DeleteLogs string `json:"deleteLogs,omitempty"` + + // DeleteResults: Output only. Location of artifacts from a + // DeleteDeployment operation. + DeleteResults *ApplyResults `json:"deleteResults,omitempty"` + + // ErrorCode: Output only. Error code describing errors that may have + // occurred. + // + // Possible values: + // "ERROR_CODE_UNSPECIFIED" - No error code was specified. + // "REVISION_FAILED" - The revision failed. See Revision for more + // details. + // "CLOUD_BUILD_PERMISSION_DENIED" - Cloud Build failed due to a + // permission issue. + // "DELETE_BUILD_API_FAILED" - Cloud Build job associated with a + // deployment deletion could not be started. + // "DELETE_BUILD_RUN_FAILED" - Cloud Build job associated with a + // deployment deletion was started but failed. + // "BUCKET_CREATION_PERMISSION_DENIED" - Cloud Storage bucket creation + // failed due to a permission issue. + // "BUCKET_CREATION_FAILED" - Cloud Storage bucket creation failed due + // to an issue unrelated to permissions. + ErrorCode string `json:"errorCode,omitempty"` + + // ErrorLogs: Output only. Location of Terraform error logs in Google + // Cloud Storage. Format: `gs://{bucket}/{object}`. + ErrorLogs string `json:"errorLogs,omitempty"` + + // ImportExistingResources: By default, Infra Manager will return a + // failure when Terraform encounters a 409 code (resource conflict + // error) during actuation. If this flag is set to true, Infra Manager + // will instead attempt to automatically import the resource into the + // Terraform state (for supported resource types) and continue + // actuation. Not all resource types are supported, refer to + // documentation. + ImportExistingResources bool `json:"importExistingResources,omitempty"` + + // Labels: User-defined metadata for the deployment. + Labels map[string]string `json:"labels,omitempty"` + + // LatestRevision: Output only. Revision name that was most recently + // applied. Format: + // `projects/{project}/locations/{location}/deployments/{deployment}/ + // revisions/{revision}` + LatestRevision string `json:"latestRevision,omitempty"` + + // LockState: Output only. Current lock state of the deployment. + // + // Possible values: + // "LOCK_STATE_UNSPECIFIED" - The default value. This value is used if + // the lock state is omitted. + // "LOCKED" - The deployment is locked. + // "UNLOCKED" - The deployment is unlocked. + // "LOCKING" - The deployment is being locked. + // "UNLOCKING" - The deployment is being unlocked. + // "LOCK_FAILED" - The deployment has failed to lock. + // "UNLOCK_FAILED" - The deployment has failed to unlock. + LockState string `json:"lockState,omitempty"` + + // Name: Resource name of the deployment. Format: + // `projects/{project}/locations/{location}/deployments/{deployment}` + Name string `json:"name,omitempty"` + + // QuotaValidation: Optional. Input to control quota checks for + // resources in terraform configuration files. There are limited + // resources on which quota validation applies. + // + // Possible values: + // "QUOTA_VALIDATION_UNSPECIFIED" - The default value. QuotaValidation + // on terraform configuration files will be disabled in this case. + // "ENABLED" - Enable computing quotas for resources in terraform + // configuration files to get visibility on resources with insufficient + // quotas. + // "ENFORCED" - Enforce quota checks so deployment fails if there + // isn't sufficient quotas available to deploy resources in terraform + // configuration files. + QuotaValidation string `json:"quotaValidation,omitempty"` + + // ServiceAccount: Optional. User-specified Service Account (SA) + // credentials to be used when actuating resources. Format: + // `projects/{projectID}/serviceAccounts/{serviceAccount}` + ServiceAccount string `json:"serviceAccount,omitempty"` + + // State: Output only. Current state of the deployment. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "CREATING" - The deployment is being created. + // "ACTIVE" - The deployment is healthy. + // "UPDATING" - The deployment is being updated. + // "DELETING" - The deployment is being deleted. + // "FAILED" - The deployment has encountered an unexpected error. + // "SUSPENDED" - The deployment is no longer being actively + // reconciled. This may be the result of recovering the project after + // deletion. + // "DELETED" - The deployment has been deleted. + State string `json:"state,omitempty"` + + // StateDetail: Output only. Additional information regarding the + // current state. + StateDetail string `json:"stateDetail,omitempty"` + + // TerraformBlueprint: A blueprint described using Terraform's HashiCorp + // Configuration Language as a root module. + TerraformBlueprint *TerraformBlueprint `json:"terraformBlueprint,omitempty"` + + // TfErrors: Output only. Errors encountered when deleting this + // deployment. Errors are truncated to 10 entries, see `delete_results` + // and `error_logs` for full details. + TfErrors []*TerraformError `json:"tfErrors,omitempty"` + + // TfVersion: Output only. The current Terraform version set on the + // deployment. It is in the format of "Major.Minor.Patch", for example, + // "1.3.10". + TfVersion string `json:"tfVersion,omitempty"` + + // TfVersionConstraint: Optional. The user-specified Terraform version + // constraint. Example: "=1.3.10". + TfVersionConstraint string `json:"tfVersionConstraint,omitempty"` + + // UpdateTime: Output only. Time when the deployment was last modified. + UpdateTime string `json:"updateTime,omitempty"` + + // WorkerPool: Optional. The user-specified Cloud Build worker pool + // resource in which the Cloud Build job will execute. Format: + // `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. + // If this field is unspecified, the default Cloud Build worker pool + // will be used. + WorkerPool string `json:"workerPool,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 *Deployment) MarshalJSON() ([]byte, error) { + type NoMethod Deployment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeploymentOperationMetadata: Ephemeral metadata content describing +// the state of a deployment operation. +type DeploymentOperationMetadata struct { + // ApplyResults: Outputs and artifacts from applying a deployment. + ApplyResults *ApplyResults `json:"applyResults,omitempty"` + + // Build: Output only. Cloud Build instance UUID associated with this + // operation. + Build string `json:"build,omitempty"` + + // Logs: Output only. Location of Deployment operations logs in + // `gs://{bucket}/{object}` format. + Logs string `json:"logs,omitempty"` + + // Step: The current step the deployment operation is running. + // + // Possible values: + // "DEPLOYMENT_STEP_UNSPECIFIED" - Unspecified deployment step + // "PREPARING_STORAGE_BUCKET" - Infra Manager is creating a Google + // Cloud Storage bucket to store artifacts and metadata about the + // deployment and revision + // "DOWNLOADING_BLUEPRINT" - Downloading the blueprint onto the Google + // Cloud Storage bucket + // "RUNNING_TF_INIT" - Initializing Terraform using `terraform init` + // "RUNNING_TF_PLAN" - Running `terraform plan` + // "RUNNING_TF_APPLY" - Actuating resources using Terraform using + // `terraform apply` + // "RUNNING_TF_DESTROY" - Destroying resources using Terraform using + // `terraform destroy` + // "RUNNING_TF_VALIDATE" - Validating the uploaded TF state file when + // unlocking a deployment + // "UNLOCKING_DEPLOYMENT" - Unlocking a deployment + // "SUCCEEDED" - Operation was successful + // "FAILED" - Operation failed + // "VALIDATING_REPOSITORY" - Validating the provided repository. + // "RUNNING_QUOTA_VALIDATION" - Running quota validation + Step string `json:"step,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApplyResults") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApplyResults") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeploymentOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod DeploymentOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// ExportDeploymentStatefileRequest: A request to export a state file +// passed to a 'ExportDeploymentStatefile' call. +type ExportDeploymentStatefileRequest struct { + // Draft: Optional. If this flag is set to true, the exported deployment + // state file will be the draft state. This will enable the draft file + // to be validated before copying it over to the working state on + // unlock. + Draft bool `json:"draft,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Draft") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Draft") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExportDeploymentStatefileRequest) MarshalJSON() ([]byte, error) { + type NoMethod ExportDeploymentStatefileRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExportPreviewResultRequest: A request to export preview results. +type ExportPreviewResultRequest struct { +} + +// ExportPreviewResultResponse: A response to `ExportPreviewResult` +// call. Contains preview results. +type ExportPreviewResultResponse struct { + // Result: Output only. Signed URLs for accessing the plan files. + Result *PreviewResult `json:"result,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Result") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Result") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExportPreviewResultResponse) MarshalJSON() ([]byte, error) { + type NoMethod ExportPreviewResultResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExportRevisionStatefileRequest: A request to export a state file +// passed to a 'ExportRevisionStatefile' call. +type ExportRevisionStatefileRequest struct { +} + +// Expr: Represents a textual expression in the Common Expression +// Language (CEL) syntax. CEL is a C-like expression language. The +// syntax and semantics of CEL are documented at +// https://github.com/google/cel-spec. Example (Comparison): title: +// "Summary size limit" description: "Determines if a summary is less +// than 100 chars" expression: "document.summary.size() < 100" Example +// (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly +// visible" expression: "document.type != 'private' && document.type != +// 'internal'" Example (Data Manipulation): title: "Notification string" +// description: "Create a notification string with a timestamp." +// expression: "'New message received at ' + +// string(document.create_time)" The exact variables and functions that +// may be referenced within an expression are determined by the service +// that evaluates it. See the service documentation for additional +// information. +type Expr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common + // Expression Language syntax. + Expression string `json:"expression,omitempty"` + + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Expr) MarshalJSON() ([]byte, error) { + type NoMethod Expr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GitSource: A set of files in a Git repository. +type GitSource struct { + // Directory: Optional. Subdirectory inside the repository. Example: + // 'staging/my-package' + Directory string `json:"directory,omitempty"` + + // Ref: Optional. Git reference (e.g. branch or tag). + Ref string `json:"ref,omitempty"` + + // Repo: Optional. Repository URL. Example: + // 'https://github.com/kubernetes/examples.git' + Repo string `json:"repo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Directory") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Directory") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GitSource) MarshalJSON() ([]byte, error) { + type NoMethod GitSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImportStatefileRequest: A request to import a state file passed to a +// 'ImportStatefile' call. +type ImportStatefileRequest struct { + // LockId: Required. Lock ID of the lock file to verify that the user + // who is importing the state file previously locked the Deployment. + LockId int64 `json:"lockId,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "LockId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LockId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ImportStatefileRequest) MarshalJSON() ([]byte, error) { + type NoMethod ImportStatefileRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ListDeploymentsResponse struct { + // Deployments: List of Deployments. + Deployments []*Deployment `json:"deployments,omitempty"` + + // NextPageToken: Token to be supplied to the next ListDeployments + // request via `page_token` to obtain the next set of results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Deployments") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Deployments") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListDeploymentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListDeploymentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListPreviewsResponse: A response to a `ListPreviews` call. Contains a +// list of Previews. +type ListPreviewsResponse struct { + // NextPageToken: Token to be supplied to the next ListPreviews request + // via `page_token` to obtain the next set of results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Previews: List of Previewss. + Previews []*Preview `json:"previews,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListPreviewsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPreviewsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListResourcesResponse: A response to a 'ListResources' call. Contains +// a list of Resources. +type ListResourcesResponse struct { + // NextPageToken: A token to request the next page of resources from the + // 'ListResources' method. The value of an empty string means that there + // are no more resources to return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Resources: List of Resourcess. + Resources []*Resource `json:"resources,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListResourcesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListResourcesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListRevisionsResponse: A response to a 'ListRevisions' call. Contains +// a list of Revisions. +type ListRevisionsResponse struct { + // NextPageToken: A token to request the next page of resources from the + // 'ListRevisions' method. The value of an empty string means that there + // are no more resources to return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Revisions: List of Revisions. + Revisions []*Revision `json:"revisions,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListRevisionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListRevisionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListTerraformVersionsResponse: The response message for the +// `ListTerraformVersions` method. +type ListTerraformVersionsResponse struct { + // NextPageToken: Token to be supplied to the next ListTerraformVersions + // request via `page_token` to obtain the next set of results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // TerraformVersions: List of TerraformVersions. + TerraformVersions []*TerraformVersion `json:"terraformVersions,omitempty"` + + // Unreachable: Unreachable resources, if any. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListTerraformVersionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListTerraformVersionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents a Google Cloud location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LockDeploymentRequest: A request to lock a deployment passed to a +// 'LockDeployment' call. +type LockDeploymentRequest struct { +} + +// LockInfo: Details about the lock which locked the deployment. +type LockInfo struct { + // CreateTime: Time that the lock was taken. + CreateTime string `json:"createTime,omitempty"` + + // Info: Extra information to store with the lock, provided by the + // caller. + Info string `json:"info,omitempty"` + + // LockId: Unique ID for the lock to be overridden with generation ID in + // the backend. + LockId int64 `json:"lockId,omitempty,string"` + + // Operation: Terraform operation, provided by the caller. + Operation string `json:"operation,omitempty"` + + // Version: Terraform version + Version string `json:"version,omitempty"` + + // Who: user@hostname when available + Who string `json:"who,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LockInfo) MarshalJSON() ([]byte, error) { + type NoMethod LockInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. Time when the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // DeploymentMetadata: Output only. Metadata about the deployment + // operation state. + DeploymentMetadata *DeploymentOperationMetadata `json:"deploymentMetadata,omitempty"` + + // EndTime: Output only. Time when the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // PreviewMetadata: Output only. Metadata about the preview operation + // state. + PreviewMetadata *PreviewOperationMetadata `json:"previewMetadata,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources. A `Policy` is a +// collection of `bindings`. A `binding` binds one or more `members`, or +// principals, to a single `role`. Principals can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// `role` is a named list of permissions; each `role` can be an IAM +// predefined role or a user-created custom role. For some types of +// Google Cloud resources, a `binding` can also specify a `condition`, +// which is a logical expression that allows access to a resource only +// if the expression evaluates to `true`. A condition can add +// constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** ``` { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Preview: A preview represents a set of actions Infra Manager would +// perform to move the resources towards the desired state as specified +// in the configuration. +type Preview struct { + // ArtifactsGcsBucket: Optional. User-defined location of Cloud Build + // logs, artifacts, and in Google Cloud Storage. Format: + // `gs://{bucket}/{folder}` A default bucket will be bootstrapped if the + // field is not set or empty Default Bucket Format: + // `gs://--blueprint-config` Constraints: - The bucket needs to be in + // the same project as the deployment - The path cannot be within the + // path of `gcs_source` If omitted and deployment resource ref provided + // has artifacts_gcs_bucket defined, that artifact bucket is used. + ArtifactsGcsBucket string `json:"artifactsGcsBucket,omitempty"` + + // Build: Output only. Cloud Build instance UUID associated with this + // preview. + Build string `json:"build,omitempty"` + + // CreateTime: Output only. Time the preview was created. + CreateTime string `json:"createTime,omitempty"` + + // Deployment: Optional. Optional deployment reference. If specified, + // the preview will be performed using the provided deployment's current + // state and use any relevant fields from the deployment unless + // explicitly specified in the preview create request. + Deployment string `json:"deployment,omitempty"` + + // ErrorCode: Output only. Code describing any errors that may have + // occurred. + // + // Possible values: + // "ERROR_CODE_UNSPECIFIED" - No error code was specified. + // "CLOUD_BUILD_PERMISSION_DENIED" - Cloud Build failed due to a + // permissions issue. + // "BUCKET_CREATION_PERMISSION_DENIED" - Cloud Storage bucket failed + // to create due to a permissions issue. + // "BUCKET_CREATION_FAILED" - Cloud Storage bucket failed for a + // non-permissions-related issue. + // "DEPLOYMENT_LOCK_ACQUIRE_FAILED" - Acquiring lock on provided + // deployment reference failed. + // "PREVIEW_BUILD_API_FAILED" - Preview encountered an error when + // trying to access Cloud Build API. + // "PREVIEW_BUILD_RUN_FAILED" - Preview created a build but build + // failed and logs were generated. + ErrorCode string `json:"errorCode,omitempty"` + + // ErrorLogs: Output only. Link to tf-error.ndjson file, which contains + // the full list of the errors encountered during a Terraform preview. + // Format: `gs://{bucket}/{object}`. + ErrorLogs string `json:"errorLogs,omitempty"` + + // ErrorStatus: Output only. Additional information regarding the + // current state. + ErrorStatus *Status `json:"errorStatus,omitempty"` + + // Labels: Optional. User-defined labels for the preview. + Labels map[string]string `json:"labels,omitempty"` + + // Logs: Output only. Location of preview logs in + // `gs://{bucket}/{object}` format. + Logs string `json:"logs,omitempty"` + + // Name: Identifier. Resource name of the preview. Resource name can be + // user provided or server generated ID if unspecified. Format: + // `projects/{project}/locations/{location}/previews/{preview}` + Name string `json:"name,omitempty"` + + // PreviewArtifacts: Output only. Artifacts from preview. + PreviewArtifacts *PreviewArtifacts `json:"previewArtifacts,omitempty"` + + // PreviewMode: Optional. Current mode of preview. + // + // Possible values: + // "PREVIEW_MODE_UNSPECIFIED" - Unspecified policy, default mode will + // be used. + // "DEFAULT" - DEFAULT mode generates an execution plan for + // reconciling current resource state into expected resource state. + // "DELETE" - DELETE mode generates as execution plan for destroying + // current resources. + PreviewMode string `json:"previewMode,omitempty"` + + // ServiceAccount: Optional. User-specified Service Account (SA) + // credentials to be used when previewing resources. Format: + // `projects/{projectID}/serviceAccounts/{serviceAccount}` + ServiceAccount string `json:"serviceAccount,omitempty"` + + // State: Output only. Current state of the preview. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is unknown. + // "CREATING" - The preview is being created. + // "SUCCEEDED" - The preview has succeeded. + // "APPLYING" - The preview is being applied. + // "STALE" - The preview is stale. A preview can become stale if a + // revision has been applied after this preview was created. + // "DELETING" - The preview is being deleted. + // "FAILED" - The preview has encountered an unexpected error. + // "DELETED" - The preview has been deleted. + State string `json:"state,omitempty"` + + // TerraformBlueprint: The terraform blueprint to preview. + TerraformBlueprint *TerraformBlueprint `json:"terraformBlueprint,omitempty"` + + // TfErrors: Output only. Summary of errors encountered during Terraform + // preview. It has a size limit of 10, i.e. only top 10 errors will be + // summarized here. + TfErrors []*TerraformError `json:"tfErrors,omitempty"` + + // WorkerPool: Optional. The user-specified Worker Pool resource in + // which the Cloud Build job will execute. Format + // projects/{project}/locations/{location}/workerPools/{workerPoolId} If + // this field is unspecified, the default Cloud Build worker pool will + // be used. If omitted and deployment resource ref provided has + // worker_pool defined, that worker pool is used. + WorkerPool string `json:"workerPool,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ArtifactsGcsBucket") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ArtifactsGcsBucket") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Preview) MarshalJSON() ([]byte, error) { + type NoMethod Preview + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PreviewArtifacts: Artifacts created by preview. +type PreviewArtifacts struct { + // Artifacts: Output only. Location of artifacts in Google Cloud + // Storage. Format: `gs://{bucket}/{object}` + Artifacts string `json:"artifacts,omitempty"` + + // Content: Output only. Location of a blueprint copy and other content + // in Google Cloud Storage. Format: `gs://{bucket}/{object}` + Content string `json:"content,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Artifacts") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Artifacts") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PreviewArtifacts) MarshalJSON() ([]byte, error) { + type NoMethod PreviewArtifacts + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PreviewOperationMetadata: Ephemeral metadata content describing the +// state of a preview operation. +type PreviewOperationMetadata struct { + // Build: Output only. Cloud Build instance UUID associated with this + // preview. + Build string `json:"build,omitempty"` + + // Logs: Output only. Location of preview logs in + // `gs://{bucket}/{object}` format. + Logs string `json:"logs,omitempty"` + + // PreviewArtifacts: Artifacts from preview. + PreviewArtifacts *PreviewArtifacts `json:"previewArtifacts,omitempty"` + + // Step: The current step the preview operation is running. + // + // Possible values: + // "PREVIEW_STEP_UNSPECIFIED" - Unspecified preview step. + // "PREPARING_STORAGE_BUCKET" - Infra Manager is creating a Google + // Cloud Storage bucket to store artifacts and metadata about the + // preview. + // "DOWNLOADING_BLUEPRINT" - Downloading the blueprint onto the Google + // Cloud Storage bucket. + // "RUNNING_TF_INIT" - Initializing Terraform using `terraform init`. + // "RUNNING_TF_PLAN" - Running `terraform plan`. + // "FETCHING_DEPLOYMENT" - Fetching a deployment. + // "LOCKING_DEPLOYMENT" - Locking a deployment. + // "UNLOCKING_DEPLOYMENT" - Unlocking a deployment. + // "SUCCEEDED" - Operation was successful. + // "FAILED" - Operation failed. + // "VALIDATING_REPOSITORY" - Validating the provided repository. + Step string `json:"step,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Build") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Build") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod PreviewOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PreviewResult: Contains a signed Cloud Storage URLs. +type PreviewResult struct { + // BinarySignedUri: Output only. Plan binary signed URL + BinarySignedUri string `json:"binarySignedUri,omitempty"` + + // JsonSignedUri: Output only. Plan JSON signed URL + JsonSignedUri string `json:"jsonSignedUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BinarySignedUri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BinarySignedUri") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PreviewResult) MarshalJSON() ([]byte, error) { + type NoMethod PreviewResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Resource: Resource represents a Google Cloud Platform resource +// actuated by IM. Resources are child resources of Revisions. +type Resource struct { + // CaiAssets: Output only. Map of Cloud Asset Inventory (CAI) type to + // CAI info (e.g. CAI ID). CAI type format follows + // https://cloud.google.com/asset-inventory/docs/supported-asset-types + CaiAssets map[string]ResourceCAIInfo `json:"caiAssets,omitempty"` + + // Intent: Output only. Intent of the resource. + // + // Possible values: + // "INTENT_UNSPECIFIED" - The default value. This value is used if the + // intent is omitted. + // "CREATE" - Infra Manager will create this Resource. + // "UPDATE" - Infra Manager will update this Resource. + // "DELETE" - Infra Manager will delete this Resource. + // "RECREATE" - Infra Manager will destroy and recreate this Resource. + // "UNCHANGED" - Infra Manager will leave this Resource untouched. + Intent string `json:"intent,omitempty"` + + // Name: Output only. Resource name. Format: + // `projects/{project}/locations/{location}/deployments/{deployment}/revi + // sions/{revision}/resources/{resource}` + Name string `json:"name,omitempty"` + + // State: Output only. Current state of the resource. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "PLANNED" - Resource has been planned for reconcile. + // "IN_PROGRESS" - Resource is actively reconciling into the intended + // state. + // "RECONCILED" - Resource has reconciled to intended state. + // "FAILED" - Resource failed to reconcile. + State string `json:"state,omitempty"` + + // TerraformInfo: Output only. Terraform-specific info if this resource + // was created using Terraform. + TerraformInfo *ResourceTerraformInfo `json:"terraformInfo,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CaiAssets") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CaiAssets") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Resource) MarshalJSON() ([]byte, error) { + type NoMethod Resource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResourceCAIInfo: CAI info of a Resource. +type ResourceCAIInfo struct { + // FullResourceName: CAI resource name in the format following + // https://cloud.google.com/apis/design/resource_names#full_resource_name + FullResourceName string `json:"fullResourceName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FullResourceName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FullResourceName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ResourceCAIInfo) MarshalJSON() ([]byte, error) { + type NoMethod ResourceCAIInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResourceTerraformInfo: Terraform info of a Resource. +type ResourceTerraformInfo struct { + // Address: TF resource address that uniquely identifies this resource + // within this deployment. + Address string `json:"address,omitempty"` + + // Id: ID attribute of the TF resource + Id string `json:"id,omitempty"` + + // Type: TF resource type + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Address") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Address") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ResourceTerraformInfo) MarshalJSON() ([]byte, error) { + type NoMethod ResourceTerraformInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Revision: A child resource of a Deployment generated by a +// 'CreateDeployment' or 'UpdateDeployment' call. Each Revision contains +// metadata pertaining to a snapshot of a particular Deployment. +type Revision struct { + // Action: Output only. The action which created this revision + // + // Possible values: + // "ACTION_UNSPECIFIED" - The default value. This value is used if the + // action is omitted. + // "CREATE" - The revision was generated by creating a deployment. + // "UPDATE" - The revision was generated by updating a deployment. + // "DELETE" - The revision was deleted. + Action string `json:"action,omitempty"` + + // ApplyResults: Output only. Outputs and artifacts from applying a + // deployment. + ApplyResults *ApplyResults `json:"applyResults,omitempty"` + + // Build: Output only. Cloud Build instance UUID associated with this + // revision. + Build string `json:"build,omitempty"` + + // CreateTime: Output only. Time when the revision was created. + CreateTime string `json:"createTime,omitempty"` + + // ErrorCode: Output only. Code describing any errors that may have + // occurred. + // + // Possible values: + // "ERROR_CODE_UNSPECIFIED" - No error code was specified. + // "CLOUD_BUILD_PERMISSION_DENIED" - Cloud Build failed due to a + // permission issue. + // "APPLY_BUILD_API_FAILED" - Cloud Build job associated with creating + // or updating a deployment could not be started. + // "APPLY_BUILD_RUN_FAILED" - Cloud Build job associated with creating + // or updating a deployment was started but failed. + // "QUOTA_VALIDATION_FAILED" - quota validation failed for one or more + // resources in terraform configuration files. + ErrorCode string `json:"errorCode,omitempty"` + + // ErrorLogs: Output only. Location of Terraform error logs in Google + // Cloud Storage. Format: `gs://{bucket}/{object}`. + ErrorLogs string `json:"errorLogs,omitempty"` + + // ImportExistingResources: Output only. By default, Infra Manager will + // return a failure when Terraform encounters a 409 code (resource + // conflict error) during actuation. If this flag is set to true, Infra + // Manager will instead attempt to automatically import the resource + // into the Terraform state (for supported resource types) and continue + // actuation. Not all resource types are supported, refer to + // documentation. + ImportExistingResources bool `json:"importExistingResources,omitempty"` + + // Logs: Output only. Location of Revision operation logs in + // `gs://{bucket}/{object}` format. + Logs string `json:"logs,omitempty"` + + // Name: Revision name. Format: + // `projects/{project}/locations/{location}/deployments/{deployment}/ + // revisions/{revision}` + Name string `json:"name,omitempty"` + + // QuotaValidation: Optional. Input to control quota checks for + // resources in terraform configuration files. There are limited + // resources on which quota validation applies. + // + // Possible values: + // "QUOTA_VALIDATION_UNSPECIFIED" - The default value. QuotaValidation + // on terraform configuration files will be disabled in this case. + // "ENABLED" - Enable computing quotas for resources in terraform + // configuration files to get visibility on resources with insufficient + // quotas. + // "ENFORCED" - Enforce quota checks so deployment fails if there + // isn't sufficient quotas available to deploy resources in terraform + // configuration files. + QuotaValidation string `json:"quotaValidation,omitempty"` + + // QuotaValidationResults: Output only. Cloud Storage path containing + // quota validation results. This field is set when a user sets + // Deployment.quota_validation field to ENABLED or ENFORCED. Format: + // `gs://{bucket}/{object}`. + QuotaValidationResults string `json:"quotaValidationResults,omitempty"` + + // ServiceAccount: Output only. User-specified Service Account (SA) to + // be used as credential to manage resources. Format: + // `projects/{projectID}/serviceAccounts/{serviceAccount}` + ServiceAccount string `json:"serviceAccount,omitempty"` + + // State: Output only. Current state of the revision. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "APPLYING" - The revision is being applied. + // "APPLIED" - The revision was applied successfully. + // "FAILED" - The revision could not be applied successfully. + State string `json:"state,omitempty"` + + // StateDetail: Output only. Additional info regarding the current + // state. + StateDetail string `json:"stateDetail,omitempty"` + + // TerraformBlueprint: Output only. A blueprint described using + // Terraform's HashiCorp Configuration Language as a root module. + TerraformBlueprint *TerraformBlueprint `json:"terraformBlueprint,omitempty"` + + // TfErrors: Output only. Errors encountered when creating or updating + // this deployment. Errors are truncated to 10 entries, see + // `delete_results` and `error_logs` for full details. + TfErrors []*TerraformError `json:"tfErrors,omitempty"` + + // TfVersion: Output only. The version of Terraform used to create the + // Revision. It is in the format of "Major.Minor.Patch", for example, + // "1.3.10". + TfVersion string `json:"tfVersion,omitempty"` + + // TfVersionConstraint: Output only. The user-specified Terraform + // version constraint. Example: "=1.3.10". + TfVersionConstraint string `json:"tfVersionConstraint,omitempty"` + + // UpdateTime: Output only. Time when the revision was last modified. + UpdateTime string `json:"updateTime,omitempty"` + + // WorkerPool: Output only. The user-specified Cloud Build worker pool + // resource in which the Cloud Build job will execute. Format: + // `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. + // If this field is unspecified, the default Cloud Build worker pool + // will be used. + WorkerPool string `json:"workerPool,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Action") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Revision) MarshalJSON() ([]byte, error) { + type NoMethod Revision + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Statefile: Contains info about a Terraform state file +type Statefile struct { + // SignedUri: Output only. Cloud Storage signed URI used for downloading + // or uploading the state file. + SignedUri string `json:"signedUri,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "SignedUri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SignedUri") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Statefile) MarshalJSON() ([]byte, error) { + type NoMethod Statefile + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TerraformBlueprint: TerraformBlueprint describes the source of a +// Terraform root module which describes the resources and configs to be +// deployed. +type TerraformBlueprint struct { + // GcsSource: Required. URI of an object in Google Cloud Storage. + // Format: `gs://{bucket}/{object}` URI may also specify an object + // version for zipped objects. Format: + // `gs://{bucket}/{object}#{version}` + GcsSource string `json:"gcsSource,omitempty"` + + // GitSource: Required. URI of a public Git repo. + GitSource *GitSource `json:"gitSource,omitempty"` + + // InputValues: Input variable values for the Terraform blueprint. + InputValues map[string]TerraformVariable `json:"inputValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcsSource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GcsSource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TerraformBlueprint) MarshalJSON() ([]byte, error) { + type NoMethod TerraformBlueprint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TerraformError: Errors encountered during actuation using Terraform +type TerraformError struct { + // Error: Original error response from underlying Google API, if + // available. + Error *Status `json:"error,omitempty"` + + // ErrorDescription: A human-readable error description. + ErrorDescription string `json:"errorDescription,omitempty"` + + // HttpResponseCode: HTTP response code returned from Google Cloud + // Platform APIs when Terraform fails to provision the resource. If + // unset or 0, no HTTP response code was returned by Terraform. + HttpResponseCode int64 `json:"httpResponseCode,omitempty"` + + // ResourceAddress: Address of the resource associated with the error, + // e.g. `google_compute_network.vpc_network`. + ResourceAddress string `json:"resourceAddress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Error") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Error") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TerraformError) MarshalJSON() ([]byte, error) { + type NoMethod TerraformError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TerraformOutput: Describes a Terraform output. +type TerraformOutput struct { + // Sensitive: Identifies whether Terraform has set this output as a + // potential sensitive value. + Sensitive bool `json:"sensitive,omitempty"` + + // Value: Value of output. + Value interface{} `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Sensitive") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Sensitive") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TerraformOutput) MarshalJSON() ([]byte, error) { + type NoMethod TerraformOutput + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TerraformVariable: A Terraform input variable. +type TerraformVariable struct { + // InputValue: Input variable value. + InputValue interface{} `json:"inputValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InputValue") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InputValue") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TerraformVariable) MarshalJSON() ([]byte, error) { + type NoMethod TerraformVariable + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TerraformVersion: A TerraformVersion represents the support state the +// corresponding Terraform version. +type TerraformVersion struct { + // DeprecateTime: Output only. When the version is deprecated. + DeprecateTime string `json:"deprecateTime,omitempty"` + + // Name: Identifier. The version name is in the format: + // 'projects/{project_id}/locations/{location}/terraformVersions/{terrafo + // rm_version}'. + Name string `json:"name,omitempty"` + + // ObsoleteTime: Output only. When the version is obsolete. + ObsoleteTime string `json:"obsoleteTime,omitempty"` + + // State: Output only. The state of the version, ACTIVE, DEPRECATED or + // OBSOLETE. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "ACTIVE" - The version is actively supported. + // "DEPRECATED" - The version is deprecated. + // "OBSOLETE" - The version is obsolete. + State string `json:"state,omitempty"` + + // SupportTime: Output only. When the version is supported. + SupportTime string `json:"supportTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DeprecateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeprecateTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TerraformVersion) MarshalJSON() ([]byte, error) { + type NoMethod TerraformVersion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UnlockDeploymentRequest: A request to unlock a state file passed to a +// 'UnlockDeployment' call. +type UnlockDeploymentRequest struct { + // LockId: Required. Lock ID of the lock file to be unlocked. + LockId int64 `json:"lockId,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "LockId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LockId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UnlockDeploymentRequest) MarshalJSON() ([]byte, error) { + type NoMethod UnlockDeploymentRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "config.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Location{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "config.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "config.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "config.projects.locations.deployments.create": + +type ProjectsLocationsDeploymentsCreateCall struct { + s *Service + parent string + deployment *Deployment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Deployment. +// +// - parent: The parent in whose context the Deployment is created. The +// parent value is in the format: +// 'projects/{project_id}/locations/{location}'. +func (r *ProjectsLocationsDeploymentsService) Create(parent string, deployment *Deployment) *ProjectsLocationsDeploymentsCreateCall { + c := &ProjectsLocationsDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.deployment = deployment + return c +} + +// DeploymentId sets the optional parameter "deploymentId": Required. +// The Deployment ID. +func (c *ProjectsLocationsDeploymentsCreateCall) DeploymentId(deploymentId string) *ProjectsLocationsDeploymentsCreateCall { + c.urlParams_.Set("deploymentId", deploymentId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsDeploymentsCreateCall) RequestId(requestId string) *ProjectsLocationsDeploymentsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDeploymentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsCreateCall { + 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 *ProjectsLocationsDeploymentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsCreateCall { + 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 *ProjectsLocationsDeploymentsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsCreateCall) 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.deployment) + 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}/deployments") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.deployments.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Deployment.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments", + // "httpMethod": "POST", + // "id": "config.projects.locations.deployments.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "deploymentId": { + // "description": "Required. The Deployment ID.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent in whose context the Deployment is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/deployments", + // "request": { + // "$ref": "Deployment" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.delete": + +type ProjectsLocationsDeploymentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Deployment. +// +// - name: The name of the Deployment in the format: +// 'projects/{project_id}/locations/{location}/deployments/{deployment} +// '. +func (r *ProjectsLocationsDeploymentsService) Delete(name string) *ProjectsLocationsDeploymentsDeleteCall { + c := &ProjectsLocationsDeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// DeletePolicy sets the optional parameter "deletePolicy": Policy on +// how resources actuated by the deployment should be deleted. If +// unspecified, the default behavior is to delete the underlying +// resources. +// +// Possible values: +// +// "DELETE_POLICY_UNSPECIFIED" - Unspecified policy, resources will be +// +// deleted. +// +// "DELETE" - Deletes resources actuated by the deployment. +// "ABANDON" - Abandons resources and only deletes the deployment and +// +// its metadata. +func (c *ProjectsLocationsDeploymentsDeleteCall) DeletePolicy(deletePolicy string) *ProjectsLocationsDeploymentsDeleteCall { + c.urlParams_.Set("deletePolicy", deletePolicy) + return c +} + +// Force sets the optional parameter "force": If set to true, any +// revisions for this deployment will also be deleted. (Otherwise, the +// request will only work if the deployment has no revisions.) +func (c *ProjectsLocationsDeploymentsDeleteCall) Force(force bool) *ProjectsLocationsDeploymentsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsDeploymentsDeleteCall) RequestId(requestId string) *ProjectsLocationsDeploymentsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDeploymentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsDeleteCall { + 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 *ProjectsLocationsDeploymentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsDeleteCall { + 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 *ProjectsLocationsDeploymentsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.deployments.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Deployment.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}", + // "httpMethod": "DELETE", + // "id": "config.projects.locations.deployments.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "deletePolicy": { + // "description": "Optional. Policy on how resources actuated by the deployment should be deleted. If unspecified, the default behavior is to delete the underlying resources.", + // "enum": [ + // "DELETE_POLICY_UNSPECIFIED", + // "DELETE", + // "ABANDON" + // ], + // "enumDescriptions": [ + // "Unspecified policy, resources will be deleted.", + // "Deletes resources actuated by the deployment.", + // "Abandons resources and only deletes the deployment and its metadata." + // ], + // "location": "query", + // "type": "string" + // }, + // "force": { + // "description": "Optional. If set to true, any revisions for this deployment will also be deleted. (Otherwise, the request will only work if the deployment has no revisions.)", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Required. The name of the Deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.deleteState": + +type ProjectsLocationsDeploymentsDeleteStateCall struct { + s *Service + name string + deletestatefilerequest *DeleteStatefileRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DeleteState: Deletes Terraform state file in a given deployment. +// +// - name: The name of the deployment in the format: +// 'projects/{project_id}/locations/{location}/deployments/{deployment} +// '. +func (r *ProjectsLocationsDeploymentsService) DeleteState(name string, deletestatefilerequest *DeleteStatefileRequest) *ProjectsLocationsDeploymentsDeleteStateCall { + c := &ProjectsLocationsDeploymentsDeleteStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.deletestatefilerequest = deletestatefilerequest + 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 *ProjectsLocationsDeploymentsDeleteStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsDeleteStateCall { + 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 *ProjectsLocationsDeploymentsDeleteStateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsDeleteStateCall { + 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 *ProjectsLocationsDeploymentsDeleteStateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsDeleteStateCall) 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.deletestatefilerequest) + 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}:deleteState") + 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 "config.projects.locations.deployments.deleteState" 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 *ProjectsLocationsDeploymentsDeleteStateCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes Terraform state file in a given deployment.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:deleteState", + // "httpMethod": "POST", + // "id": "config.projects.locations.deployments.deleteState", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:deleteState", + // "request": { + // "$ref": "DeleteStatefileRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.exportLock": + +type ProjectsLocationsDeploymentsExportLockCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ExportLock: Exports the lock info on a locked deployment. +// +// - name: The name of the deployment in the format: +// 'projects/{project_id}/locations/{location}/deployments/{deployment} +// '. +func (r *ProjectsLocationsDeploymentsService) ExportLock(name string) *ProjectsLocationsDeploymentsExportLockCall { + c := &ProjectsLocationsDeploymentsExportLockCall{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 *ProjectsLocationsDeploymentsExportLockCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsExportLockCall { + 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 *ProjectsLocationsDeploymentsExportLockCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsExportLockCall { + 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 *ProjectsLocationsDeploymentsExportLockCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsExportLockCall { + 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 *ProjectsLocationsDeploymentsExportLockCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsExportLockCall) 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}:exportLock") + 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 "config.projects.locations.deployments.exportLock" call. +// Exactly one of *LockInfo or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *LockInfo.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsExportLockCall) Do(opts ...googleapi.CallOption) (*LockInfo, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &LockInfo{ + 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": "Exports the lock info on a locked deployment.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:exportLock", + // "httpMethod": "GET", + // "id": "config.projects.locations.deployments.exportLock", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:exportLock", + // "response": { + // "$ref": "LockInfo" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.exportState": + +type ProjectsLocationsDeploymentsExportStateCall struct { + s *Service + parent string + exportdeploymentstatefilerequest *ExportDeploymentStatefileRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ExportState: Exports Terraform state file from a given deployment. +// +// - parent: The parent in whose context the statefile is listed. The +// parent value is in the format: +// 'projects/{project_id}/locations/{location}/deployments/{deployment} +// '. +func (r *ProjectsLocationsDeploymentsService) ExportState(parent string, exportdeploymentstatefilerequest *ExportDeploymentStatefileRequest) *ProjectsLocationsDeploymentsExportStateCall { + c := &ProjectsLocationsDeploymentsExportStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.exportdeploymentstatefilerequest = exportdeploymentstatefilerequest + 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 *ProjectsLocationsDeploymentsExportStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsExportStateCall { + 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 *ProjectsLocationsDeploymentsExportStateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsExportStateCall { + 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 *ProjectsLocationsDeploymentsExportStateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsExportStateCall) 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.exportdeploymentstatefilerequest) + 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}:exportState") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.deployments.exportState" call. +// Exactly one of *Statefile or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Statefile.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsExportStateCall) Do(opts ...googleapi.CallOption) (*Statefile, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Statefile{ + 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": "Exports Terraform state file from a given deployment.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:exportState", + // "httpMethod": "POST", + // "id": "config.projects.locations.deployments.exportState", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent in whose context the statefile is listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}:exportState", + // "request": { + // "$ref": "ExportDeploymentStatefileRequest" + // }, + // "response": { + // "$ref": "Statefile" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.get": + +type ProjectsLocationsDeploymentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details about a Deployment. +// +// - name: The name of the deployment. Format: +// 'projects/{project_id}/locations/{location}/deployments/{deployment} +// '. +func (r *ProjectsLocationsDeploymentsService) Get(name string) *ProjectsLocationsDeploymentsGetCall { + c := &ProjectsLocationsDeploymentsGetCall{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 *ProjectsLocationsDeploymentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsGetCall { + 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 *ProjectsLocationsDeploymentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsGetCall { + 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 *ProjectsLocationsDeploymentsGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsGetCall { + 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 *ProjectsLocationsDeploymentsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsGetCall) 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 "config.projects.locations.deployments.get" call. +// Exactly one of *Deployment or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Deployment.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*Deployment, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Deployment{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details about a Deployment.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}", + // "httpMethod": "GET", + // "id": "config.projects.locations.deployments.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the deployment. Format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Deployment" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.getIamPolicy": + +type ProjectsLocationsDeploymentsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsDeploymentsService) GetIamPolicy(resource string) *ProjectsLocationsDeploymentsGetIamPolicyCall { + c := &ProjectsLocationsDeploymentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDeploymentsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsGetIamPolicyCall { + 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 *ProjectsLocationsDeploymentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsGetIamPolicyCall { + 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 *ProjectsLocationsDeploymentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsGetIamPolicyCall { + 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 *ProjectsLocationsDeploymentsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.deployments.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "config.projects.locations.deployments.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.importState": + +type ProjectsLocationsDeploymentsImportStateCall struct { + s *Service + parent string + importstatefilerequest *ImportStatefileRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ImportState: Imports Terraform state file in a given deployment. The +// state file does not take effect until the Deployment has been +// unlocked. +// +// - parent: The parent in whose context the statefile is listed. The +// parent value is in the format: +// 'projects/{project_id}/locations/{location}/deployments/{deployment} +// '. +func (r *ProjectsLocationsDeploymentsService) ImportState(parent string, importstatefilerequest *ImportStatefileRequest) *ProjectsLocationsDeploymentsImportStateCall { + c := &ProjectsLocationsDeploymentsImportStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.importstatefilerequest = importstatefilerequest + 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 *ProjectsLocationsDeploymentsImportStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsImportStateCall { + 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 *ProjectsLocationsDeploymentsImportStateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsImportStateCall { + 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 *ProjectsLocationsDeploymentsImportStateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsImportStateCall) 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.importstatefilerequest) + 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}:importState") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.deployments.importState" call. +// Exactly one of *Statefile or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Statefile.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsImportStateCall) Do(opts ...googleapi.CallOption) (*Statefile, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Statefile{ + 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": "Imports Terraform state file in a given deployment. The state file does not take effect until the Deployment has been unlocked.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:importState", + // "httpMethod": "POST", + // "id": "config.projects.locations.deployments.importState", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent in whose context the statefile is listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}:importState", + // "request": { + // "$ref": "ImportStatefileRequest" + // }, + // "response": { + // "$ref": "Statefile" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.list": + +type ProjectsLocationsDeploymentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Deployments in a given project and location. +// +// - parent: The parent in whose context the Deployments are listed. The +// parent value is in the format: +// 'projects/{project_id}/locations/{location}'. +func (r *ProjectsLocationsDeploymentsService) List(parent string) *ProjectsLocationsDeploymentsListCall { + c := &ProjectsLocationsDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists the Deployments +// that match the filter expression. A filter expression filters the +// resources listed in the response. The expression must be of the form +// '{field} {operator} {value}' where operators: '<', '>', '<=', '>=', +// '!=', '=', ':' are supported (colon ':' represents a HAS operator +// which is roughly synonymous with equality). {field} can refer to a +// proto or JSON field, or a synthetic field. Field names can be +// camelCase or snake_case. Examples: - Filter by name: name = +// "projects/foo/locations/us-central1/deployments/bar - Filter by +// labels: - Resources that have a key called 'foo' labels.foo:* - +// Resources that have a key called 'foo' whose value is 'bar' +// labels.foo = bar - Filter by state: - Deployments in CREATING state. +// state=CREATING +func (c *ProjectsLocationsDeploymentsListCall) Filter(filter string) *ProjectsLocationsDeploymentsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to use to sort +// the list. +func (c *ProjectsLocationsDeploymentsListCall) OrderBy(orderBy string) *ProjectsLocationsDeploymentsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": When requesting a +// page of resources, 'page_size' specifies number of resources to +// return. If unspecified, at most 500 will be returned. The maximum +// value is 1000. +func (c *ProjectsLocationsDeploymentsListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token returned by +// previous call to 'ListDeployments' which specifies the position in +// the list from where to continue listing the resources. +func (c *ProjectsLocationsDeploymentsListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentsListCall { + 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 *ProjectsLocationsDeploymentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsListCall { + 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 *ProjectsLocationsDeploymentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsListCall { + 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 *ProjectsLocationsDeploymentsListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsListCall { + 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 *ProjectsLocationsDeploymentsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsListCall) 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}/deployments") + 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 "config.projects.locations.deployments.list" call. +// Exactly one of *ListDeploymentsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListDeploymentsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*ListDeploymentsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListDeploymentsResponse{ + 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 Deployments in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments", + // "httpMethod": "GET", + // "id": "config.projects.locations.deployments.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Lists the Deployments that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form '{field} {operator} {value}' where operators: '\u003c', '\u003e', '\u003c=', '\u003e=', '!=', '=', ':' are supported (colon ':' represents a HAS operator which is roughly synonymous with equality). {field} can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = \"projects/foo/locations/us-central1/deployments/bar - Filter by labels: - Resources that have a key called 'foo' labels.foo:* - Resources that have a key called 'foo' whose value is 'bar' labels.foo = bar - Filter by state: - Deployments in CREATING state. state=CREATING", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Field to use to sort the list.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "When requesting a page of resources, 'page_size' specifies number of resources to return. If unspecified, at most 500 will be returned. The maximum value is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token returned by previous call to 'ListDeployments' which specifies the position in the list from where to continue listing the resources.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent in whose context the Deployments are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/deployments", + // "response": { + // "$ref": "ListDeploymentsResponse" + // }, + // "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 *ProjectsLocationsDeploymentsListCall) Pages(ctx context.Context, f func(*ListDeploymentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "config.projects.locations.deployments.lock": + +type ProjectsLocationsDeploymentsLockCall struct { + s *Service + name string + lockdeploymentrequest *LockDeploymentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Lock: Locks a deployment. +// +// - name: The name of the deployment in the format: +// 'projects/{project_id}/locations/{location}/deployments/{deployment} +// '. +func (r *ProjectsLocationsDeploymentsService) Lock(name string, lockdeploymentrequest *LockDeploymentRequest) *ProjectsLocationsDeploymentsLockCall { + c := &ProjectsLocationsDeploymentsLockCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.lockdeploymentrequest = lockdeploymentrequest + 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 *ProjectsLocationsDeploymentsLockCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsLockCall { + 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 *ProjectsLocationsDeploymentsLockCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsLockCall { + 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 *ProjectsLocationsDeploymentsLockCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsLockCall) 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.lockdeploymentrequest) + 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}:lock") + 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 "config.projects.locations.deployments.lock" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsLockCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Locks a deployment.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:lock", + // "httpMethod": "POST", + // "id": "config.projects.locations.deployments.lock", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:lock", + // "request": { + // "$ref": "LockDeploymentRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.patch": + +type ProjectsLocationsDeploymentsPatchCall struct { + s *Service + name string + deployment *Deployment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Deployment. +// +// - name: Resource name of the deployment. Format: +// `projects/{project}/locations/{location}/deployments/{deployment}`. +func (r *ProjectsLocationsDeploymentsService) Patch(name string, deployment *Deployment) *ProjectsLocationsDeploymentsPatchCall { + c := &ProjectsLocationsDeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.deployment = deployment + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsDeploymentsPatchCall) RequestId(requestId string) *ProjectsLocationsDeploymentsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask used +// to specify the fields to be overwritten in the Deployment resource by +// the update. The fields specified in the update_mask are relative to +// the resource, not the full request. A field will be overwritten if it +// is in the mask. If the user does not provide a mask then all fields +// will be overwritten. +func (c *ProjectsLocationsDeploymentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDeploymentsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDeploymentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsPatchCall { + 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 *ProjectsLocationsDeploymentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsPatchCall { + 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 *ProjectsLocationsDeploymentsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsPatchCall) 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.deployment) + 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 "config.projects.locations.deployments.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Deployment.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}", + // "httpMethod": "PATCH", + // "id": "config.projects.locations.deployments.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name of the deployment. Format: `projects/{project}/locations/{location}/deployments/{deployment}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask used to specify the fields to be overwritten in the Deployment resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Deployment" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.setIamPolicy": + +type ProjectsLocationsDeploymentsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsDeploymentsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDeploymentsSetIamPolicyCall { + c := &ProjectsLocationsDeploymentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDeploymentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsSetIamPolicyCall { + 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 *ProjectsLocationsDeploymentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsSetIamPolicyCall { + 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 *ProjectsLocationsDeploymentsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.deployments.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsDeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "config.projects.locations.deployments.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.testIamPermissions": + +type ProjectsLocationsDeploymentsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsDeploymentsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDeploymentsTestIamPermissionsCall { + c := &ProjectsLocationsDeploymentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDeploymentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsTestIamPermissionsCall { + 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 *ProjectsLocationsDeploymentsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsTestIamPermissionsCall { + 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 *ProjectsLocationsDeploymentsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.deployments.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "config.projects.locations.deployments.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.unlock": + +type ProjectsLocationsDeploymentsUnlockCall struct { + s *Service + name string + unlockdeploymentrequest *UnlockDeploymentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Unlock: Unlocks a locked deployment. +// +// - name: The name of the deployment in the format: +// 'projects/{project_id}/locations/{location}/deployments/{deployment} +// '. +func (r *ProjectsLocationsDeploymentsService) Unlock(name string, unlockdeploymentrequest *UnlockDeploymentRequest) *ProjectsLocationsDeploymentsUnlockCall { + c := &ProjectsLocationsDeploymentsUnlockCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.unlockdeploymentrequest = unlockdeploymentrequest + 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 *ProjectsLocationsDeploymentsUnlockCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsUnlockCall { + 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 *ProjectsLocationsDeploymentsUnlockCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsUnlockCall { + 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 *ProjectsLocationsDeploymentsUnlockCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsUnlockCall) 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.unlockdeploymentrequest) + 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}:unlock") + 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 "config.projects.locations.deployments.unlock" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsUnlockCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Unlocks a locked deployment.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:unlock", + // "httpMethod": "POST", + // "id": "config.projects.locations.deployments.unlock", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:unlock", + // "request": { + // "$ref": "UnlockDeploymentRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.revisions.exportState": + +type ProjectsLocationsDeploymentsRevisionsExportStateCall struct { + s *Service + parent string + exportrevisionstatefilerequest *ExportRevisionStatefileRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ExportState: Exports Terraform state file from a given revision. +// +// - parent: The parent in whose context the statefile is listed. The +// parent value is in the format: +// 'projects/{project_id}/locations/{location}/deployments/{deployment} +// /revisions/{revision}'. +func (r *ProjectsLocationsDeploymentsRevisionsService) ExportState(parent string, exportrevisionstatefilerequest *ExportRevisionStatefileRequest) *ProjectsLocationsDeploymentsRevisionsExportStateCall { + c := &ProjectsLocationsDeploymentsRevisionsExportStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.exportrevisionstatefilerequest = exportrevisionstatefilerequest + 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 *ProjectsLocationsDeploymentsRevisionsExportStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsRevisionsExportStateCall { + 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 *ProjectsLocationsDeploymentsRevisionsExportStateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsRevisionsExportStateCall { + 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 *ProjectsLocationsDeploymentsRevisionsExportStateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsRevisionsExportStateCall) 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.exportrevisionstatefilerequest) + 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}:exportState") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.deployments.revisions.exportState" call. +// Exactly one of *Statefile or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Statefile.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsRevisionsExportStateCall) Do(opts ...googleapi.CallOption) (*Statefile, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Statefile{ + 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": "Exports Terraform state file from a given revision.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}/revisions/{revisionsId}:exportState", + // "httpMethod": "POST", + // "id": "config.projects.locations.deployments.revisions.exportState", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent in whose context the statefile is listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+/revisions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}:exportState", + // "request": { + // "$ref": "ExportRevisionStatefileRequest" + // }, + // "response": { + // "$ref": "Statefile" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.revisions.get": + +type ProjectsLocationsDeploymentsRevisionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details about a Revision. +// +// - name: The name of the Revision in the format: +// 'projects/{project_id}/locations/{location}/deployments/{deployment} +// /revisions/{revision}'. +func (r *ProjectsLocationsDeploymentsRevisionsService) Get(name string) *ProjectsLocationsDeploymentsRevisionsGetCall { + c := &ProjectsLocationsDeploymentsRevisionsGetCall{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 *ProjectsLocationsDeploymentsRevisionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsRevisionsGetCall { + 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 *ProjectsLocationsDeploymentsRevisionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsRevisionsGetCall { + 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 *ProjectsLocationsDeploymentsRevisionsGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsRevisionsGetCall { + 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 *ProjectsLocationsDeploymentsRevisionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsRevisionsGetCall) 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 "config.projects.locations.deployments.revisions.get" call. +// Exactly one of *Revision or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Revision.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsRevisionsGetCall) Do(opts ...googleapi.CallOption) (*Revision, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Revision{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details about a Revision.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}/revisions/{revisionsId}", + // "httpMethod": "GET", + // "id": "config.projects.locations.deployments.revisions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the Revision in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+/revisions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Revision" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.revisions.list": + +type ProjectsLocationsDeploymentsRevisionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Revisions of a deployment. +// +// - parent: The parent in whose context the Revisions are listed. The +// parent value is in the format: +// 'projects/{project_id}/locations/{location}/deployments/{deployment} +// '. +func (r *ProjectsLocationsDeploymentsRevisionsService) List(parent string) *ProjectsLocationsDeploymentsRevisionsListCall { + c := &ProjectsLocationsDeploymentsRevisionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists the Revisions that +// match the filter expression. A filter expression filters the +// resources listed in the response. The expression must be of the form +// '{field} {operator} {value}' where operators: '<', '>', '<=', '>=', +// '!=', '=', ':' are supported (colon ':' represents a HAS operator +// which is roughly synonymous with equality). {field} can refer to a +// proto or JSON field, or a synthetic field. Field names can be +// camelCase or snake_case. Examples: - Filter by name: name = +// "projects/foo/locations/us-central1/deployments/dep/revisions/bar - +// Filter by labels: - Resources that have a key called 'foo' +// labels.foo:* - Resources that have a key called 'foo' whose value is +// 'bar' labels.foo = bar - Filter by state: - Revisions in CREATING +// state. state=CREATING +func (c *ProjectsLocationsDeploymentsRevisionsListCall) Filter(filter string) *ProjectsLocationsDeploymentsRevisionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to use to sort +// the list. +func (c *ProjectsLocationsDeploymentsRevisionsListCall) OrderBy(orderBy string) *ProjectsLocationsDeploymentsRevisionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": When requesting a +// page of resources, `page_size` specifies number of resources to +// return. If unspecified, at most 500 will be returned. The maximum +// value is 1000. +func (c *ProjectsLocationsDeploymentsRevisionsListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentsRevisionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token returned by +// previous call to 'ListRevisions' which specifies the position in the +// list from where to continue listing the resources. +func (c *ProjectsLocationsDeploymentsRevisionsListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentsRevisionsListCall { + 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 *ProjectsLocationsDeploymentsRevisionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsRevisionsListCall { + 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 *ProjectsLocationsDeploymentsRevisionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsRevisionsListCall { + 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 *ProjectsLocationsDeploymentsRevisionsListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsRevisionsListCall { + 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 *ProjectsLocationsDeploymentsRevisionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsRevisionsListCall) 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}/revisions") + 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 "config.projects.locations.deployments.revisions.list" call. +// Exactly one of *ListRevisionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListRevisionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsRevisionsListCall) Do(opts ...googleapi.CallOption) (*ListRevisionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListRevisionsResponse{ + 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 Revisions of a deployment.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}/revisions", + // "httpMethod": "GET", + // "id": "config.projects.locations.deployments.revisions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Lists the Revisions that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form '{field} {operator} {value}' where operators: '\u003c', '\u003e', '\u003c=', '\u003e=', '!=', '=', ':' are supported (colon ':' represents a HAS operator which is roughly synonymous with equality). {field} can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = \"projects/foo/locations/us-central1/deployments/dep/revisions/bar - Filter by labels: - Resources that have a key called 'foo' labels.foo:* - Resources that have a key called 'foo' whose value is 'bar' labels.foo = bar - Filter by state: - Revisions in CREATING state. state=CREATING", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Field to use to sort the list.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "When requesting a page of resources, `page_size` specifies number of resources to return. If unspecified, at most 500 will be returned. The maximum value is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token returned by previous call to 'ListRevisions' which specifies the position in the list from where to continue listing the resources.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent in whose context the Revisions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/revisions", + // "response": { + // "$ref": "ListRevisionsResponse" + // }, + // "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 *ProjectsLocationsDeploymentsRevisionsListCall) Pages(ctx context.Context, f func(*ListRevisionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "config.projects.locations.deployments.revisions.resources.get": + +type ProjectsLocationsDeploymentsRevisionsResourcesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details about a Resource deployed by Infra Manager. +// +// - name: The name of the Resource in the format: +// 'projects/{project_id}/locations/{location}/deployments/{deployment} +// /revisions/{revision}/resource/{resource}'. +func (r *ProjectsLocationsDeploymentsRevisionsResourcesService) Get(name string) *ProjectsLocationsDeploymentsRevisionsResourcesGetCall { + c := &ProjectsLocationsDeploymentsRevisionsResourcesGetCall{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 *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsRevisionsResourcesGetCall { + 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 *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsRevisionsResourcesGetCall { + 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 *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsRevisionsResourcesGetCall { + 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 *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) 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 "config.projects.locations.deployments.revisions.resources.get" call. +// Exactly one of *Resource or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Resource.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) Do(opts ...googleapi.CallOption) (*Resource, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Resource{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details about a Resource deployed by Infra Manager.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}/revisions/{revisionsId}/resources/{resourcesId}", + // "httpMethod": "GET", + // "id": "config.projects.locations.deployments.revisions.resources.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the Resource in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+/revisions/[^/]+/resources/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Resource" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.deployments.revisions.resources.list": + +type ProjectsLocationsDeploymentsRevisionsResourcesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Resources in a given revision. +// +// - parent: The parent in whose context the Resources are listed. The +// parent value is in the format: +// 'projects/{project_id}/locations/{location}/deployments/{deployment} +// /revisions/{revision}'. +func (r *ProjectsLocationsDeploymentsRevisionsResourcesService) List(parent string) *ProjectsLocationsDeploymentsRevisionsResourcesListCall { + c := &ProjectsLocationsDeploymentsRevisionsResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists the Resources that +// match the filter expression. A filter expression filters the +// resources listed in the response. The expression must be of the form +// '{field} {operator} {value}' where operators: '<', '>', '<=', '>=', +// '!=', '=', ':' are supported (colon ':' represents a HAS operator +// which is roughly synonymous with equality). {field} can refer to a +// proto or JSON field, or a synthetic field. Field names can be +// camelCase or snake_case. Examples: - Filter by name: name = +// "projects/foo/locations/us-central1/deployments/dep/revisions/bar/reso +// urces/baz +func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Filter(filter string) *ProjectsLocationsDeploymentsRevisionsResourcesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to use to sort +// the list. +func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) OrderBy(orderBy string) *ProjectsLocationsDeploymentsRevisionsResourcesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": When requesting a +// page of resources, 'page_size' specifies number of resources to +// return. If unspecified, at most 500 will be returned. The maximum +// value is 1000. +func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentsRevisionsResourcesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token returned by +// previous call to 'ListResources' which specifies the position in the +// list from where to continue listing the resources. +func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentsRevisionsResourcesListCall { + 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 *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsRevisionsResourcesListCall { + 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 *ProjectsLocationsDeploymentsRevisionsResourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsRevisionsResourcesListCall { + 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 *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsRevisionsResourcesListCall { + 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 *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) 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}/resources") + 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 "config.projects.locations.deployments.revisions.resources.list" call. +// Exactly one of *ListResourcesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListResourcesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Do(opts ...googleapi.CallOption) (*ListResourcesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListResourcesResponse{ + 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 Resources in a given revision.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}/revisions/{revisionsId}/resources", + // "httpMethod": "GET", + // "id": "config.projects.locations.deployments.revisions.resources.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Lists the Resources that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form '{field} {operator} {value}' where operators: '\u003c', '\u003e', '\u003c=', '\u003e=', '!=', '=', ':' are supported (colon ':' represents a HAS operator which is roughly synonymous with equality). {field} can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = \"projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Field to use to sort the list.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "When requesting a page of resources, 'page_size' specifies number of resources to return. If unspecified, at most 500 will be returned. The maximum value is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token returned by previous call to 'ListResources' which specifies the position in the list from where to continue listing the resources.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent in whose context the Resources are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/deployments/[^/]+/revisions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/resources", + // "response": { + // "$ref": "ListResourcesResponse" + // }, + // "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 *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Pages(ctx context.Context, f func(*ListResourcesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "config.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "config.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "config.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "config.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "config.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "config.projects.locations.previews.create": + +type ProjectsLocationsPreviewsCreateCall struct { + s *Service + parent string + preview *Preview + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Preview. +// +// - parent: The parent in whose context the Preview is created. The +// parent value is in the format: +// 'projects/{project_id}/locations/{location}'. +func (r *ProjectsLocationsPreviewsService) Create(parent string, preview *Preview) *ProjectsLocationsPreviewsCreateCall { + c := &ProjectsLocationsPreviewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.preview = preview + return c +} + +// PreviewId sets the optional parameter "previewId": The preview ID. +func (c *ProjectsLocationsPreviewsCreateCall) PreviewId(previewId string) *ProjectsLocationsPreviewsCreateCall { + c.urlParams_.Set("previewId", previewId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPreviewsCreateCall) RequestId(requestId string) *ProjectsLocationsPreviewsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsPreviewsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreviewsCreateCall { + 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 *ProjectsLocationsPreviewsCreateCall) Context(ctx context.Context) *ProjectsLocationsPreviewsCreateCall { + 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 *ProjectsLocationsPreviewsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPreviewsCreateCall) 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.preview) + 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}/previews") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.previews.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPreviewsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Preview.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/previews", + // "httpMethod": "POST", + // "id": "config.projects.locations.previews.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent in whose context the Preview is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "previewId": { + // "description": "Optional. The preview ID.", + // "location": "query", + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/previews", + // "request": { + // "$ref": "Preview" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.previews.delete": + +type ProjectsLocationsPreviewsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Preview. +// +// - name: The name of the Preview in the format: +// 'projects/{project_id}/locations/{location}/previews/{preview}'. +func (r *ProjectsLocationsPreviewsService) Delete(name string) *ProjectsLocationsPreviewsDeleteCall { + c := &ProjectsLocationsPreviewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPreviewsDeleteCall) RequestId(requestId string) *ProjectsLocationsPreviewsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsPreviewsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreviewsDeleteCall { + 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 *ProjectsLocationsPreviewsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPreviewsDeleteCall { + 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 *ProjectsLocationsPreviewsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPreviewsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.previews.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPreviewsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Preview.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/previews/{previewsId}", + // "httpMethod": "DELETE", + // "id": "config.projects.locations.previews.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the Preview in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/previews/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.previews.export": + +type ProjectsLocationsPreviewsExportCall struct { + s *Service + parent string + exportpreviewresultrequest *ExportPreviewResultRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Export: Export Preview results. +// +// - parent: The preview whose results should be exported. The preview +// value is in the format: +// 'projects/{project_id}/locations/{location}/previews/{preview}'. +func (r *ProjectsLocationsPreviewsService) Export(parent string, exportpreviewresultrequest *ExportPreviewResultRequest) *ProjectsLocationsPreviewsExportCall { + c := &ProjectsLocationsPreviewsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.exportpreviewresultrequest = exportpreviewresultrequest + 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 *ProjectsLocationsPreviewsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreviewsExportCall { + 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 *ProjectsLocationsPreviewsExportCall) Context(ctx context.Context) *ProjectsLocationsPreviewsExportCall { + 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 *ProjectsLocationsPreviewsExportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPreviewsExportCall) 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.exportpreviewresultrequest) + 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}:export") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "config.projects.locations.previews.export" call. +// Exactly one of *ExportPreviewResultResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ExportPreviewResultResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsPreviewsExportCall) Do(opts ...googleapi.CallOption) (*ExportPreviewResultResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ExportPreviewResultResponse{ + 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": "Export Preview results.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/previews/{previewsId}:export", + // "httpMethod": "POST", + // "id": "config.projects.locations.previews.export", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The preview whose results should be exported. The preview value is in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/previews/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}:export", + // "request": { + // "$ref": "ExportPreviewResultRequest" + // }, + // "response": { + // "$ref": "ExportPreviewResultResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.previews.get": + +type ProjectsLocationsPreviewsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details about a Preview. +// +// - name: The name of the preview. Format: +// 'projects/{project_id}/locations/{location}/previews/{preview}'. +func (r *ProjectsLocationsPreviewsService) Get(name string) *ProjectsLocationsPreviewsGetCall { + c := &ProjectsLocationsPreviewsGetCall{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 *ProjectsLocationsPreviewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreviewsGetCall { + 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 *ProjectsLocationsPreviewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPreviewsGetCall { + 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 *ProjectsLocationsPreviewsGetCall) Context(ctx context.Context) *ProjectsLocationsPreviewsGetCall { + 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 *ProjectsLocationsPreviewsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPreviewsGetCall) 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 "config.projects.locations.previews.get" call. +// Exactly one of *Preview or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Preview.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsPreviewsGetCall) Do(opts ...googleapi.CallOption) (*Preview, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Preview{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details about a Preview.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/previews/{previewsId}", + // "httpMethod": "GET", + // "id": "config.projects.locations.previews.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the preview. Format: 'projects/{project_id}/locations/{location}/previews/{preview}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/previews/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Preview" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.previews.list": + +type ProjectsLocationsPreviewsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Previews in a given project and location. +// +// - parent: The parent in whose context the Previews are listed. The +// parent value is in the format: +// 'projects/{project_id}/locations/{location}'. +func (r *ProjectsLocationsPreviewsService) List(parent string) *ProjectsLocationsPreviewsListCall { + c := &ProjectsLocationsPreviewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists the Deployments +// that match the filter expression. A filter expression filters the +// resources listed in the response. The expression must be of the form +// '{field} {operator} {value}' where operators: '<', '>', '<=', '>=', +// '!=', '=', ':' are supported (colon ':' represents a HAS operator +// which is roughly synonymous with equality). {field} can refer to a +// proto or JSON field, or a synthetic field. Field names can be +// camelCase or snake_case. Examples: - Filter by name: name = +// "projects/foo/locations/us-central1/deployments/bar - Filter by +// labels: - Resources that have a key called 'foo' labels.foo:* - +// Resources that have a key called 'foo' whose value is 'bar' +// labels.foo = bar - Filter by state: - Deployments in CREATING state. +// state=CREATING +func (c *ProjectsLocationsPreviewsListCall) Filter(filter string) *ProjectsLocationsPreviewsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to use to sort +// the list. +func (c *ProjectsLocationsPreviewsListCall) OrderBy(orderBy string) *ProjectsLocationsPreviewsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": When requesting a +// page of resources, 'page_size' specifies number of resources to +// return. If unspecified, at most 500 will be returned. The maximum +// value is 1000. +func (c *ProjectsLocationsPreviewsListCall) PageSize(pageSize int64) *ProjectsLocationsPreviewsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token returned by +// previous call to 'ListDeployments' which specifies the position in +// the list from where to continue listing the resources. +func (c *ProjectsLocationsPreviewsListCall) PageToken(pageToken string) *ProjectsLocationsPreviewsListCall { + 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 *ProjectsLocationsPreviewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreviewsListCall { + 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 *ProjectsLocationsPreviewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPreviewsListCall { + 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 *ProjectsLocationsPreviewsListCall) Context(ctx context.Context) *ProjectsLocationsPreviewsListCall { + 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 *ProjectsLocationsPreviewsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPreviewsListCall) 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}/previews") + 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 "config.projects.locations.previews.list" call. +// Exactly one of *ListPreviewsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListPreviewsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsPreviewsListCall) Do(opts ...googleapi.CallOption) (*ListPreviewsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListPreviewsResponse{ + 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 Previews in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/previews", + // "httpMethod": "GET", + // "id": "config.projects.locations.previews.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Lists the Deployments that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form '{field} {operator} {value}' where operators: '\u003c', '\u003e', '\u003c=', '\u003e=', '!=', '=', ':' are supported (colon ':' represents a HAS operator which is roughly synonymous with equality). {field} can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = \"projects/foo/locations/us-central1/deployments/bar - Filter by labels: - Resources that have a key called 'foo' labels.foo:* - Resources that have a key called 'foo' whose value is 'bar' labels.foo = bar - Filter by state: - Deployments in CREATING state. state=CREATING", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Field to use to sort the list.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. When requesting a page of resources, 'page_size' specifies number of resources to return. If unspecified, at most 500 will be returned. The maximum value is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Token returned by previous call to 'ListDeployments' which specifies the position in the list from where to continue listing the resources.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent in whose context the Previews are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/previews", + // "response": { + // "$ref": "ListPreviewsResponse" + // }, + // "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 *ProjectsLocationsPreviewsListCall) Pages(ctx context.Context, f func(*ListPreviewsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "config.projects.locations.terraformVersions.get": + +type ProjectsLocationsTerraformVersionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details about a TerraformVersion. +// +// - name: The name of the TerraformVersion. Format: +// 'projects/{project_id}/locations/{location}/terraformVersions/{terra +// form_version}'. +func (r *ProjectsLocationsTerraformVersionsService) Get(name string) *ProjectsLocationsTerraformVersionsGetCall { + c := &ProjectsLocationsTerraformVersionsGetCall{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 *ProjectsLocationsTerraformVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTerraformVersionsGetCall { + 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 *ProjectsLocationsTerraformVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTerraformVersionsGetCall { + 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 *ProjectsLocationsTerraformVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsTerraformVersionsGetCall { + 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 *ProjectsLocationsTerraformVersionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTerraformVersionsGetCall) 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 "config.projects.locations.terraformVersions.get" call. +// Exactly one of *TerraformVersion or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TerraformVersion.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsTerraformVersionsGetCall) Do(opts ...googleapi.CallOption) (*TerraformVersion, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TerraformVersion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details about a TerraformVersion.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/terraformVersions/{terraformVersionsId}", + // "httpMethod": "GET", + // "id": "config.projects.locations.terraformVersions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the TerraformVersion. Format: 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/terraformVersions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "TerraformVersion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "config.projects.locations.terraformVersions.list": + +type ProjectsLocationsTerraformVersionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists TerraformVersions in a given project and location. +// +// - parent: The parent in whose context the TerraformVersions are +// listed. The parent value is in the format: +// 'projects/{project_id}/locations/{location}'. +func (r *ProjectsLocationsTerraformVersionsService) List(parent string) *ProjectsLocationsTerraformVersionsListCall { + c := &ProjectsLocationsTerraformVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists the +// TerraformVersions that match the filter expression. A filter +// expression filters the resources listed in the response. The +// expression must be of the form '{field} {operator} {value}' where +// operators: '<', '>', '<=', '>=', '!=', '=', ':' are supported (colon +// ':' represents a HAS operator which is roughly synonymous with +// equality). {field} can refer to a proto or JSON field, or a synthetic +// field. Field names can be camelCase or snake_case. +func (c *ProjectsLocationsTerraformVersionsListCall) Filter(filter string) *ProjectsLocationsTerraformVersionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to use to sort +// the list. +func (c *ProjectsLocationsTerraformVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsTerraformVersionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": When requesting a +// page of resources, 'page_size' specifies number of resources to +// return. If unspecified, at most 500 will be returned. The maximum +// value is 1000. +func (c *ProjectsLocationsTerraformVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsTerraformVersionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token returned by +// previous call to 'ListTerraformVersions' which specifies the position +// in the list from where to continue listing the resources. +func (c *ProjectsLocationsTerraformVersionsListCall) PageToken(pageToken string) *ProjectsLocationsTerraformVersionsListCall { + 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 *ProjectsLocationsTerraformVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTerraformVersionsListCall { + 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 *ProjectsLocationsTerraformVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTerraformVersionsListCall { + 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 *ProjectsLocationsTerraformVersionsListCall) Context(ctx context.Context) *ProjectsLocationsTerraformVersionsListCall { + 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 *ProjectsLocationsTerraformVersionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTerraformVersionsListCall) 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}/terraformVersions") + 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 "config.projects.locations.terraformVersions.list" call. +// Exactly one of *ListTerraformVersionsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListTerraformVersionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsTerraformVersionsListCall) Do(opts ...googleapi.CallOption) (*ListTerraformVersionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListTerraformVersionsResponse{ + 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 TerraformVersions in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/terraformVersions", + // "httpMethod": "GET", + // "id": "config.projects.locations.terraformVersions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Lists the TerraformVersions that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form '{field} {operator} {value}' where operators: '\u003c', '\u003e', '\u003c=', '\u003e=', '!=', '=', ':' are supported (colon ':' represents a HAS operator which is roughly synonymous with equality). {field} can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Field to use to sort the list.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. When requesting a page of resources, 'page_size' specifies number of resources to return. If unspecified, at most 500 will be returned. The maximum value is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Token returned by previous call to 'ListTerraformVersions' which specifies the position in the list from where to continue listing the resources.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent in whose context the TerraformVersions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/terraformVersions", + // "response": { + // "$ref": "ListTerraformVersionsResponse" + // }, + // "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 *ProjectsLocationsTerraformVersionsListCall) Pages(ctx context.Context, f func(*ListTerraformVersionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index 4513a5f7f43..428c93ca6d1 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -568,6 +568,47 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "search": { + "description": "Returns Top matching Connections for a given query.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections:search", + "httpMethod": "GET", + "id": "connectors.projects.locations.connections.search", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Parent resource of the Connection, of the form: `projects/*/locations/*/connections`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "Optional. The number of top matching connectors to return", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. page_token", + "location": "query", + "type": "string" + }, + "query": { + "description": "Required. The query against which the search needs to be done.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}:search", + "response": { + "$ref": "SearchConnectionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "setIamPolicy": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:setIamPolicy", @@ -2358,7 +2399,7 @@ } } }, - "revision": "20240320", + "revision": "20240415", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -2543,6 +2584,28 @@ }, "type": "object" }, + "BillingConfig": { + "description": "Billing config for the connection.", + "id": "BillingConfig", + "properties": { + "billingCategory": { + "description": "Output only. Billing category for the connector.", + "enum": [ + "BILLING_CATEGORY_UNSPECIFIED", + "GCP_AND_TECHNICAL_CONNECTOR", + "NON_GCP_CONNECTOR" + ], + "enumDescriptions": [ + "Billing category is not specified.", + "GCP/Technical connector.", + "Non-GCP connector." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Binding": { "description": "Associates `members`, or principals, with a `role`.", "id": "Binding", @@ -2729,6 +2792,11 @@ "$ref": "AuthConfig", "description": "Optional. Configuration for establishing the connection's authentication with an external system." }, + "billingConfig": { + "$ref": "BillingConfig", + "description": "Output only. Billing config for the connection.", + "readOnly": true + }, "configVariables": { "description": "Optional. Configuration for configuring the connection with an external system.", "items": { @@ -3363,10 +3431,19 @@ "id": "CustomConnector", "properties": { "activeConnectorVersions": { - "description": "Optional. Active connector versions.", + "description": "Output only. Active connector versions.", "items": { "type": "string" }, + "readOnly": true, + "type": "array" + }, + "allConnectorVersions": { + "description": "Output only. All connector versions.", + "items": { + "type": "string" + }, + "readOnly": true, "type": "array" }, "createTime": { @@ -6528,6 +6605,29 @@ "$ref": "JsonSchema", "description": "Output only. JsonSchema representation of this entity's metadata", "readOnly": true + }, + "operations": { + "description": "List of operations supported by this entity", + "items": { + "enum": [ + "OPERATION_UNSPECIFIED", + "LIST", + "GET", + "CREATE", + "UPDATE", + "DELETE" + ], + "enumDescriptions": [ + "Operation unspecified.", + "This operation means entity type supports LIST entities.", + "This operation means entity type supports GET entity.", + "This operation means entity type supports CREATE entity.", + "This operation means entity type supports UPDATE entity.", + "This operation means entity type supports DELETE entity." + ], + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -6587,6 +6687,53 @@ }, "type": "object" }, + "SearchConnectionInstance": { + "description": "SearchConnectionInstance represents an instance of connector with specific fields", + "id": "SearchConnectionInstance", + "properties": { + "actionSchema": { + "$ref": "RuntimeActionSchema", + "description": "Output only. Schema of a runtime action.", + "readOnly": true + }, + "connection": { + "$ref": "Connection", + "description": "Output only. Connection details", + "readOnly": true + }, + "entitySchema": { + "$ref": "RuntimeEntitySchema", + "description": "Output only. Schema of a runtime entity.", + "readOnly": true + } + }, + "type": "object" + }, + "SearchConnectionsResponse": { + "description": "Response message for Connectors.SearchConnections.", + "id": "SearchConnectionsResponse", + "properties": { + "connections": { + "description": "A list of connectors.", + "items": { + "$ref": "SearchConnectionInstance" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Optional. page_token", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Secret": { "description": "Secret provides a reference to entries in Secret Manager.", "id": "Secret", diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 02876e11042..64092562837 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -634,6 +634,40 @@ func (s *AuthorizationCodeLink) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BillingConfig: Billing config for the connection. +type BillingConfig struct { + // BillingCategory: Output only. Billing category for the connector. + // + // Possible values: + // "BILLING_CATEGORY_UNSPECIFIED" - Billing category is not specified. + // "GCP_AND_TECHNICAL_CONNECTOR" - GCP/Technical connector. + // "NON_GCP_CONNECTOR" - Non-GCP connector. + BillingCategory string `json:"billingCategory,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BillingCategory") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BillingCategory") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BillingConfig) MarshalJSON() ([]byte, error) { + type NoMethod BillingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Binding: Associates `members`, or principals, with a `role`. type Binding struct { // Condition: The condition that is associated with this binding. If the @@ -903,6 +937,9 @@ type Connection struct { // authentication with an external system. AuthConfig *AuthConfig `json:"authConfig,omitempty"` + // BillingConfig: Output only. Billing config for the connection. + BillingConfig *BillingConfig `json:"billingConfig,omitempty"` + // ConfigVariables: Optional. Configuration for configuring the // connection with an external system. ConfigVariables []*ConfigVariable `json:"configVariables,omitempty"` @@ -1521,9 +1558,12 @@ func (s *ConnectorsLogConfig) MarshalJSON() ([]byte, error) { // CustomConnector: CustomConnector represents the custom connector // defined by the customer as part of byoc. type CustomConnector struct { - // ActiveConnectorVersions: Optional. Active connector versions. + // ActiveConnectorVersions: Output only. Active connector versions. ActiveConnectorVersions []string `json:"activeConnectorVersions,omitempty"` + // AllConnectorVersions: Output only. All connector versions. + AllConnectorVersions []string `json:"allConnectorVersions,omitempty"` + // CreateTime: Output only. Created time. CreateTime string `json:"createTime,omitempty"` @@ -5561,6 +5601,17 @@ type RuntimeEntitySchema struct { // metadata JsonSchema *JsonSchema `json:"jsonSchema,omitempty"` + // Operations: List of operations supported by this entity + // + // Possible values: + // "OPERATION_UNSPECIFIED" - Operation unspecified. + // "LIST" - This operation means entity type supports LIST entities. + // "GET" - This operation means entity type supports GET entity. + // "CREATE" - This operation means entity type supports CREATE entity. + // "UPDATE" - This operation means entity type supports UPDATE entity. + // "DELETE" - This operation means entity type supports DELETE entity. + Operations []string `json:"operations,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entity") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -5663,6 +5714,80 @@ func (s *SchemaRefreshConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SearchConnectionInstance: SearchConnectionInstance represents an +// instance of connector with specific fields +type SearchConnectionInstance struct { + // ActionSchema: Output only. Schema of a runtime action. + ActionSchema *RuntimeActionSchema `json:"actionSchema,omitempty"` + + // Connection: Output only. Connection details + Connection *Connection `json:"connection,omitempty"` + + // EntitySchema: Output only. Schema of a runtime entity. + EntitySchema *RuntimeEntitySchema `json:"entitySchema,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActionSchema") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ActionSchema") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SearchConnectionInstance) MarshalJSON() ([]byte, error) { + type NoMethod SearchConnectionInstance + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SearchConnectionsResponse: Response message for +// Connectors.SearchConnections. +type SearchConnectionsResponse struct { + // Connections: A list of connectors. + Connections []*SearchConnectionInstance `json:"connections,omitempty"` + + // NextPageToken: Optional. page_token + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Connections") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Connections") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SearchConnectionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod SearchConnectionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Secret: Secret provides a reference to entries in Secret Manager. type Secret struct { // SecretVersion: The resource name of the secret version in the format, @@ -8776,6 +8901,210 @@ func (c *ProjectsLocationsConnectionsRepairEventingCall) Do(opts ...googleapi.Ca } +// method id "connectors.projects.locations.connections.search": + +type ProjectsLocationsConnectionsSearchCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Search: Returns Top matching Connections for a given query. +// +// - name: Parent resource of the Connection, of the form: +// `projects/*/locations/*/connections`. +func (r *ProjectsLocationsConnectionsService) Search(name string) *ProjectsLocationsConnectionsSearchCall { + c := &ProjectsLocationsConnectionsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// PageSize sets the optional parameter "pageSize": The number of top +// matching connectors to return +func (c *ProjectsLocationsConnectionsSearchCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsSearchCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": page_token +func (c *ProjectsLocationsConnectionsSearchCall) PageToken(pageToken string) *ProjectsLocationsConnectionsSearchCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Query sets the optional parameter "query": Required. The query +// against which the search needs to be done. +func (c *ProjectsLocationsConnectionsSearchCall) Query(query string) *ProjectsLocationsConnectionsSearchCall { + c.urlParams_.Set("query", query) + 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 *ProjectsLocationsConnectionsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsSearchCall { + 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 *ProjectsLocationsConnectionsSearchCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsSearchCall { + 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 *ProjectsLocationsConnectionsSearchCall) Context(ctx context.Context) *ProjectsLocationsConnectionsSearchCall { + 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 *ProjectsLocationsConnectionsSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsSearchCall) 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}:search") + 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 "connectors.projects.locations.connections.search" call. +// Exactly one of *SearchConnectionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *SearchConnectionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsSearchCall) Do(opts ...googleapi.CallOption) (*SearchConnectionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &SearchConnectionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns Top matching Connections for a given query.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections:search", + // "httpMethod": "GET", + // "id": "connectors.projects.locations.connections.search", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Parent resource of the Connection, of the form: `projects/*/locations/*/connections`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The number of top matching connectors to return", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. page_token", + // "location": "query", + // "type": "string" + // }, + // "query": { + // "description": "Required. The query against which the search needs to be done.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}:search", + // "response": { + // "$ref": "SearchConnectionsResponse" + // }, + // "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 *ProjectsLocationsConnectionsSearchCall) Pages(ctx context.Context, f func(*SearchConnectionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "connectors.projects.locations.connections.setIamPolicy": type ProjectsLocationsConnectionsSetIamPolicyCall struct { diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index ab626699d6a..6ab4dbf500d 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -5271,7 +5271,7 @@ } } }, - "revision": "20240325", + "revision": "20240410", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { @@ -8163,7 +8163,7 @@ "additionalProperties": { "$ref": "GoogleCloudDataplexV1Aspect" }, - "description": "Optional. The Aspects attached to the Entry. The key is either the resource name of the aspect type (if the aspect is attached directly to the entry) or \"aspectType@path\" if the aspect is attached to an entry's path.", + "description": "Optional. The Aspects attached to the Entry. The format for the key can be one of the following: 1. {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached directly to the entry) 2. {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is attached to an entry's path)", "type": "object" }, "createTime": { @@ -9856,46 +9856,10 @@ "$ref": "GoogleCloudDataplexV1Entry", "description": "Entry format of the result." }, - "description": { - "deprecated": true, - "description": "Entry description.", - "type": "string" - }, - "displayName": { - "deprecated": true, - "description": "Display name.", - "type": "string" - }, - "entry": { - "deprecated": true, - "description": "Resource name of the entry.", - "type": "string" - }, - "entryType": { - "deprecated": true, - "description": "The entry type.", - "type": "string" - }, - "fullyQualifiedName": { - "deprecated": true, - "description": "Fully qualified name.", - "type": "string" - }, "linkedResource": { "description": "Linked resource name.", "type": "string" }, - "modifyTime": { - "deprecated": true, - "description": "The last modification timestamp.", - "format": "google-datetime", - "type": "string" - }, - "relativeResource": { - "deprecated": true, - "description": "Relative resource name.", - "type": "string" - }, "snippets": { "$ref": "GoogleCloudDataplexV1SearchEntriesResultSnippets", "description": "Snippets." diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index db2c030542f..c0134fd7edd 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -4972,10 +4972,12 @@ func (s *GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility) MarshalJSO // GoogleCloudDataplexV1Entry: An entry is a representation of a data // asset which can be described by various metadata. type GoogleCloudDataplexV1Entry struct { - // Aspects: Optional. The Aspects attached to the Entry. The key is - // either the resource name of the aspect type (if the aspect is - // attached directly to the entry) or "aspectType@path" if the aspect is - // attached to an entry's path. + // Aspects: Optional. The Aspects attached to the Entry. The format for + // the key can be one of the following: 1. + // {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached + // directly to the entry) 2. + // {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is + // attached to an entry's path) Aspects map[string]GoogleCloudDataplexV1Aspect `json:"aspects,omitempty"` // CreateTime: Output only. The time when the Entry was created. @@ -7431,30 +7433,9 @@ type GoogleCloudDataplexV1SearchEntriesResult struct { // DataplexEntry: Entry format of the result. DataplexEntry *GoogleCloudDataplexV1Entry `json:"dataplexEntry,omitempty"` - // Description: Entry description. - Description string `json:"description,omitempty"` - - // DisplayName: Display name. - DisplayName string `json:"displayName,omitempty"` - - // Entry: Resource name of the entry. - Entry string `json:"entry,omitempty"` - - // EntryType: The entry type. - EntryType string `json:"entryType,omitempty"` - - // FullyQualifiedName: Fully qualified name. - FullyQualifiedName string `json:"fullyQualifiedName,omitempty"` - // LinkedResource: Linked resource name. LinkedResource string `json:"linkedResource,omitempty"` - // ModifyTime: The last modification timestamp. - ModifyTime string `json:"modifyTime,omitempty"` - - // RelativeResource: Relative resource name. - RelativeResource string `json:"relativeResource,omitempty"` - // Snippets: Snippets. Snippets *GoogleCloudDataplexV1SearchEntriesResultSnippets `json:"snippets,omitempty"` diff --git a/datastream/v1/datastream-api.json b/datastream/v1/datastream-api.json index fcc8f1cb71c..8f1cc8d7fa8 100644 --- a/datastream/v1/datastream-api.json +++ b/datastream/v1/datastream-api.json @@ -1250,9 +1250,15 @@ } } }, - "revision": "20240215", + "revision": "20240410", "rootUrl": "https://datastream.googleapis.com/", "schemas": { + "AppendOnly": { + "description": "AppendOnly mode defines that all changes to a table will be written to the destination table.", + "id": "AppendOnly", + "properties": {}, + "type": "object" + }, "AvroFileFormat": { "description": "AVRO file format configuration.", "id": "AvroFileFormat", @@ -1358,11 +1364,19 @@ "description": "BigQuery destination configuration", "id": "BigQueryDestinationConfig", "properties": { + "appendOnly": { + "$ref": "AppendOnly", + "description": "Append only mode" + }, "dataFreshness": { "description": "The guaranteed data freshness (in seconds) when querying tables created by the stream. Editing this field will only affect new tables created in the future, but existing tables will not be impacted. Lower values mean that queries will return fresher data, but may result in higher cost.", "format": "google-duration", "type": "string" }, + "merge": { + "$ref": "Merge", + "description": "The standard mode" + }, "singleTargetDataset": { "$ref": "SingleTargetDataset", "description": "Single destination dataset." @@ -1936,6 +1950,12 @@ }, "type": "object" }, + "Merge": { + "description": "Merge mode defines that all changes to a table will be merged at the destination table.", + "id": "Merge", + "properties": {}, + "type": "object" + }, "MostRecentStartPosition": { "description": "CDC strategy to start replicating from the most recent position in the source.", "id": "MostRecentStartPosition", diff --git a/datastream/v1/datastream-gen.go b/datastream/v1/datastream-gen.go index 9c84fdb7f8c..68b4d6fa34e 100644 --- a/datastream/v1/datastream-gen.go +++ b/datastream/v1/datastream-gen.go @@ -248,6 +248,11 @@ type ProjectsLocationsStreamsObjectsService struct { s *Service } +// AppendOnly: AppendOnly mode defines that all changes to a table will +// be written to the destination table. +type AppendOnly struct { +} + // AvroFileFormat: AVRO file format configuration. type AvroFileFormat struct { } @@ -363,6 +368,9 @@ type BackfillNoneStrategy struct { // BigQueryDestinationConfig: BigQuery destination configuration type BigQueryDestinationConfig struct { + // AppendOnly: Append only mode + AppendOnly *AppendOnly `json:"appendOnly,omitempty"` + // DataFreshness: The guaranteed data freshness (in seconds) when // querying tables created by the stream. Editing this field will only // affect new tables created in the future, but existing tables will not @@ -370,13 +378,16 @@ type BigQueryDestinationConfig struct { // but may result in higher cost. DataFreshness string `json:"dataFreshness,omitempty"` + // Merge: The standard mode + Merge *Merge `json:"merge,omitempty"` + // SingleTargetDataset: Single destination dataset. SingleTargetDataset *SingleTargetDataset `json:"singleTargetDataset,omitempty"` // SourceHierarchyDatasets: Source hierarchy datasets. SourceHierarchyDatasets *SourceHierarchyDatasets `json:"sourceHierarchyDatasets,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataFreshness") to + // ForceSendFields is a list of field names (e.g. "AppendOnly") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -384,10 +395,10 @@ type BigQueryDestinationConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataFreshness") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AppendOnly") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -1302,6 +1313,11 @@ func (s *LookupStreamObjectRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Merge: Merge mode defines that all changes to a table will be merged +// at the destination table. +type Merge struct { +} + // MostRecentStartPosition: CDC strategy to start replicating from the // most recent position in the source. type MostRecentStartPosition struct { diff --git a/gkebackup/v1/gkebackup-api.json b/gkebackup/v1/gkebackup-api.json index 51efaf320be..ca85232d886 100644 --- a/gkebackup/v1/gkebackup-api.json +++ b/gkebackup/v1/gkebackup-api.json @@ -1713,7 +1713,7 @@ } } }, - "revision": "20240320", + "revision": "20240410", "rootUrl": "https://gkebackup.googleapis.com/", "schemas": { "AuditConfig": { @@ -2246,7 +2246,7 @@ "description": "The exclusion window occurs on these days of each week in UTC." }, "duration": { - "description": "Required. Specifies duration of the window. Restrictions for duration based on the recurrence type to allow some time for backup to happen: - single_occurrence_date: no restriction, but UI may warn about this when duration \u003e= target RPO - daily window: duration \u003c 24 hours - weekly window: - days of week includes all seven days of a week: duration \u003c 24 hours - all other weekly window: duration \u003c 168 hours (i.e., 24 * 7 hours)", + "description": "Required. Specifies duration of the window. Duration must be \u003e= 5 minutes and \u003c (target RPO - 20 minutes). Additional restrictions based on the recurrence type to allow some time for backup to happen: - single_occurrence_date: no restriction, but UI may warn about this when duration \u003e= target RPO - daily window: duration \u003c 24 hours - weekly window: - days of week includes all seven days of a week: duration \u003c 24 hours - all other weekly window: duration \u003c 168 hours (i.e., 24 * 7 hours)", "format": "google-duration", "type": "string" }, diff --git a/gkebackup/v1/gkebackup-gen.go b/gkebackup/v1/gkebackup-gen.go index 8c2d7398f2a..41050d4794c 100644 --- a/gkebackup/v1/gkebackup-gen.go +++ b/gkebackup/v1/gkebackup-gen.go @@ -1056,8 +1056,9 @@ type ExclusionWindow struct { // UTC. DaysOfWeek *DayOfWeekList `json:"daysOfWeek,omitempty"` - // Duration: Required. Specifies duration of the window. Restrictions - // for duration based on the recurrence type to allow some time for + // Duration: Required. Specifies duration of the window. Duration must + // be >= 5 minutes and < (target RPO - 20 minutes). Additional + // restrictions based on the recurrence type to allow some time for // backup to happen: - single_occurrence_date: no restriction, but UI // may warn about this when duration >= target RPO - daily window: // duration < 24 hours - weekly window: - days of week includes all diff --git a/gkehub/v1/gkehub-api.json b/gkehub/v1/gkehub-api.json index 46485dcca97..423c09b292b 100644 --- a/gkehub/v1/gkehub-api.json +++ b/gkehub/v1/gkehub-api.json @@ -1911,7 +1911,7 @@ } } }, - "revision": "20240322", + "revision": "20240412", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AppDevExperienceFeatureSpec": { @@ -5724,7 +5724,8 @@ "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED", "CNI_INSTALLATION_FAILED", "CNI_POD_UNSCHEDULABLE", - "UNSUPPORTED_MULTIPLE_CONTROL_PLANES" + "UNSUPPORTED_MULTIPLE_CONTROL_PLANES", + "VPCSC_GA_SUPPORTED" ], "enumDescriptions": [ "Default Unspecified code", @@ -5734,7 +5735,8 @@ "Nodepool workload identity federation required error code", "CNI installation failed error code", "CNI pod unschedulable error code", - "Multiple control planes unsupported error code" + "Multiple control planes unsupported error code", + "VPC-SC GA is supported for this control plane." ], "type": "string" }, @@ -5882,7 +5884,7 @@ "id": "ServiceMeshMembershipState", "properties": { "conditions": { - "description": "Output only. List of condition reporting membership statues", + "description": "Output only. List of conditions reported for this membership.", "items": { "$ref": "ServiceMeshCondition" }, diff --git a/gkehub/v1/gkehub-gen.go b/gkehub/v1/gkehub-gen.go index b214d0984a0..54a3f4637ad 100644 --- a/gkehub/v1/gkehub-gen.go +++ b/gkehub/v1/gkehub-gen.go @@ -6504,6 +6504,8 @@ type ServiceMeshCondition struct { // "CNI_POD_UNSCHEDULABLE" - CNI pod unschedulable error code // "UNSUPPORTED_MULTIPLE_CONTROL_PLANES" - Multiple control planes // unsupported error code + // "VPCSC_GA_SUPPORTED" - VPC-SC GA is supported for this control + // plane. Code string `json:"code,omitempty"` // Details: A short summary about the issue. @@ -6692,8 +6694,8 @@ func (s *ServiceMeshMembershipSpec) MarshalJSON() ([]byte, error) { // ServiceMeshMembershipState: **Service Mesh**: State for a single // Membership, as analyzed by the Service Mesh Hub Controller. type ServiceMeshMembershipState struct { - // Conditions: Output only. List of condition reporting membership - // statues + // Conditions: Output only. List of conditions reported for this + // membership. Conditions []*ServiceMeshCondition `json:"conditions,omitempty"` // ControlPlaneManagement: Output only. Status of control plane diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index b8b6667525f..a386949d711 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -2175,7 +2175,7 @@ } } }, - "revision": "20240322", + "revision": "20240412", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -6467,7 +6467,8 @@ "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED", "CNI_INSTALLATION_FAILED", "CNI_POD_UNSCHEDULABLE", - "UNSUPPORTED_MULTIPLE_CONTROL_PLANES" + "UNSUPPORTED_MULTIPLE_CONTROL_PLANES", + "VPCSC_GA_SUPPORTED" ], "enumDescriptions": [ "Default Unspecified code", @@ -6477,7 +6478,8 @@ "Nodepool workload identity federation required error code", "CNI installation failed error code", "CNI pod unschedulable error code", - "Multiple control planes unsupported error code" + "Multiple control planes unsupported error code", + "VPC-SC GA is supported for this control plane." ], "type": "string" }, @@ -6681,7 +6683,7 @@ "type": "array" }, "conditions": { - "description": "Output only. List of condition reporting membership statues", + "description": "Output only. List of conditions reported for this membership.", "items": { "$ref": "ServiceMeshCondition" }, diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index ef1232b8832..d2ef91b7789 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -7325,6 +7325,8 @@ type ServiceMeshCondition struct { // "CNI_POD_UNSCHEDULABLE" - CNI pod unschedulable error code // "UNSUPPORTED_MULTIPLE_CONTROL_PLANES" - Multiple control planes // unsupported error code + // "VPCSC_GA_SUPPORTED" - VPC-SC GA is supported for this control + // plane. Code string `json:"code,omitempty"` // Details: A short summary about the issue. @@ -7572,8 +7574,8 @@ type ServiceMeshMembershipState struct { // analyzers. AnalysisMessages []*ServiceMeshAnalysisMessage `json:"analysisMessages,omitempty"` - // Conditions: Output only. List of condition reporting membership - // statues + // Conditions: Output only. List of conditions reported for this + // membership. Conditions []*ServiceMeshCondition `json:"conditions,omitempty"` // ConfigApiVersion: The API version (i.e. Istio CRD version) for diff --git a/gkehub/v1beta/gkehub-api.json b/gkehub/v1beta/gkehub-api.json index d876ea578f6..04099b27c24 100644 --- a/gkehub/v1beta/gkehub-api.json +++ b/gkehub/v1beta/gkehub-api.json @@ -2101,7 +2101,7 @@ } } }, - "revision": "20240322", + "revision": "20240412", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -6106,7 +6106,8 @@ "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED", "CNI_INSTALLATION_FAILED", "CNI_POD_UNSCHEDULABLE", - "UNSUPPORTED_MULTIPLE_CONTROL_PLANES" + "UNSUPPORTED_MULTIPLE_CONTROL_PLANES", + "VPCSC_GA_SUPPORTED" ], "enumDescriptions": [ "Default Unspecified code", @@ -6116,7 +6117,8 @@ "Nodepool workload identity federation required error code", "CNI installation failed error code", "CNI pod unschedulable error code", - "Multiple control planes unsupported error code" + "Multiple control planes unsupported error code", + "VPC-SC GA is supported for this control plane." ], "type": "string" }, @@ -6264,7 +6266,7 @@ "id": "ServiceMeshMembershipState", "properties": { "conditions": { - "description": "Output only. List of condition reporting membership statues", + "description": "Output only. List of conditions reported for this membership.", "items": { "$ref": "ServiceMeshCondition" }, diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index 40cff48d2b1..40c95f5acd2 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -6869,6 +6869,8 @@ type ServiceMeshCondition struct { // "CNI_POD_UNSCHEDULABLE" - CNI pod unschedulable error code // "UNSUPPORTED_MULTIPLE_CONTROL_PLANES" - Multiple control planes // unsupported error code + // "VPCSC_GA_SUPPORTED" - VPC-SC GA is supported for this control + // plane. Code string `json:"code,omitempty"` // Details: A short summary about the issue. @@ -7057,8 +7059,8 @@ func (s *ServiceMeshMembershipSpec) MarshalJSON() ([]byte, error) { // ServiceMeshMembershipState: **Service Mesh**: State for a single // Membership, as analyzed by the Service Mesh Hub Controller. type ServiceMeshMembershipState struct { - // Conditions: Output only. List of condition reporting membership - // statues + // Conditions: Output only. List of conditions reported for this + // membership. Conditions []*ServiceMeshCondition `json:"conditions,omitempty"` // ControlPlaneManagement: Output only. Status of control plane diff --git a/lifesciences/v2beta/lifesciences-api.json b/lifesciences/v2beta/lifesciences-api.json index 45257493590..1e2d8b62ba9 100644 --- a/lifesciences/v2beta/lifesciences-api.json +++ b/lifesciences/v2beta/lifesciences-api.json @@ -312,7 +312,7 @@ } } }, - "revision": "20230707", + "revision": "20240329", "rootUrl": "https://lifesciences.googleapis.com/", "schemas": { "Accelerator": { @@ -325,7 +325,7 @@ "type": "string" }, "type": { - "description": "The accelerator type string (for example, \"nvidia-tesla-k80\"). Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is attached, the required runtime libraries will be made available to all containers under `/usr/local/nvidia`. The driver version to install must be specified using the NVIDIA driver version parameter on the virtual machine specification. Note that attaching a GPU increases the worker VM startup time by a few minutes.", + "description": "The accelerator type string (for example, \"nvidia-tesla-t4\"). Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is attached, the required runtime libraries will be made available to all containers under `/usr/local/nvidia`. The driver version to install must be specified using the NVIDIA driver version parameter on the virtual machine specification. Note that attaching a GPU increases the worker VM startup time by a few minutes.", "type": "string" } }, diff --git a/lifesciences/v2beta/lifesciences-gen.go b/lifesciences/v2beta/lifesciences-gen.go index 8ea70e29eed..83c3278ed23 100644 --- a/lifesciences/v2beta/lifesciences-gen.go +++ b/lifesciences/v2beta/lifesciences-gen.go @@ -206,7 +206,7 @@ type Accelerator struct { // Count: How many accelerators of this type to attach. Count int64 `json:"count,omitempty,string"` - // Type: The accelerator type string (for example, "nvidia-tesla-k80"). + // Type: The accelerator type string (for example, "nvidia-tesla-t4"). // Only NVIDIA GPU accelerators are currently supported. If an NVIDIA // GPU is attached, the required runtime libraries will be made // available to all containers under `/usr/local/nvidia`. The driver diff --git a/looker/v1/looker-api.json b/looker/v1/looker-api.json index 660680c39bf..ce7bb52c27c 100644 --- a/looker/v1/looker-api.json +++ b/looker/v1/looker-api.json @@ -731,7 +731,7 @@ } } }, - "revision": "20240305", + "revision": "20240411", "rootUrl": "https://looker.googleapis.com/", "schemas": { "AdminSettings": { @@ -1059,7 +1059,7 @@ "type": "object" }, "Instance": { - "description": "A Looker instance.", + "description": "A Looker instance. LINT.IfChange", "id": "Instance", "properties": { "adminSettings": { diff --git a/looker/v1/looker-gen.go b/looker/v1/looker-gen.go index 275f056d127..379de57c671 100644 --- a/looker/v1/looker-gen.go +++ b/looker/v1/looker-gen.go @@ -875,7 +875,7 @@ func (s *ImportInstanceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Instance: A Looker instance. +// Instance: A Looker instance. LINT.IfChange type Instance struct { // AdminSettings: Looker Instance Admin settings. AdminSettings *AdminSettings `json:"adminSettings,omitempty"` diff --git a/metastore/v1/metastore-api.json b/metastore/v1/metastore-api.json index c06d480405b..a61b65d397b 100644 --- a/metastore/v1/metastore-api.json +++ b/metastore/v1/metastore-api.json @@ -893,7 +893,7 @@ ] }, "queryMetadata": { - "description": "Query DPMS metadata.", + "description": "Query Dataproc Metastore metadata.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:queryMetadata", "httpMethod": "POST", "id": "metastore.projects.locations.services.queryMetadata", @@ -1367,7 +1367,7 @@ } } }, - "revision": "20240325", + "revision": "20240411", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { diff --git a/metastore/v1/metastore-gen.go b/metastore/v1/metastore-gen.go index 47d2271ad31..808c8567393 100644 --- a/metastore/v1/metastore-gen.go +++ b/metastore/v1/metastore-gen.go @@ -6838,7 +6838,7 @@ type ProjectsLocationsServicesQueryMetadataCall struct { header_ http.Header } -// QueryMetadata: Query DPMS metadata. +// QueryMetadata: Query Dataproc Metastore metadata. // // - service: The relative resource name of the metastore service to // query metadata, in the following @@ -6942,7 +6942,7 @@ func (c *ProjectsLocationsServicesQueryMetadataCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Query DPMS metadata.", + // "description": "Query Dataproc Metastore metadata.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:queryMetadata", // "httpMethod": "POST", // "id": "metastore.projects.locations.services.queryMetadata", diff --git a/metastore/v1alpha/metastore-api.json b/metastore/v1alpha/metastore-api.json index 3f0e40465e8..6ecef6ecda1 100644 --- a/metastore/v1alpha/metastore-api.json +++ b/metastore/v1alpha/metastore-api.json @@ -949,7 +949,7 @@ ] }, "queryMetadata": { - "description": "Query DPMS metadata.", + "description": "Query Dataproc Metastore metadata.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:queryMetadata", "httpMethod": "POST", "id": "metastore.projects.locations.services.queryMetadata", @@ -1796,7 +1796,7 @@ } } }, - "revision": "20240325", + "revision": "20240411", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -1891,6 +1891,27 @@ }, "type": "object" }, + "AutoscalingConfig": { + "description": "Represents the autoscaling configuration of a metastore service.", + "id": "AutoscalingConfig", + "properties": { + "autoscalingEnabled": { + "description": "Optional. Whether or not autoscaling is enabled for this service.", + "type": "boolean" + }, + "autoscalingFactor": { + "description": "Output only. The scaling factor of a service with autoscaling enabled.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "limitConfig": { + "$ref": "LimitConfig", + "description": "Optional. The LimitConfig of the service." + } + }, + "type": "object" + }, "AuxiliaryVersionConfig": { "description": "Configuration information for the auxiliary service versions.", "id": "AuxiliaryVersionConfig", @@ -2123,7 +2144,7 @@ "type": "object" }, "CloudSQLMigrationConfig": { - "description": "Configuration information for migrating from self-managed hive metastore on GCP using Cloud SQL as the backend database to DPMS.", + "description": "Configuration information for migrating from self-managed hive metastore on Google Cloud using Cloud SQL as the backend database to Dataproc Metastore.", "id": "CloudSQLMigrationConfig", "properties": { "cdcConfig": { @@ -2532,6 +2553,23 @@ }, "type": "object" }, + "LimitConfig": { + "description": "Represents the autoscaling limit configuration of a metastore service.", + "id": "LimitConfig", + "properties": { + "maxScalingFactor": { + "description": "Optional. The highest scaling factor that the service should be autoscaled to.", + "format": "float", + "type": "number" + }, + "minScalingFactor": { + "description": "Optional. The lowest scaling factor that the service should be autoscaled to.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "ListBackupsResponse": { "description": "Response message for DataprocMetastore.ListBackups.", "id": "ListBackupsResponse", @@ -2939,7 +2977,7 @@ "properties": { "cloudSqlMigrationConfig": { "$ref": "CloudSQLMigrationConfig", - "description": "Configuration information specific to migrating from self-managed hive metastore on GCP using Cloud SQL as the backend database to DPMS." + "description": "Configuration information specific to migrating from self-managed hive metastore on Google Cloud using Cloud SQL as the backend database to Dataproc Metastore." }, "createTime": { "description": "Output only. The time when the migration execution was started.", @@ -2968,7 +3006,7 @@ "enumDescriptions": [ "The phase of the migration execution is unknown.", "Replication phase refers to the migration phase when Dataproc Metastore is running a pipeline to replicate changes in the customer database to its backend database. During this phase, Dataproc Metastore uses the customer database as the hive metastore backend database.", - "Cutover phase refers to the migration phase when Dataproc Metastore switches to using its own backend database. Migration enters this phase when customer is done migrating all their clusters/workloads to DPMS and triggers CompleteMigration." + "Cutover phase refers to the migration phase when Dataproc Metastore switches to using its own backend database. Migration enters this phase when customer is done migrating all their clusters/workloads to Dataproc Metastore and triggers CompleteMigration." ], "readOnly": true, "type": "string" @@ -3323,6 +3361,10 @@ "description": "Represents the scaling configuration of a metastore service.", "id": "ScalingConfig", "properties": { + "autoscalingConfig": { + "$ref": "AutoscalingConfig", + "description": "Optional. The autoscaling configuration." + }, "instanceSize": { "description": "An enum of readable instance sizes, with each instance size mapping to a float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))", "enum": [ @@ -3507,7 +3549,8 @@ "SUSPENDED", "UPDATING", "DELETING", - "ERROR" + "ERROR", + "MIGRATING" ], "enumDescriptions": [ "The state of the metastore service is unknown.", @@ -3517,7 +3560,8 @@ "The metastore service is suspended and unable to serve queries.", "The metastore service is being updated. It remains usable but cannot accept additional update requests or be deleted at this time.", "The metastore service is undergoing deletion. It cannot be used.", - "The metastore service has encountered an error and cannot be used. The metastore service should be deleted." + "The metastore service has encountered an error and cannot be used. The metastore service should be deleted.", + "The metastore service is processing a managed migration." ], "readOnly": true, "type": "string" diff --git a/metastore/v1alpha/metastore-gen.go b/metastore/v1alpha/metastore-gen.go index a620fcd8689..f3a735a698f 100644 --- a/metastore/v1alpha/metastore-gen.go +++ b/metastore/v1alpha/metastore-gen.go @@ -457,6 +457,58 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AutoscalingConfig: Represents the autoscaling configuration of a +// metastore service. +type AutoscalingConfig struct { + // AutoscalingEnabled: Optional. Whether or not autoscaling is enabled + // for this service. + AutoscalingEnabled bool `json:"autoscalingEnabled,omitempty"` + + // AutoscalingFactor: Output only. The scaling factor of a service with + // autoscaling enabled. + AutoscalingFactor float64 `json:"autoscalingFactor,omitempty"` + + // LimitConfig: Optional. The LimitConfig of the service. + LimitConfig *LimitConfig `json:"limitConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AutoscalingEnabled") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AutoscalingEnabled") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AutoscalingConfig) MarshalJSON() ([]byte, error) { + type NoMethod AutoscalingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *AutoscalingConfig) UnmarshalJSON(data []byte) error { + type NoMethod AutoscalingConfig + var s1 struct { + AutoscalingFactor gensupport.JSONFloat64 `json:"autoscalingFactor"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.AutoscalingFactor = float64(s1.AutoscalingFactor) + return nil +} + // AuxiliaryVersionConfig: Configuration information for the auxiliary // service versions. type AuxiliaryVersionConfig struct { @@ -895,8 +947,8 @@ func (s *CloudSQLConnectionConfig) MarshalJSON() ([]byte, error) { } // CloudSQLMigrationConfig: Configuration information for migrating from -// self-managed hive metastore on GCP using Cloud SQL as the backend -// database to DPMS. +// self-managed hive metastore on Google Cloud using Cloud SQL as the +// backend database to Dataproc Metastore. type CloudSQLMigrationConfig struct { // CdcConfig: Required. Configuration information to start the Change // Data Capture (CDC) streams from customer database to backend database @@ -1617,6 +1669,57 @@ func (s *LatestBackup) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LimitConfig: Represents the autoscaling limit configuration of a +// metastore service. +type LimitConfig struct { + // MaxScalingFactor: Optional. The highest scaling factor that the + // service should be autoscaled to. + MaxScalingFactor float64 `json:"maxScalingFactor,omitempty"` + + // MinScalingFactor: Optional. The lowest scaling factor that the + // service should be autoscaled to. + MinScalingFactor float64 `json:"minScalingFactor,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxScalingFactor") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MaxScalingFactor") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LimitConfig) MarshalJSON() ([]byte, error) { + type NoMethod LimitConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *LimitConfig) UnmarshalJSON(data []byte) error { + type NoMethod LimitConfig + var s1 struct { + MaxScalingFactor gensupport.JSONFloat64 `json:"maxScalingFactor"` + MinScalingFactor gensupport.JSONFloat64 `json:"minScalingFactor"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MaxScalingFactor = float64(s1.MaxScalingFactor) + s.MinScalingFactor = float64(s1.MinScalingFactor) + return nil +} + // ListBackupsResponse: Response message for // DataprocMetastore.ListBackups. type ListBackupsResponse struct { @@ -2211,8 +2314,8 @@ func (s *MetadataManagementActivity) MarshalJSON() ([]byte, error) { // MigrationExecution: The details of a migration execution resource. type MigrationExecution struct { // CloudSqlMigrationConfig: Configuration information specific to - // migrating from self-managed hive metastore on GCP using Cloud SQL as - // the backend database to DPMS. + // migrating from self-managed hive metastore on Google Cloud using + // Cloud SQL as the backend database to Dataproc Metastore. CloudSqlMigrationConfig *CloudSQLMigrationConfig `json:"cloudSqlMigrationConfig,omitempty"` // CreateTime: Output only. The time when the migration execution was @@ -2241,7 +2344,8 @@ type MigrationExecution struct { // "CUTOVER" - Cutover phase refers to the migration phase when // Dataproc Metastore switches to using its own backend database. // Migration enters this phase when customer is done migrating all their - // clusters/workloads to DPMS and triggers CompleteMigration. + // clusters/workloads to Dataproc Metastore and triggers + // CompleteMigration. Phase string `json:"phase,omitempty"` // State: Output only. The current state of the migration execution. @@ -2874,6 +2978,9 @@ func (s *RestoreServiceRequest) MarshalJSON() ([]byte, error) { // ScalingConfig: Represents the scaling configuration of a metastore // service. type ScalingConfig struct { + // AutoscalingConfig: Optional. The autoscaling configuration. + AutoscalingConfig *AutoscalingConfig `json:"autoscalingConfig,omitempty"` + // InstanceSize: An enum of readable instance sizes, with each instance // size mapping to a float value (e.g. InstanceSize.EXTRA_SMALL = // scaling_factor(0.1)) @@ -2893,20 +3000,21 @@ type ScalingConfig struct { // 1.0, and increments of 1.0 for values greater than 1.0. ScalingFactor float64 `json:"scalingFactor,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceSize") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AutoscalingConfig") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceSize") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "AutoscalingConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -3127,6 +3235,8 @@ type Service struct { // cannot be used. // "ERROR" - The metastore service has encountered an error and cannot // be used. The metastore service should be deleted. + // "MIGRATING" - The metastore service is processing a managed + // migration. State string `json:"state,omitempty"` // StateMessage: Output only. Additional information about the current @@ -7720,7 +7830,7 @@ type ProjectsLocationsServicesQueryMetadataCall struct { header_ http.Header } -// QueryMetadata: Query DPMS metadata. +// QueryMetadata: Query Dataproc Metastore metadata. // // - service: The relative resource name of the metastore service to // query metadata, in the following @@ -7824,7 +7934,7 @@ func (c *ProjectsLocationsServicesQueryMetadataCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Query DPMS metadata.", + // "description": "Query Dataproc Metastore metadata.", // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:queryMetadata", // "httpMethod": "POST", // "id": "metastore.projects.locations.services.queryMetadata", diff --git a/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index 3a9fb34cf3b..82f424c268d 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -342,7 +342,7 @@ ] }, "patch": { - "description": "Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for for more details.", + "description": "Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for more details.", "flatPath": "v1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}", "httpMethod": "PATCH", "id": "networkmanagement.projects.locations.global.connectivityTests.patch", @@ -591,7 +591,7 @@ } } }, - "revision": "20240320", + "revision": "20240410", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index 7f56fe0e074..60ecbb485d5 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -4693,7 +4693,7 @@ type ProjectsLocationsGlobalConnectivityTestsPatchCall struct { // the reachability result returns a value of UNKNOWN. If the endpoint // specifications in `ConnectivityTest` are incomplete, the reachability // result returns a value of `AMBIGUOUS`. See the documentation in -// `ConnectivityTest` for for more details. +// `ConnectivityTest` for more details. // // - name: Unique name of the resource using the form: // `projects/{project_id}/locations/global/connectivityTests/{test_id}`. @@ -4803,7 +4803,7 @@ func (c *ProjectsLocationsGlobalConnectivityTestsPatchCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for for more details.", + // "description": "Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for more details.", // "flatPath": "v1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}", // "httpMethod": "PATCH", // "id": "networkmanagement.projects.locations.global.connectivityTests.patch", diff --git a/networkmanagement/v1beta1/networkmanagement-api.json b/networkmanagement/v1beta1/networkmanagement-api.json index ed3e118e20b..8fea2e60916 100644 --- a/networkmanagement/v1beta1/networkmanagement-api.json +++ b/networkmanagement/v1beta1/networkmanagement-api.json @@ -342,7 +342,7 @@ ] }, "patch": { - "description": "Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for for more details.", + "description": "Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for more details.", "flatPath": "v1beta1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}", "httpMethod": "PATCH", "id": "networkmanagement.projects.locations.global.connectivityTests.patch", @@ -585,13 +585,180 @@ } } } + }, + "vpcFlowLogsConfigs": { + "methods": { + "create": { + "description": "Creates a new VPC Flow Logs configuration. If a configuration with the exact same settings already exists, the creation fails.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs", + "httpMethod": "POST", + "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the VPC Flow Logs configuration to create: `projects/{project_id}/locations/global`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "vpcFlowLogsConfigId": { + "description": "Required. ID of the VpcFlowLogsConfig.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/vpcFlowLogsConfigs", + "request": { + "$ref": "VpcFlowLogsConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a specific VpcFlowLog configuration.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs/{vpcFlowLogsConfigsId}", + "httpMethod": "DELETE", + "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. VpcFlowLogsConfig name using the form: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a specific VPC Flow Log configuration.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs/{vpcFlowLogsConfigsId}", + "httpMethod": "GET", + "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. `VpcFlowLog` resource name using the form: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "VpcFlowLogsConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all VPC Flow Logs configurations in a given project.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs", + "httpMethod": "GET", + "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Lists the `VpcFlowLogsConfig`s that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form ` ` where operators: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is roughly synonymous with equality). can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = \"projects/proj-1/locations/global/vpcFlowLogsConfigs/config-1 - Filter by target resource: - Configurations at the VPC network level target_resource.network:* - Configurations for a VPC network called `vpc-1` target_resource.network = vpc-1", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Field to use to sort the list.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Number of `VpcFlowLogsConfig`s to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page token from an earlier query, as returned in `next_page_token`.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource of the VpcFlowLogsConfig: `projects/{project_id}/locations/global`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/vpcFlowLogsConfigs", + "response": { + "$ref": "ListVpcFlowLogsConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing VpcFlowLogsConfig. If a configuration with the exact same settings already exists, the creation fails.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs/{vpcFlowLogsConfigsId}", + "httpMethod": "PATCH", + "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Unique name of the configuration using the form: `projects/{project_id}/locations/global/vpcFlowLogs/{vpc_flow_log}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update. At least one path must be supplied in this field.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "VpcFlowLogsConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } } } }, - "revision": "20240320", + "revision": "20240410", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -890,11 +1057,6 @@ "description": "Location in which this revision is deployed.", "type": "string" }, - "serviceName": { - "deprecated": true, - "description": "ID of Cloud Run Service this revision belongs to.", - "type": "string" - }, "serviceUri": { "description": "URI of Cloud Run service this revision belongs to.", "type": "string" @@ -1772,6 +1934,31 @@ }, "type": "object" }, + "ListVpcFlowLogsConfigsResponse": { + "description": "Response for the `ListVpcFlowLogsConfigs` method.", + "id": "ListVpcFlowLogsConfigsResponse", + "properties": { + "nextPageToken": { + "description": "Page token to fetch the next set of configurations.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached (when querying all locations with `-`).", + "items": { + "type": "string" + }, + "type": "array" + }, + "vpcFlowLogsConfigs": { + "description": "List of VPC Flow Log configurations.", + "items": { + "$ref": "VpcFlowLogsConfig" + }, + "type": "array" + } + }, + "type": "object" + }, "LoadBalancerBackend": { "description": "For display only. Metadata associated with a specific load balancer backend.", "id": "LoadBalancerBackend", @@ -2828,6 +3015,117 @@ }, "type": "object" }, + "VpcFlowLogsConfig": { + "description": "A configuration to generate VPC Flow Logs.", + "id": "VpcFlowLogsConfig", + "properties": { + "aggregationInterval": { + "description": "Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC.", + "enum": [ + "AGGREGATION_INTERVAL_UNSPECIFIED", + "INTERVAL_5_SEC", + "INTERVAL_30_SEC", + "INTERVAL_1_MIN", + "INTERVAL_5_MIN", + "INTERVAL_10_MIN", + "INTERVAL_15_MIN" + ], + "enumDescriptions": [ + "If not specified, will default to INTERVAL_5_SEC.", + "Aggregate logs in 5s intervals.", + "Aggregate logs in 30s intervals.", + "Aggregate logs in 1m intervals.", + "Aggregate logs in 5m intervals.", + "Aggregate logs in 10m intervals.", + "Aggregate logs in 15m intervals." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. The time the config was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.", + "type": "string" + }, + "filterExpr": { + "description": "Export filter used to define which VPC flow logs should be logged.", + "type": "string" + }, + "flowSampling": { + "description": "Optional. The value of the field must be in [0, 1]. The sampling rate of VPC flow logs within the subnetwork where 1.0 means all collected logs are reported and 0.0 means no logs are reported. Default value is 1.0.", + "format": "float", + "type": "number" + }, + "interconnectAttachment": { + "description": "Traffic will be logged from the Interconnect Attachment. Format: projects/{project_id}/locations/{region}/interconnectAttachments/{name}", + "type": "string" + }, + "metadata": { + "description": "Optional. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default value is INCLUDE_ALL_METADATA.", + "enum": [ + "METADATA_UNSPECIFIED", + "INCLUDE_ALL_METADATA", + "EXCLUDE_ALL_METADATA", + "CUSTOM_METADATA" + ], + "enumDescriptions": [ + "If not specified, will default to INCLUDE_ALL_METADATA.", + "Include all metadata fields.", + "Exclude all metadata fields.", + "Include only custom fields (specified in metadata_fields)." + ], + "type": "string" + }, + "metadataFields": { + "description": "Optional. Custom metadata fields to include in the reported VPC flow logs. Can only be specified if \"metadata\" was set to CUSTOM_METADATA.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Identifier. Unique name of the configuration using the form: `projects/{project_id}/locations/global/vpcFlowLogs/{vpc_flow_log}`", + "type": "string" + }, + "network": { + "description": "Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network. Format: projects/{project_id}/networks/{name}", + "type": "string" + }, + "state": { + "description": "Optional. The state of the VPC Flow Log. Default value is ENABLED.", + "enum": [ + "STATE_UNSPECIFIED", + "ENABLED", + "DISABLED" + ], + "enumDescriptions": [ + "If not specified, will default to ENABLED.", + "When ENABLED, this configuration will generate logs.", + "When DISABLED, this configuration will not generate logs." + ], + "type": "string" + }, + "subnet": { + "description": "Traffic will be logged from VMs within the subnetwork. Format: projects/{project_id}/locations/{region}/subnetworks/{name}", + "type": "string" + }, + "updateTime": { + "description": "Output only. The time the config was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "vpnTunnel": { + "description": "Traffic will be logged from the VPN Tunnel. Format: projects/{project_id}/locations/{region}/vpnTunnels/{name}", + "type": "string" + } + }, + "type": "object" + }, "VpnGatewayInfo": { "description": "For display only. Metadata associated with a Compute Engine VPN gateway.", "id": "VpnGatewayInfo", diff --git a/networkmanagement/v1beta1/networkmanagement-gen.go b/networkmanagement/v1beta1/networkmanagement-gen.go index 286b923967a..73ff3c6ffe1 100644 --- a/networkmanagement/v1beta1/networkmanagement-gen.go +++ b/networkmanagement/v1beta1/networkmanagement-gen.go @@ -170,6 +170,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Global = NewProjectsLocationsGlobalService(s) + rs.VpcFlowLogsConfigs = NewProjectsLocationsVpcFlowLogsConfigsService(s) return rs } @@ -177,6 +178,8 @@ type ProjectsLocationsService struct { s *Service Global *ProjectsLocationsGlobalService + + VpcFlowLogsConfigs *ProjectsLocationsVpcFlowLogsConfigsService } func NewProjectsLocationsGlobalService(s *Service) *ProjectsLocationsGlobalService { @@ -212,6 +215,15 @@ type ProjectsLocationsGlobalOperationsService struct { s *Service } +func NewProjectsLocationsVpcFlowLogsConfigsService(s *Service) *ProjectsLocationsVpcFlowLogsConfigsService { + rs := &ProjectsLocationsVpcFlowLogsConfigsService{s: s} + return rs +} + +type ProjectsLocationsVpcFlowLogsConfigsService struct { + s *Service +} + // AbortInfo: Details of the final state "abort" and associated // resource. type AbortInfo struct { @@ -718,9 +730,6 @@ type CloudRunRevisionInfo struct { // Location: Location in which this revision is deployed. Location string `json:"location,omitempty"` - // ServiceName: ID of Cloud Run Service this revision belongs to. - ServiceName string `json:"serviceName,omitempty"` - // ServiceUri: URI of Cloud Run service this revision belongs to. ServiceUri string `json:"serviceUri,omitempty"` @@ -1983,6 +1992,46 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListVpcFlowLogsConfigsResponse: Response for the +// `ListVpcFlowLogsConfigs` method. +type ListVpcFlowLogsConfigsResponse struct { + // NextPageToken: Page token to fetch the next set of configurations. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached (when querying all + // locations with `-`). + Unreachable []string `json:"unreachable,omitempty"` + + // VpcFlowLogsConfigs: List of VPC Flow Log configurations. + VpcFlowLogsConfigs []*VpcFlowLogsConfig `json:"vpcFlowLogsConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListVpcFlowLogsConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListVpcFlowLogsConfigsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LoadBalancerBackend: For display only. Metadata associated with a // specific load balancer backend. type LoadBalancerBackend struct { @@ -3362,6 +3411,135 @@ func (s *VpcConnectorInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VpcFlowLogsConfig: A configuration to generate VPC Flow Logs. +type VpcFlowLogsConfig struct { + // AggregationInterval: Optional. The aggregation interval for the logs. + // Default value is INTERVAL_5_SEC. + // + // Possible values: + // "AGGREGATION_INTERVAL_UNSPECIFIED" - If not specified, will default + // to INTERVAL_5_SEC. + // "INTERVAL_5_SEC" - Aggregate logs in 5s intervals. + // "INTERVAL_30_SEC" - Aggregate logs in 30s intervals. + // "INTERVAL_1_MIN" - Aggregate logs in 1m intervals. + // "INTERVAL_5_MIN" - Aggregate logs in 5m intervals. + // "INTERVAL_10_MIN" - Aggregate logs in 10m intervals. + // "INTERVAL_15_MIN" - Aggregate logs in 15m intervals. + AggregationInterval string `json:"aggregationInterval,omitempty"` + + // CreateTime: Output only. The time the config was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. The user-supplied description of the VPC Flow + // Logs configuration. Maximum of 512 characters. + Description string `json:"description,omitempty"` + + // FilterExpr: Export filter used to define which VPC flow logs should + // be logged. + FilterExpr string `json:"filterExpr,omitempty"` + + // FlowSampling: Optional. The value of the field must be in [0, 1]. The + // sampling rate of VPC flow logs within the subnetwork where 1.0 means + // all collected logs are reported and 0.0 means no logs are reported. + // Default value is 1.0. + FlowSampling float64 `json:"flowSampling,omitempty"` + + // InterconnectAttachment: Traffic will be logged from the Interconnect + // Attachment. Format: + // projects/{project_id}/locations/{region}/interconnectAttachments/{name + // } + InterconnectAttachment string `json:"interconnectAttachment,omitempty"` + + // Metadata: Optional. Configures whether all, none or a subset of + // metadata fields should be added to the reported VPC flow logs. + // Default value is INCLUDE_ALL_METADATA. + // + // Possible values: + // "METADATA_UNSPECIFIED" - If not specified, will default to + // INCLUDE_ALL_METADATA. + // "INCLUDE_ALL_METADATA" - Include all metadata fields. + // "EXCLUDE_ALL_METADATA" - Exclude all metadata fields. + // "CUSTOM_METADATA" - Include only custom fields (specified in + // metadata_fields). + Metadata string `json:"metadata,omitempty"` + + // MetadataFields: Optional. Custom metadata fields to include in the + // reported VPC flow logs. Can only be specified if "metadata" was set + // to CUSTOM_METADATA. + MetadataFields []string `json:"metadataFields,omitempty"` + + // Name: Identifier. Unique name of the configuration using the form: + // `projects/{project_id}/locations/global/vpcFlowLogs/{vpc_flow_log}` + Name string `json:"name,omitempty"` + + // Network: Traffic will be logged from VMs, VPN tunnels and + // Interconnect Attachments within the network. Format: + // projects/{project_id}/networks/{name} + Network string `json:"network,omitempty"` + + // State: Optional. The state of the VPC Flow Log. Default value is + // ENABLED. + // + // Possible values: + // "STATE_UNSPECIFIED" - If not specified, will default to ENABLED. + // "ENABLED" - When ENABLED, this configuration will generate logs. + // "DISABLED" - When DISABLED, this configuration will not generate + // logs. + State string `json:"state,omitempty"` + + // Subnet: Traffic will be logged from VMs within the subnetwork. + // Format: projects/{project_id}/locations/{region}/subnetworks/{name} + Subnet string `json:"subnet,omitempty"` + + // UpdateTime: Output only. The time the config was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // VpnTunnel: Traffic will be logged from the VPN Tunnel. Format: + // projects/{project_id}/locations/{region}/vpnTunnels/{name} + VpnTunnel string `json:"vpnTunnel,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AggregationInterval") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregationInterval") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VpcFlowLogsConfig) MarshalJSON() ([]byte, error) { + type NoMethod VpcFlowLogsConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *VpcFlowLogsConfig) UnmarshalJSON(data []byte) error { + type NoMethod VpcFlowLogsConfig + var s1 struct { + FlowSampling gensupport.JSONFloat64 `json:"flowSampling"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.FlowSampling = float64(s1.FlowSampling) + return nil +} + // VpnGatewayInfo: For display only. Metadata associated with a Compute // Engine VPN gateway. type VpnGatewayInfo struct { @@ -4698,7 +4876,7 @@ type ProjectsLocationsGlobalConnectivityTestsPatchCall struct { // the reachability result returns a value of UNKNOWN. If the endpoint // specifications in `ConnectivityTest` are incomplete, the reachability // result returns a value of `AMBIGUOUS`. See the documentation in -// `ConnectivityTest` for for more details. +// `ConnectivityTest` for more details. // // - name: Unique name of the resource using the form: // `projects/{project_id}/locations/global/connectivityTests/{test}`. @@ -4808,7 +4986,7 @@ func (c *ProjectsLocationsGlobalConnectivityTestsPatchCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for for more details.", + // "description": "Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for more details.", // "flatPath": "v1beta1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}", // "httpMethod": "PATCH", // "id": "networkmanagement.projects.locations.global.connectivityTests.patch", @@ -5931,3 +6109,826 @@ func (c *ProjectsLocationsGlobalOperationsListCall) Pages(ctx context.Context, f c.PageToken(x.NextPageToken) } } + +// method id "networkmanagement.projects.locations.vpcFlowLogsConfigs.create": + +type ProjectsLocationsVpcFlowLogsConfigsCreateCall struct { + s *Service + parent string + vpcflowlogsconfig *VpcFlowLogsConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new VPC Flow Logs configuration. If a configuration +// with the exact same settings already exists, the creation fails. +// +// - parent: The parent resource of the VPC Flow Logs configuration to +// create: `projects/{project_id}/locations/global`. +func (r *ProjectsLocationsVpcFlowLogsConfigsService) Create(parent string, vpcflowlogsconfig *VpcFlowLogsConfig) *ProjectsLocationsVpcFlowLogsConfigsCreateCall { + c := &ProjectsLocationsVpcFlowLogsConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.vpcflowlogsconfig = vpcflowlogsconfig + return c +} + +// VpcFlowLogsConfigId sets the optional parameter +// "vpcFlowLogsConfigId": Required. ID of the VpcFlowLogsConfig. +func (c *ProjectsLocationsVpcFlowLogsConfigsCreateCall) VpcFlowLogsConfigId(vpcFlowLogsConfigId string) *ProjectsLocationsVpcFlowLogsConfigsCreateCall { + c.urlParams_.Set("vpcFlowLogsConfigId", vpcFlowLogsConfigId) + 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 *ProjectsLocationsVpcFlowLogsConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVpcFlowLogsConfigsCreateCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsVpcFlowLogsConfigsCreateCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVpcFlowLogsConfigsCreateCall) 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.vpcflowlogsconfig) + 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/{+parent}/vpcFlowLogsConfigs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkmanagement.projects.locations.vpcFlowLogsConfigs.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsVpcFlowLogsConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new VPC Flow Logs configuration. If a configuration with the exact same settings already exists, the creation fails.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs", + // "httpMethod": "POST", + // "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource of the VPC Flow Logs configuration to create: `projects/{project_id}/locations/global`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "vpcFlowLogsConfigId": { + // "description": "Required. ID of the VpcFlowLogsConfig.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/vpcFlowLogsConfigs", + // "request": { + // "$ref": "VpcFlowLogsConfig" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkmanagement.projects.locations.vpcFlowLogsConfigs.delete": + +type ProjectsLocationsVpcFlowLogsConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a specific VpcFlowLog configuration. +// +// - name: VpcFlowLogsConfig name using the form: +// `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow +// _logs_config}`. +func (r *ProjectsLocationsVpcFlowLogsConfigsService) Delete(name string) *ProjectsLocationsVpcFlowLogsConfigsDeleteCall { + c := &ProjectsLocationsVpcFlowLogsConfigsDeleteCall{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 *ProjectsLocationsVpcFlowLogsConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVpcFlowLogsConfigsDeleteCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsVpcFlowLogsConfigsDeleteCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVpcFlowLogsConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkmanagement.projects.locations.vpcFlowLogsConfigs.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsVpcFlowLogsConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a specific VpcFlowLog configuration.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs/{vpcFlowLogsConfigsId}", + // "httpMethod": "DELETE", + // "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. VpcFlowLogsConfig name using the form: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkmanagement.projects.locations.vpcFlowLogsConfigs.get": + +type ProjectsLocationsVpcFlowLogsConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a specific VPC Flow Log configuration. +// +// - name: `VpcFlowLog` resource name using the form: +// `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow +// _logs_config}`. +func (r *ProjectsLocationsVpcFlowLogsConfigsService) Get(name string) *ProjectsLocationsVpcFlowLogsConfigsGetCall { + c := &ProjectsLocationsVpcFlowLogsConfigsGetCall{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 *ProjectsLocationsVpcFlowLogsConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVpcFlowLogsConfigsGetCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVpcFlowLogsConfigsGetCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsVpcFlowLogsConfigsGetCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVpcFlowLogsConfigsGetCall) 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, "v1beta1/{+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 "networkmanagement.projects.locations.vpcFlowLogsConfigs.get" call. +// Exactly one of *VpcFlowLogsConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *VpcFlowLogsConfig.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsVpcFlowLogsConfigsGetCall) Do(opts ...googleapi.CallOption) (*VpcFlowLogsConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &VpcFlowLogsConfig{ + 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 details of a specific VPC Flow Log configuration.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs/{vpcFlowLogsConfigsId}", + // "httpMethod": "GET", + // "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. `VpcFlowLog` resource name using the form: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "VpcFlowLogsConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkmanagement.projects.locations.vpcFlowLogsConfigs.list": + +type ProjectsLocationsVpcFlowLogsConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all VPC Flow Logs configurations in a given project. +// +// - parent: The parent resource of the VpcFlowLogsConfig: +// `projects/{project_id}/locations/global`. +func (r *ProjectsLocationsVpcFlowLogsConfigsService) List(parent string) *ProjectsLocationsVpcFlowLogsConfigsListCall { + c := &ProjectsLocationsVpcFlowLogsConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists the +// `VpcFlowLogsConfig`s that match the filter expression. A filter +// expression filters the resources listed in the response. The +// expression must be of the form ` ` where operators: `<`, `>`, `<=`, +// `>=`, `!=`, `=`, `:` are supported (colon `:` represents a HAS +// operator which is roughly synonymous with equality). can refer to a +// proto or JSON field, or a synthetic field. Field names can be +// camelCase or snake_case. Examples: - Filter by name: name = +// "projects/proj-1/locations/global/vpcFlowLogsConfigs/config-1 - +// Filter by target resource: - Configurations at the VPC network level +// target_resource.network:* - Configurations for a VPC network called +// `vpc-1` target_resource.network = vpc-1 +func (c *ProjectsLocationsVpcFlowLogsConfigsListCall) Filter(filter string) *ProjectsLocationsVpcFlowLogsConfigsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to use to sort +// the list. +func (c *ProjectsLocationsVpcFlowLogsConfigsListCall) OrderBy(orderBy string) *ProjectsLocationsVpcFlowLogsConfigsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Number of +// `VpcFlowLogsConfig`s to return. +func (c *ProjectsLocationsVpcFlowLogsConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsVpcFlowLogsConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token from an +// earlier query, as returned in `next_page_token`. +func (c *ProjectsLocationsVpcFlowLogsConfigsListCall) PageToken(pageToken string) *ProjectsLocationsVpcFlowLogsConfigsListCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVpcFlowLogsConfigsListCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVpcFlowLogsConfigsListCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsListCall) Context(ctx context.Context) *ProjectsLocationsVpcFlowLogsConfigsListCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVpcFlowLogsConfigsListCall) 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, "v1beta1/{+parent}/vpcFlowLogsConfigs") + 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 "networkmanagement.projects.locations.vpcFlowLogsConfigs.list" call. +// Exactly one of *ListVpcFlowLogsConfigsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListVpcFlowLogsConfigsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsVpcFlowLogsConfigsListCall) Do(opts ...googleapi.CallOption) (*ListVpcFlowLogsConfigsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListVpcFlowLogsConfigsResponse{ + 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 all VPC Flow Logs configurations in a given project.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs", + // "httpMethod": "GET", + // "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Lists the `VpcFlowLogsConfig`s that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form ` ` where operators: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is roughly synonymous with equality). can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = \"projects/proj-1/locations/global/vpcFlowLogsConfigs/config-1 - Filter by target resource: - Configurations at the VPC network level target_resource.network:* - Configurations for a VPC network called `vpc-1` target_resource.network = vpc-1", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Field to use to sort the list.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Number of `VpcFlowLogsConfig`s to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token from an earlier query, as returned in `next_page_token`.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource of the VpcFlowLogsConfig: `projects/{project_id}/locations/global`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/vpcFlowLogsConfigs", + // "response": { + // "$ref": "ListVpcFlowLogsConfigsResponse" + // }, + // "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 *ProjectsLocationsVpcFlowLogsConfigsListCall) Pages(ctx context.Context, f func(*ListVpcFlowLogsConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networkmanagement.projects.locations.vpcFlowLogsConfigs.patch": + +type ProjectsLocationsVpcFlowLogsConfigsPatchCall struct { + s *Service + name string + vpcflowlogsconfig *VpcFlowLogsConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing VpcFlowLogsConfig. If a configuration with +// the exact same settings already exists, the creation fails. +// +// - name: Identifier. Unique name of the configuration using the form: +// `projects/{project_id}/locations/global/vpcFlowLogs/{vpc_flow_log}`. +func (r *ProjectsLocationsVpcFlowLogsConfigsService) Patch(name string, vpcflowlogsconfig *VpcFlowLogsConfig) *ProjectsLocationsVpcFlowLogsConfigsPatchCall { + c := &ProjectsLocationsVpcFlowLogsConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.vpcflowlogsconfig = vpcflowlogsconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. At least one path must be supplied in this +// field. +func (c *ProjectsLocationsVpcFlowLogsConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVpcFlowLogsConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsVpcFlowLogsConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVpcFlowLogsConfigsPatchCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsVpcFlowLogsConfigsPatchCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVpcFlowLogsConfigsPatchCall) 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.vpcflowlogsconfig) + 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}") + 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 "networkmanagement.projects.locations.vpcFlowLogsConfigs.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsVpcFlowLogsConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an existing VpcFlowLogsConfig. If a configuration with the exact same settings already exists, the creation fails.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs/{vpcFlowLogsConfigsId}", + // "httpMethod": "PATCH", + // "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Identifier. Unique name of the configuration using the form: `projects/{project_id}/locations/global/vpcFlowLogs/{vpc_flow_log}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update. At least one path must be supplied in this field.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "VpcFlowLogsConfig" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/networkservices/v1/networkservices-api.json b/networkservices/v1/networkservices-api.json index 07b6acb022c..3b79de13415 100644 --- a/networkservices/v1/networkservices-api.json +++ b/networkservices/v1/networkservices-api.json @@ -1415,7 +1415,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + "description": "Optional. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1597,7 +1597,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + "description": "Optional. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -2756,7 +2756,7 @@ } } }, - "revision": "20240315", + "revision": "20240410", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -5076,7 +5076,7 @@ "type": "array" }, "sniHost": { - "description": "Optional. SNI (server name indicator) to match against. SNI will be matched against all wildcard domains, i.e. `www.example.com` will be first matched against `www.example.com`, then `*.example.com`, then `*.com.` Partial wildcards are not supported, and values like *w.example.com are invalid. At least one of sni_host and alpn is required. Up to 5 sni hosts across all matches can be set.", + "description": "Optional. SNI (server name indicator) to match against. SNI will be matched against all wildcard domains, i.e. `www.example.com` will be first matched against `www.example.com`, then `*.example.com`, then `*.com.` Partial wildcards are not supported, and values like *w.example.com are invalid. At least one of sni_host and alpn is required. Up to 100 sni hosts across all matches can be set.", "items": { "type": "string" }, diff --git a/networkservices/v1/networkservices-gen.go b/networkservices/v1/networkservices-gen.go index 0e3ed140a37..91396ae03bf 100644 --- a/networkservices/v1/networkservices-gen.go +++ b/networkservices/v1/networkservices-gen.go @@ -4439,7 +4439,7 @@ type TlsRouteRouteMatch struct { // will be first matched against `www.example.com`, then // `*.example.com`, then `*.com.` Partial wildcards are not supported, // and values like *w.example.com are invalid. At least one of sni_host - // and alpn is required. Up to 5 sni hosts across all matches can be + // and alpn is required. Up to 100 sni hosts across all matches can be // set. SniHost []string `json:"sniHost,omitempty"` @@ -11156,12 +11156,12 @@ func (c *ProjectsLocationsLbRouteExtensionsPatchCall) RequestId(requestId string return c } -// UpdateMask sets the optional parameter "updateMask": Required. Used -// to specify the fields to be overwritten in the `LbRouteExtension` -// resource by the update. The fields specified in the update_mask are -// relative to the resource, not the full request. A field is -// overwritten if it is in the mask. If the user does not specify a -// mask, then all fields are overwritten. +// UpdateMask sets the optional parameter "updateMask": Used to specify +// the fields to be overwritten in the `LbRouteExtension` resource by +// the update. The fields specified in the update_mask are relative to +// the resource, not the full request. A field is overwritten if it is +// in the mask. If the user does not specify a mask, then all fields are +// overwritten. func (c *ProjectsLocationsLbRouteExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbRouteExtensionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -11279,7 +11279,7 @@ func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Do(opts ...googleapi.CallO // "type": "string" // }, // "updateMask": { - // "description": "Required. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + // "description": "Optional. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -12045,12 +12045,12 @@ func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) RequestId(requestId stri return c } -// UpdateMask sets the optional parameter "updateMask": Required. Used -// to specify the fields to be overwritten in the `LbTrafficExtension` -// resource by the update. The fields specified in the update_mask are -// relative to the resource, not the full request. A field is -// overwritten if it is in the mask. If the user does not specify a -// mask, then all fields are overwritten. +// UpdateMask sets the optional parameter "updateMask": Used to specify +// the fields to be overwritten in the `LbTrafficExtension` resource by +// the update. The fields specified in the update_mask are relative to +// the resource, not the full request. A field is overwritten if it is +// in the mask. If the user does not specify a mask, then all fields are +// overwritten. func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbTrafficExtensionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -12168,7 +12168,7 @@ func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Do(opts ...googleapi.Cal // "type": "string" // }, // "updateMask": { - // "description": "Required. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + // "description": "Optional. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/networkservices/v1beta1/networkservices-api.json b/networkservices/v1beta1/networkservices-api.json index 2a169727131..c0dc852831e 100644 --- a/networkservices/v1beta1/networkservices-api.json +++ b/networkservices/v1beta1/networkservices-api.json @@ -1142,7 +1142,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + "description": "Optional. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1324,7 +1324,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + "description": "Optional. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -2483,7 +2483,7 @@ } } }, - "revision": "20240315", + "revision": "20240410", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -4803,7 +4803,7 @@ "type": "array" }, "sniHost": { - "description": "Optional. SNI (server name indicator) to match against. SNI will be matched against all wildcard domains, i.e. `www.example.com` will be first matched against `www.example.com`, then `*.example.com`, then `*.com.` Partial wildcards are not supported, and values like *w.example.com are invalid. At least one of sni_host and alpn is required. Up to 5 sni hosts across all matches can be set.", + "description": "Optional. SNI (server name indicator) to match against. SNI will be matched against all wildcard domains, i.e. `www.example.com` will be first matched against `www.example.com`, then `*.example.com`, then `*.com.` Partial wildcards are not supported, and values like *w.example.com are invalid. At least one of sni_host and alpn is required. Up to 100 sni hosts across all matches can be set.", "items": { "type": "string" }, diff --git a/networkservices/v1beta1/networkservices-gen.go b/networkservices/v1beta1/networkservices-gen.go index 500de508f7c..ba70cb76ddc 100644 --- a/networkservices/v1beta1/networkservices-gen.go +++ b/networkservices/v1beta1/networkservices-gen.go @@ -4402,7 +4402,7 @@ type TlsRouteRouteMatch struct { // will be first matched against `www.example.com`, then // `*.example.com`, then `*.com.` Partial wildcards are not supported, // and values like *w.example.com are invalid. At least one of sni_host - // and alpn is required. Up to 5 sni hosts across all matches can be + // and alpn is required. Up to 100 sni hosts across all matches can be // set. SniHost []string `json:"sniHost,omitempty"` @@ -9703,12 +9703,12 @@ func (c *ProjectsLocationsLbRouteExtensionsPatchCall) RequestId(requestId string return c } -// UpdateMask sets the optional parameter "updateMask": Required. Used -// to specify the fields to be overwritten in the `LbRouteExtension` -// resource by the update. The fields specified in the update_mask are -// relative to the resource, not the full request. A field is -// overwritten if it is in the mask. If the user does not specify a -// mask, then all fields are overwritten. +// UpdateMask sets the optional parameter "updateMask": Used to specify +// the fields to be overwritten in the `LbRouteExtension` resource by +// the update. The fields specified in the update_mask are relative to +// the resource, not the full request. A field is overwritten if it is +// in the mask. If the user does not specify a mask, then all fields are +// overwritten. func (c *ProjectsLocationsLbRouteExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbRouteExtensionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -9826,7 +9826,7 @@ func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Do(opts ...googleapi.CallO // "type": "string" // }, // "updateMask": { - // "description": "Required. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + // "description": "Optional. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -10592,12 +10592,12 @@ func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) RequestId(requestId stri return c } -// UpdateMask sets the optional parameter "updateMask": Required. Used -// to specify the fields to be overwritten in the `LbTrafficExtension` -// resource by the update. The fields specified in the update_mask are -// relative to the resource, not the full request. A field is -// overwritten if it is in the mask. If the user does not specify a -// mask, then all fields are overwritten. +// UpdateMask sets the optional parameter "updateMask": Used to specify +// the fields to be overwritten in the `LbTrafficExtension` resource by +// the update. The fields specified in the update_mask are relative to +// the resource, not the full request. A field is overwritten if it is +// in the mask. If the user does not specify a mask, then all fields are +// overwritten. func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbTrafficExtensionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -10715,7 +10715,7 @@ func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Do(opts ...googleapi.Cal // "type": "string" // }, // "updateMask": { - // "description": "Required. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + // "description": "Optional. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/privateca/v1/privateca-api.json b/privateca/v1/privateca-api.json index 65ae3cc4e83..4dfe0ad58e6 100644 --- a/privateca/v1/privateca-api.json +++ b/privateca/v1/privateca-api.json @@ -227,7 +227,7 @@ ], "parameters": { "ignoreDependentResources": { - "description": "Optional. This field allows this pool to be deleted even if it's being depended on by another resource. However, doing so may result in unintended and unrecoverable effects on any dependent resource(s) since the pool will no longer be able to issue certificates.", + "description": "Optional. This field allows this pool to be deleted even if it's being depended on by another resource. However, doing so may result in unintended and unrecoverable effects on any dependent resources since the pool will no longer be able to issue certificates.", "location": "query", "type": "boolean" }, @@ -253,7 +253,7 @@ ] }, "fetchCaCerts": { - "description": "FetchCaCerts returns the current trust anchor for the CaPool. This will include CA certificate chains for all Certificate Authorities in the ENABLED, DISABLED, or STAGED states.", + "description": "FetchCaCerts returns the current trust anchor for the CaPool. This will include CA certificate chains for all certificate authorities in the ENABLED, DISABLED, or STAGED states.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}:fetchCaCerts", "httpMethod": "POST", "id": "privateca.projects.locations.caPools.fetchCaCerts", @@ -562,7 +562,7 @@ "type": "boolean" }, "ignoreDependentResources": { - "description": "Optional. This field allows this ca to be deleted even if it's being depended on by another resource. However, doing so may result in unintended and unrecoverable effects on any dependent resource(s) since the CA will no longer be able to issue certificates.", + "description": "Optional. This field allows this CA to be deleted even if it's being depended on by another resource. However, doing so may result in unintended and unrecoverable effects on any dependent resources since the CA will no longer be able to issue certificates.", "location": "query", "type": "boolean" }, @@ -1605,7 +1605,7 @@ } } }, - "revision": "20240313", + "revision": "20240410", "rootUrl": "https://privateca.googleapis.com/", "schemas": { "AccessUrls": { @@ -2045,7 +2045,7 @@ }, "subjectKeyId": { "$ref": "CertificateConfigKeyId", - "description": "Optional. When specified this provides a custom SKI to be used in the certificate. This should only be used to maintain a SKI of an existing CA originally created outside CAS, which was not generated using method (1) described in RFC 5280 section 4.2.1.2." + "description": "Optional. When specified this provides a custom SKI to be used in the certificate. This should only be used to maintain a SKI of an existing CA originally created outside CA service, which was not generated using method (1) described in RFC 5280 section 4.2.1.2." }, "x509Config": { "$ref": "X509Parameters", @@ -2280,7 +2280,7 @@ "type": "object" }, "maximumLifetime": { - "description": "Optional. The maximum lifetime allowed for issued Certificates that use this template. If the issuing CaPool's IssuancePolicy specifies a maximum_lifetime the minimum of the two durations will be the maximum lifetime for issued Certificates. Note that if the issuing CertificateAuthority expires before a Certificate's requested maximum_lifetime, the effective lifetime will be explicitly truncated to match it.", + "description": "Optional. The maximum lifetime allowed for issued Certificates that use this template. If the issuing CaPool resource's IssuancePolicy specifies a maximum_lifetime the minimum of the two durations will be the maximum lifetime for issued Certificates. Note that if the issuing CertificateAuthority expires before a Certificate's requested maximum_lifetime, the effective lifetime will be explicitly truncated to match it.", "format": "google-duration", "type": "string" }, @@ -2311,7 +2311,7 @@ "id": "DisableCertificateAuthorityRequest", "properties": { "ignoreDependentResources": { - "description": "Optional. This field allows this CA to be disabled even if it's being depended on by another resource. However, doing so may result in unintended and unrecoverable effects on any dependent resource(s) since the CA will no longer be able to issue certificates.", + "description": "Optional. This field allows this CA to be disabled even if it's being depended on by another resource. However, doing so may result in unintended and unrecoverable effects on any dependent resources since the CA will no longer be able to issue certificates.", "type": "boolean" }, "requestId": { @@ -2431,7 +2431,7 @@ "id": "FetchCaCertsResponse", "properties": { "caCerts": { - "description": "The PEM encoded CA certificate chains of all Certificate Authorities in this CaPool in the ENABLED, DISABLED, or STAGED states.", + "description": "The PEM encoded CA certificate chains of all certificate authorities in this CaPool in the ENABLED, DISABLED, or STAGED states.", "items": { "$ref": "CertChain" }, @@ -2491,7 +2491,7 @@ "description": "Optional. Describes constraints on identities that may appear in Certificates issued through this CaPool. If this is omitted, then this CaPool will not add restrictions on a certificate's identity." }, "maximumLifetime": { - "description": "Optional. The maximum lifetime allowed for issued Certificates. Note that if the issuing CertificateAuthority expires before a Certificate's requested maximum_lifetime, the effective lifetime will be explicitly truncated to match it.", + "description": "Optional. The maximum lifetime allowed for issued Certificates. Note that if the issuing CertificateAuthority expires before a Certificate resource's requested maximum_lifetime, the effective lifetime will be explicitly truncated to match it.", "format": "google-duration", "type": "string" }, @@ -3031,7 +3031,7 @@ "id": "PublishingOptions", "properties": { "encodingFormat": { - "description": "Optional. Specifies the encoding format of each CertificateAuthority's CA certificate and CRLs. If this is omitted, CA certificates and CRLs will be published in PEM.", + "description": "Optional. Specifies the encoding format of each CertificateAuthority resource's CA certificate and CRLs. If this is omitted, CA certificates and CRLs will be published in PEM.", "enum": [ "ENCODING_FORMAT_UNSPECIFIED", "PEM", diff --git a/privateca/v1/privateca-gen.go b/privateca/v1/privateca-gen.go index d6c8b96bb36..89b90ae5dd8 100644 --- a/privateca/v1/privateca-gen.go +++ b/privateca/v1/privateca-gen.go @@ -969,8 +969,9 @@ type CertificateConfig struct { // SubjectKeyId: Optional. When specified this provides a custom SKI to // be used in the certificate. This should only be used to maintain a - // SKI of an existing CA originally created outside CAS, which was not - // generated using method (1) described in RFC 5280 section 4.2.1.2. + // SKI of an existing CA originally created outside CA service, which + // was not generated using method (1) described in RFC 5280 section + // 4.2.1.2. SubjectKeyId *CertificateConfigKeyId `json:"subjectKeyId,omitempty"` // X509Config: Required. Describes how some of the technical X.509 @@ -1330,7 +1331,7 @@ type CertificateTemplate struct { Labels map[string]string `json:"labels,omitempty"` // MaximumLifetime: Optional. The maximum lifetime allowed for issued - // Certificates that use this template. If the issuing CaPool's + // Certificates that use this template. If the issuing CaPool resource's // IssuancePolicy specifies a maximum_lifetime the minimum of the two // durations will be the maximum lifetime for issued Certificates. Note // that if the issuing CertificateAuthority expires before a @@ -1400,7 +1401,7 @@ type DisableCertificateAuthorityRequest struct { // IgnoreDependentResources: Optional. This field allows this CA to be // disabled even if it's being depended on by another resource. However, // doing so may result in unintended and unrecoverable effects on any - // dependent resource(s) since the CA will no longer be able to issue + // dependent resources since the CA will no longer be able to issue // certificates. IgnoreDependentResources bool `json:"ignoreDependentResources,omitempty"` @@ -1693,8 +1694,8 @@ func (s *FetchCaCertsRequest) MarshalJSON() ([]byte, error) { // FetchCaCertsResponse: Response message for // CertificateAuthorityService.FetchCaCerts. type FetchCaCertsResponse struct { - // CaCerts: The PEM encoded CA certificate chains of all Certificate - // Authorities in this CaPool in the ENABLED, DISABLED, or STAGED + // CaCerts: The PEM encoded CA certificate chains of all certificate + // authorities in this CaPool in the ENABLED, DISABLED, or STAGED // states. CaCerts []*CertChain `json:"caCerts,omitempty"` @@ -1824,8 +1825,8 @@ type IssuancePolicy struct { // MaximumLifetime: Optional. The maximum lifetime allowed for issued // Certificates. Note that if the issuing CertificateAuthority expires - // before a Certificate's requested maximum_lifetime, the effective - // lifetime will be explicitly truncated to match it. + // before a Certificate resource's requested maximum_lifetime, the + // effective lifetime will be explicitly truncated to match it. MaximumLifetime string `json:"maximumLifetime,omitempty"` // PassthroughExtensions: Optional. Describes the set of X.509 @@ -2770,8 +2771,8 @@ func (s *PublicKey) MarshalJSON() ([]byte, error) { // certificates issued by any CertificateAuthority in the CaPool. type PublishingOptions struct { // EncodingFormat: Optional. Specifies the encoding format of each - // CertificateAuthority's CA certificate and CRLs. If this is omitted, - // CA certificates and CRLs will be published in PEM. + // CertificateAuthority resource's CA certificate and CRLs. If this is + // omitted, CA certificates and CRLs will be published in PEM. // // Possible values: // "ENCODING_FORMAT_UNSPECIFIED" - Not specified. By default, PEM @@ -4163,7 +4164,7 @@ func (r *ProjectsLocationsCaPoolsService) Delete(name string) *ProjectsLocations // "ignoreDependentResources": This field allows this pool to be deleted // even if it's being depended on by another resource. However, doing so // may result in unintended and unrecoverable effects on any dependent -// resource(s) since the pool will no longer be able to issue +// resources since the pool will no longer be able to issue // certificates. func (c *ProjectsLocationsCaPoolsDeleteCall) IgnoreDependentResources(ignoreDependentResources bool) *ProjectsLocationsCaPoolsDeleteCall { c.urlParams_.Set("ignoreDependentResources", fmt.Sprint(ignoreDependentResources)) @@ -4282,7 +4283,7 @@ func (c *ProjectsLocationsCaPoolsDeleteCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "ignoreDependentResources": { - // "description": "Optional. This field allows this pool to be deleted even if it's being depended on by another resource. However, doing so may result in unintended and unrecoverable effects on any dependent resource(s) since the pool will no longer be able to issue certificates.", + // "description": "Optional. This field allows this pool to be deleted even if it's being depended on by another resource. However, doing so may result in unintended and unrecoverable effects on any dependent resources since the pool will no longer be able to issue certificates.", // "location": "query", // "type": "boolean" // }, @@ -4322,8 +4323,8 @@ type ProjectsLocationsCaPoolsFetchCaCertsCall struct { } // FetchCaCerts: FetchCaCerts returns the current trust anchor for the -// CaPool. This will include CA certificate chains for all Certificate -// Authorities in the ENABLED, DISABLED, or STAGED states. +// CaPool. This will include CA certificate chains for all certificate +// authorities in the ENABLED, DISABLED, or STAGED states. // // - caPool: The resource name for the CaPool in the format // `projects/*/locations/*/caPools/*`. @@ -4425,7 +4426,7 @@ func (c *ProjectsLocationsCaPoolsFetchCaCertsCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "FetchCaCerts returns the current trust anchor for the CaPool. This will include CA certificate chains for all Certificate Authorities in the ENABLED, DISABLED, or STAGED states.", + // "description": "FetchCaCerts returns the current trust anchor for the CaPool. This will include CA certificate chains for all certificate authorities in the ENABLED, DISABLED, or STAGED states.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}:fetchCaCerts", // "httpMethod": "POST", // "id": "privateca.projects.locations.caPools.fetchCaCerts", @@ -5828,11 +5829,10 @@ func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall) IgnoreActiveC } // IgnoreDependentResources sets the optional parameter -// "ignoreDependentResources": This field allows this ca to be deleted +// "ignoreDependentResources": This field allows this CA to be deleted // even if it's being depended on by another resource. However, doing so // may result in unintended and unrecoverable effects on any dependent -// resource(s) since the CA will no longer be able to issue -// certificates. +// resources since the CA will no longer be able to issue certificates. func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall) IgnoreDependentResources(ignoreDependentResources bool) *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall { c.urlParams_.Set("ignoreDependentResources", fmt.Sprint(ignoreDependentResources)) return c @@ -5965,7 +5965,7 @@ func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall) Do(opts ...go // "type": "boolean" // }, // "ignoreDependentResources": { - // "description": "Optional. This field allows this ca to be deleted even if it's being depended on by another resource. However, doing so may result in unintended and unrecoverable effects on any dependent resource(s) since the CA will no longer be able to issue certificates.", + // "description": "Optional. This field allows this CA to be deleted even if it's being depended on by another resource. However, doing so may result in unintended and unrecoverable effects on any dependent resources since the CA will no longer be able to issue certificates.", // "location": "query", // "type": "boolean" // }, diff --git a/redis/v1/redis-api.json b/redis/v1/redis-api.json index ebe7fcd4c62..3c1831cecb7 100644 --- a/redis/v1/redis-api.json +++ b/redis/v1/redis-api.json @@ -821,7 +821,7 @@ } } }, - "revision": "20240327", + "revision": "20240411", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -983,6 +983,10 @@ "readOnly": true, "type": "string" }, + "deletionProtectionEnabled": { + "description": "Optional. The delete operation will fail when the value is set to true.", + "type": "boolean" + }, "discoveryEndpoints": { "description": "Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported.", "items": { diff --git a/redis/v1/redis-gen.go b/redis/v1/redis-gen.go index a481dd649f5..af37a2b1ff4 100644 --- a/redis/v1/redis-gen.go +++ b/redis/v1/redis-gen.go @@ -459,6 +459,10 @@ type Cluster struct { // creation request. CreateTime string `json:"createTime,omitempty"` + // DeletionProtectionEnabled: Optional. The delete operation will fail + // when the value is set to true. + DeletionProtectionEnabled bool `json:"deletionProtectionEnabled,omitempty"` + // DiscoveryEndpoints: Output only. Endpoints created on each given // network, for Redis clients to connect to the cluster. Currently only // one discovery endpoint is supported. diff --git a/redis/v1beta1/redis-api.json b/redis/v1beta1/redis-api.json index 47ee12fc763..645a70f5f8a 100644 --- a/redis/v1beta1/redis-api.json +++ b/redis/v1beta1/redis-api.json @@ -821,7 +821,7 @@ } } }, - "revision": "20240327", + "revision": "20240411", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -983,6 +983,10 @@ "readOnly": true, "type": "string" }, + "deletionProtectionEnabled": { + "description": "Optional. The delete operation will fail when the value is set to true.", + "type": "boolean" + }, "discoveryEndpoints": { "description": "Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported.", "items": { diff --git a/redis/v1beta1/redis-gen.go b/redis/v1beta1/redis-gen.go index 5b5e7c52d28..26d911be1fc 100644 --- a/redis/v1beta1/redis-gen.go +++ b/redis/v1beta1/redis-gen.go @@ -459,6 +459,10 @@ type Cluster struct { // creation request. CreateTime string `json:"createTime,omitempty"` + // DeletionProtectionEnabled: Optional. The delete operation will fail + // when the value is set to true. + DeletionProtectionEnabled bool `json:"deletionProtectionEnabled,omitempty"` + // DiscoveryEndpoints: Output only. Endpoints created on each given // network, for Redis clients to connect to the cluster. Currently only // one discovery endpoint is supported. diff --git a/servicecontrol/v1/servicecontrol-api.json b/servicecontrol/v1/servicecontrol-api.json index 23bdb90ebb1..90b33f0263c 100644 --- a/servicecontrol/v1/servicecontrol-api.json +++ b/servicecontrol/v1/servicecontrol-api.json @@ -197,7 +197,7 @@ } } }, - "revision": "20240223", + "revision": "20240412", "rootUrl": "https://servicecontrol.googleapis.com/", "schemas": { "AllocateInfo": { @@ -483,6 +483,24 @@ "description": "The required IAM permission.", "type": "string" }, + "permissionType": { + "description": "The type of the permission that was checked. For data access audit logs this corresponds with the permission type that must be enabled in the project/folder/organization IAM policy in order for the log to be written.", + "enum": [ + "PERMISSION_TYPE_UNSPECIFIED", + "ADMIN_READ", + "ADMIN_WRITE", + "DATA_READ", + "DATA_WRITE" + ], + "enumDescriptions": [ + "Default. Should not be used.", + "Permissions that gate reading resource configuration or metadata.", + "Permissions that gate modification of resource configuration or metadata.", + "Permissions that gate reading user-provided data.", + "Permissions that gate writing user-provided data." + ], + "type": "string" + }, "resource": { "description": "The resource being accessed, as a REST-style or cloud resource string. For example: bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID or projects/PROJECTID/datasets/DATASETID", "type": "string" diff --git a/servicecontrol/v1/servicecontrol-gen.go b/servicecontrol/v1/servicecontrol-gen.go index de31fcf6a46..c093194a49c 100644 --- a/servicecontrol/v1/servicecontrol-gen.go +++ b/servicecontrol/v1/servicecontrol-gen.go @@ -624,6 +624,21 @@ type AuthorizationInfo struct { // Permission: The required IAM permission. Permission string `json:"permission,omitempty"` + // PermissionType: The type of the permission that was checked. For data + // access audit logs this corresponds with the permission type that must + // be enabled in the project/folder/organization IAM policy in order for + // the log to be written. + // + // Possible values: + // "PERMISSION_TYPE_UNSPECIFIED" - Default. Should not be used. + // "ADMIN_READ" - Permissions that gate reading resource configuration + // or metadata. + // "ADMIN_WRITE" - Permissions that gate modification of resource + // configuration or metadata. + // "DATA_READ" - Permissions that gate reading user-provided data. + // "DATA_WRITE" - Permissions that gate writing user-provided data. + PermissionType string `json:"permissionType,omitempty"` + // Resource: The resource being accessed, as a REST-style or cloud // resource string. For example: // bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID or diff --git a/servicecontrol/v2/servicecontrol-api.json b/servicecontrol/v2/servicecontrol-api.json index 53c980f325d..5bbb4d02519 100644 --- a/servicecontrol/v2/servicecontrol-api.json +++ b/servicecontrol/v2/servicecontrol-api.json @@ -169,7 +169,7 @@ } } }, - "revision": "20240322", + "revision": "20240412", "rootUrl": "https://servicecontrol.googleapis.com/", "schemas": { "Api": { @@ -424,6 +424,24 @@ "description": "The required IAM permission.", "type": "string" }, + "permissionType": { + "description": "The type of the permission that was checked. For data access audit logs this corresponds with the permission type that must be enabled in the project/folder/organization IAM policy in order for the log to be written.", + "enum": [ + "PERMISSION_TYPE_UNSPECIFIED", + "ADMIN_READ", + "ADMIN_WRITE", + "DATA_READ", + "DATA_WRITE" + ], + "enumDescriptions": [ + "Default. Should not be used.", + "Permissions that gate reading resource configuration or metadata.", + "Permissions that gate modification of resource configuration or metadata.", + "Permissions that gate reading user-provided data.", + "Permissions that gate writing user-provided data." + ], + "type": "string" + }, "resource": { "description": "The resource being accessed, as a REST-style or cloud resource string. For example: bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID or projects/PROJECTID/datasets/DATASETID", "type": "string" diff --git a/servicecontrol/v2/servicecontrol-gen.go b/servicecontrol/v2/servicecontrol-gen.go index 57a9cfcb36c..bc2d444de23 100644 --- a/servicecontrol/v2/servicecontrol-gen.go +++ b/servicecontrol/v2/servicecontrol-gen.go @@ -549,6 +549,21 @@ type AuthorizationInfo struct { // Permission: The required IAM permission. Permission string `json:"permission,omitempty"` + // PermissionType: The type of the permission that was checked. For data + // access audit logs this corresponds with the permission type that must + // be enabled in the project/folder/organization IAM policy in order for + // the log to be written. + // + // Possible values: + // "PERMISSION_TYPE_UNSPECIFIED" - Default. Should not be used. + // "ADMIN_READ" - Permissions that gate reading resource configuration + // or metadata. + // "ADMIN_WRITE" - Permissions that gate modification of resource + // configuration or metadata. + // "DATA_READ" - Permissions that gate reading user-provided data. + // "DATA_WRITE" - Permissions that gate writing user-provided data. + PermissionType string `json:"permissionType,omitempty"` + // Resource: The resource being accessed, as a REST-style or cloud // resource string. For example: // bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID or diff --git a/sts/v1/sts-api.json b/sts/v1/sts-api.json index ba36d211f16..de96ad41df9 100644 --- a/sts/v1/sts-api.json +++ b/sts/v1/sts-api.json @@ -116,7 +116,7 @@ } } }, - "revision": "20240307", + "revision": "20240410", "rootUrl": "https://sts.googleapis.com/", "schemas": { "GoogleIamV1Binding": { @@ -202,7 +202,7 @@ "type": "string" }, "subjectToken": { - "description": "Required. The input token. This token is either an external credential issued by a workload identity pool provider, or a short-lived access token issued by Google. If the token is an OIDC JWT, it must use the JWT format defined in [RFC 7523](https://tools.ietf.org/html/rfc7523), and the `subject_token_type` must be either `urn:ietf:params:oauth:token-type:jwt` or `urn:ietf:params:oauth:token-type:id_token`. The following headers are required: - `kid`: The identifier of the signing key securing the JWT. - `alg`: The cryptographic algorithm securing the JWT. Must be `RS256` or `ES256`. The following payload fields are required. For more information, see [RFC 7523, Section 3](https://tools.ietf.org/html/rfc7523#section-3): - `iss`: The issuer of the token. The issuer must provide a discovery document at the URL `/.well-known/openid-configuration`, where `` is the value of this field. The document must be formatted according to section 4.2 of the [OIDC 1.0 Discovery specification](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse). - `iat`: The issue time, in seconds, since the Unix epoch. Must be in the past. - `exp`: The expiration time, in seconds, since the Unix epoch. Must be less than 48 hours after `iat`. Shorter expiration times are more secure. If possible, we recommend setting an expiration time less than 6 hours. - `sub`: The identity asserted in the JWT. - `aud`: For workload identity pools, this must be a value specified in the allowed audiences for the workload identity pool provider, or one of the audiences allowed by default if no audiences were specified. See https://cloud.google.com/iam/docs/reference/rest/v1/projects.locations.workloadIdentityPools.providers#oidc. For workforce pools, this must match the client ID specified in the provider configuration. See https://cloud.google.com/iam/docs/reference/rest/v1/locations.workforcePools.providers#oidc. Example header: ``` { \"alg\": \"RS256\", \"kid\": \"us-east-11\" } ``` Example payload: ``` { \"iss\": \"https://accounts.google.com\", \"iat\": 1517963104, \"exp\": 1517966704, \"aud\": \"//iam.googleapis.com/projects/1234567890123/locations/global/workloadIdentityPools/my-pool/providers/my-provider\", \"sub\": \"113475438248934895348\", \"my_claims\": { \"additional_claim\": \"value\" } } ``` If `subject_token` is for AWS, it must be a serialized `GetCallerIdentity` token. This token contains the same information as a request to the AWS [`GetCallerIdentity()`](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity) method, as well as the AWS [signature](https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) for the request information. Use Signature Version 4. Format the request as URL-encoded JSON, and set the `subject_token_type` parameter to `urn:ietf:params:aws:token-type:aws4_request`. The following parameters are required: - `url`: The URL of the AWS STS endpoint for `GetCallerIdentity()`, such as `https://sts.amazonaws.com?Action=GetCallerIdentity\u0026Version=2011-06-15`. Regional endpoints are also supported. - `method`: The HTTP request method: `POST`. - `headers`: The HTTP request headers, which must include: - `Authorization`: The request signature. - `x-amz-date`: The time you will send the request, formatted as an [ISO8601 Basic](https://docs.aws.amazon.com/general/latest/gr/sigv4_elements.html#sigv4_elements_date) string. This value is typically set to the current time and is used to help prevent replay attacks. - `host`: The hostname of the `url` field; for example, `sts.amazonaws.com`. - `x-goog-cloud-target-resource`: The full, canonical resource name of the workload identity pool provider, with or without an `https:` prefix. To help ensure data integrity, we recommend including this header in the `SignedHeaders` field of the signed request. For example: //iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/ https://iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/ If you are using temporary security credentials provided by AWS, you must also include the header `x-amz-security-token`, with the value set to the session token. The following example shows a `GetCallerIdentity` token: ``` { \"headers\": [ {\"key\": \"x-amz-date\", \"value\": \"20200815T015049Z\"}, {\"key\": \"Authorization\", \"value\": \"AWS4-HMAC-SHA256+Credential=$credential,+SignedHeaders=host;x-amz-date;x-goog-cloud-target-resource,+Signature=$signature\"}, {\"key\": \"x-goog-cloud-target-resource\", \"value\": \"//iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/\"}, {\"key\": \"host\", \"value\": \"sts.amazonaws.com\"} . ], \"method\": \"POST\", \"url\": \"https://sts.amazonaws.com?Action=GetCallerIdentity\u0026Version=2011-06-15\" } ``` If the token is a SAML 2.0 assertion, it must use the format defined in [the SAML 2.0 spec](https://www.oasis-open.org/committees/download.php/56776/sstc-saml-core-errata-2.0-wd-07.pdf), and the `subject_token_type` must be `urn:ietf:params:oauth:token-type:saml2`. See [Verification of external credentials](https://cloud.google.com/iam/docs/using-workload-identity-federation#verification_of_external_credentials) for details on how SAML 2.0 assertions are validated during token exchanges. You can also use a Google-issued OAuth 2.0 access token with this field to obtain an access token with new security attributes applied, such as a Credential Access Boundary. In this case, set `subject_token_type` to `urn:ietf:params:oauth:token-type:access_token`. If an access token already contains security attributes, you cannot apply additional security attributes.", + "description": "Required. The input token. This token is either an external credential issued by a workload identity pool provider, or a short-lived access token issued by Google. If the token is an OIDC JWT, it must use the JWT format defined in [RFC 7523](https://tools.ietf.org/html/rfc7523), and the `subject_token_type` must be either `urn:ietf:params:oauth:token-type:jwt` or `urn:ietf:params:oauth:token-type:id_token`. The following headers are required: - `kid`: The identifier of the signing key securing the JWT. - `alg`: The cryptographic algorithm securing the JWT. Must be `RS256` or `ES256`. The following payload fields are required. For more information, see [RFC 7523, Section 3](https://tools.ietf.org/html/rfc7523#section-3): - `iss`: The issuer of the token. The issuer must provide a discovery document at the URL `/.well-known/openid-configuration`, where `` is the value of this field. The document must be formatted according to section 4.2 of the [OIDC 1.0 Discovery specification](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse). - `iat`: The issue time, in seconds, since the Unix epoch. Must be in the past. - `exp`: The expiration time, in seconds, since the Unix epoch. Must be less than 48 hours after `iat`. Shorter expiration times are more secure. If possible, we recommend setting an expiration time less than 6 hours. - `sub`: The identity asserted in the JWT. - `aud`: For workload identity pools, this must be a value specified in the allowed audiences for the workload identity pool provider, or one of the audiences allowed by default if no audiences were specified. See https://cloud.google.com/iam/docs/reference/rest/v1/projects.locations.workloadIdentityPools.providers#oidc. For workforce pools, this must match the client ID specified in the provider configuration. See https://cloud.google.com/iam/docs/reference/rest/v1/locations.workforcePools.providers#oidc. Example header: ``` { \"alg\": \"RS256\", \"kid\": \"us-east-11\" } ``` Example payload: ``` { \"iss\": \"https://accounts.google.com\", \"iat\": 1517963104, \"exp\": 1517966704, \"aud\": \"//iam.googleapis.com/projects/1234567890123/locations/global/workloadIdentityPools/my-pool/providers/my-provider\", \"sub\": \"113475438248934895348\", \"my_claims\": { \"additional_claim\": \"value\" } } ``` If `subject_token` is for AWS, it must be a serialized `GetCallerIdentity` token. This token contains the same information as a request to the AWS [`GetCallerIdentity()`](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity) method, as well as the AWS [signature](https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) for the request information. Use Signature Version 4. Format the request as URL-encoded JSON, and set the `subject_token_type` parameter to `urn:ietf:params:aws:token-type:aws4_request`. The following parameters are required: - `url`: The URL of the AWS STS endpoint for `GetCallerIdentity()`, such as `https://sts.amazonaws.com?Action=GetCallerIdentity\u0026Version=2011-06-15`. Regional endpoints are also supported. - `method`: The HTTP request method: `POST`. - `headers`: The HTTP request headers, which must include: - `Authorization`: The request signature. - `x-amz-date`: The time you will send the request, formatted as an [ISO8601 Basic](https://docs.aws.amazon.com/general/latest/gr/sigv4_elements.html#sigv4_elements_date) string. This value is typically set to the current time and is used to help prevent replay attacks. - `host`: The hostname of the `url` field; for example, `sts.amazonaws.com`. - `x-goog-cloud-target-resource`: The full, canonical resource name of the workload identity pool provider, with or without an `https:` prefix. To help ensure data integrity, we recommend including this header in the `SignedHeaders` field of the signed request. For example: //iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/ https://iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/ If you are using temporary security credentials provided by AWS, you must also include the header `x-amz-security-token`, with the value set to the session token. The following example shows a `GetCallerIdentity` token: ``` { \"headers\": [ {\"key\": \"x-amz-date\", \"value\": \"20200815T015049Z\"}, {\"key\": \"Authorization\", \"value\": \"AWS4-HMAC-SHA256+Credential=$credential,+SignedHeaders=host;x-amz-date;x-goog-cloud-target-resource,+Signature=$signature\"}, {\"key\": \"x-goog-cloud-target-resource\", \"value\": \"//iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/\"}, {\"key\": \"host\", \"value\": \"sts.amazonaws.com\"} . ], \"method\": \"POST\", \"url\": \"https://sts.amazonaws.com?Action=GetCallerIdentity\u0026Version=2011-06-15\" } ``` If the token is a SAML 2.0 assertion, it must use the format defined in [the SAML 2.0 spec](https://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0-cd-02.pdf), and the `subject_token_type` must be `urn:ietf:params:oauth:token-type:saml2`. See [Verification of external credentials](https://cloud.google.com/iam/docs/using-workload-identity-federation#verification_of_external_credentials) for details on how SAML 2.0 assertions are validated during token exchanges. You can also use a Google-issued OAuth 2.0 access token with this field to obtain an access token with new security attributes applied, such as a Credential Access Boundary. In this case, set `subject_token_type` to `urn:ietf:params:oauth:token-type:access_token`. If an access token already contains security attributes, you cannot apply additional security attributes.", "type": "string" }, "subjectTokenType": { diff --git a/sts/v1/sts-gen.go b/sts/v1/sts-gen.go index 203ede7cc30..4e7639174f0 100644 --- a/sts/v1/sts-gen.go +++ b/sts/v1/sts-gen.go @@ -469,7 +469,7 @@ type GoogleIdentityStsV1ExchangeTokenRequest struct { // "https://sts.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15 // " } ``` If the token is a SAML 2.0 assertion, it must use the format // defined in the SAML 2.0 spec - // (https://www.oasis-open.org/committees/download.php/56776/sstc-saml-core-errata-2.0-wd-07.pdf), + // (https://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0-cd-02.pdf), // and the `subject_token_type` must be // `urn:ietf:params:oauth:token-type:saml2`. See Verification of // external credentials diff --git a/tpu/v2alpha1/tpu-api.json b/tpu/v2alpha1/tpu-api.json index 82f556e7d30..fffefbcc2e9 100644 --- a/tpu/v2alpha1/tpu-api.json +++ b/tpu/v2alpha1/tpu-api.json @@ -965,7 +965,7 @@ } } }, - "revision": "20240205", + "revision": "20240411", "rootUrl": "https://tpu.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -1983,6 +1983,29 @@ }, "standard": { "$ref": "Standard" + }, + "state": { + "description": "Output only. The state of the Reservation.", + "enum": [ + "STATE_UNSPECIFIED", + "APPROVED", + "PROVISIONING", + "ACTIVE", + "DEPROVISIONING", + "EXPIRED", + "FAILED" + ], + "enumDescriptions": [ + "The Reservation state is unspecified.", + "The Reservation has been approved.", + "The Reservation is being provisioned.", + "The Reservation is active.", + "The Reservation is being deprovisioned.", + "The Reservation is past its end date.", + "The Reservation encountered a failure during mutation." + ], + "readOnly": true, + "type": "string" } }, "type": "object" diff --git a/tpu/v2alpha1/tpu-gen.go b/tpu/v2alpha1/tpu-gen.go index ca0f574064c..1613b22c9bb 100644 --- a/tpu/v2alpha1/tpu-gen.go +++ b/tpu/v2alpha1/tpu-gen.go @@ -1766,6 +1766,18 @@ type Reservation struct { Standard *Standard `json:"standard,omitempty"` + // State: Output only. The state of the Reservation. + // + // Possible values: + // "STATE_UNSPECIFIED" - The Reservation state is unspecified. + // "APPROVED" - The Reservation has been approved. + // "PROVISIONING" - The Reservation is being provisioned. + // "ACTIVE" - The Reservation is active. + // "DEPROVISIONING" - The Reservation is being deprovisioned. + // "EXPIRED" - The Reservation is past its end date. + // "FAILED" - The Reservation encountered a failure during mutation. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/vmmigration/v1/vmmigration-api.json b/vmmigration/v1/vmmigration-api.json index 717e42c866a..99a68944b7d 100644 --- a/vmmigration/v1/vmmigration-api.json +++ b/vmmigration/v1/vmmigration-api.json @@ -2220,7 +2220,7 @@ } } }, - "revision": "20240222", + "revision": "20240411", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -3712,7 +3712,7 @@ }, "encryption": { "$ref": "Encryption", - "description": "Optional. Immutable. The encryption to apply to the image." + "description": "Immutable. The encryption to apply to the image." }, "familyName": { "description": "Optional. The name of the image family to which the new image belongs.", diff --git a/vmmigration/v1/vmmigration-gen.go b/vmmigration/v1/vmmigration-gen.go index 7fae90160a4..3d696a3e4cf 100644 --- a/vmmigration/v1/vmmigration-gen.go +++ b/vmmigration/v1/vmmigration-gen.go @@ -2068,8 +2068,7 @@ type DiskImageTargetDetails struct { // Description: Optional. An optional description of the image. Description string `json:"description,omitempty"` - // Encryption: Optional. Immutable. The encryption to apply to the - // image. + // Encryption: Immutable. The encryption to apply to the image. Encryption *Encryption `json:"encryption,omitempty"` // FamilyName: Optional. The name of the image family to which the new diff --git a/vmmigration/v1alpha1/vmmigration-api.json b/vmmigration/v1alpha1/vmmigration-api.json index fedc144d508..f762668f5fb 100644 --- a/vmmigration/v1alpha1/vmmigration-api.json +++ b/vmmigration/v1alpha1/vmmigration-api.json @@ -2220,7 +2220,7 @@ } } }, - "revision": "20240222", + "revision": "20240411", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -3747,7 +3747,7 @@ }, "encryption": { "$ref": "Encryption", - "description": "Optional. Immutable. The encryption to apply to the image." + "description": "Immutable. The encryption to apply to the image." }, "familyName": { "description": "Optional. The name of the image family to which the new image belongs.", diff --git a/vmmigration/v1alpha1/vmmigration-gen.go b/vmmigration/v1alpha1/vmmigration-gen.go index 873527fde64..5f32507a1e7 100644 --- a/vmmigration/v1alpha1/vmmigration-gen.go +++ b/vmmigration/v1alpha1/vmmigration-gen.go @@ -2093,8 +2093,7 @@ type DiskImageTargetDetails struct { // Description: Optional. An optional description of the image. Description string `json:"description,omitempty"` - // Encryption: Optional. Immutable. The encryption to apply to the - // image. + // Encryption: Immutable. The encryption to apply to the image. Encryption *Encryption `json:"encryption,omitempty"` // FamilyName: Optional. The name of the image family to which the new diff --git a/vmwareengine/v1/vmwareengine-api.json b/vmwareengine/v1/vmwareengine-api.json index 7983bc57246..b8bcc3bdf23 100644 --- a/vmwareengine/v1/vmwareengine-api.json +++ b/vmwareengine/v1/vmwareengine-api.json @@ -3173,7 +3173,7 @@ } } }, - "revision": "20240126", + "revision": "20240412", "rootUrl": "https://vmwareengine.googleapis.com/", "schemas": { "AuditConfig": { @@ -4221,12 +4221,18 @@ "enum": [ "PROTOCOL_UNSPECIFIED", "UDP", - "TCP" + "TCP", + "TLS", + "SSL", + "RELP" ], "enumDescriptions": [ "Unspecified communications protocol. This is the default value.", "UDP", - "TCP" + "TCP", + "TLS", + "SSL", + "RELP" ], "type": "string" }, diff --git a/vmwareengine/v1/vmwareengine-gen.go b/vmwareengine/v1/vmwareengine-gen.go index 707aa56b326..f70b7db891c 100644 --- a/vmwareengine/v1/vmwareengine-gen.go +++ b/vmwareengine/v1/vmwareengine-gen.go @@ -2173,6 +2173,9 @@ type LoggingServer struct { // is the default value. // "UDP" - UDP // "TCP" - TCP + // "TLS" - TLS + // "SSL" - SSL + // "RELP" - RELP Protocol string `json:"protocol,omitempty"` // SourceType: Required. The type of component that produces logs that