From bd9630ab6fc22bc2bf7108d72457f914c69a4b14 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 20 Sep 2024 00:22:24 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2791) --- admin/directory/v1/admin-api.json | 4 +- admin/directory/v1/admin-gen.go | 3 +- batch/v1/batch-api.json | 4 +- batch/v1/batch-gen.go | 5 +- .../v1/bigquerydatatransfer-api.json | 68 +- .../v1/bigquerydatatransfer-gen.go | 109 ++ drive/v2/drive-api.json | 4 +- drive/v2/drive-gen.go | 23 +- drive/v3/drive-api.json | 4 +- drive/v3/drive-gen.go | 19 +- eventarc/v1/eventarc-api.json | 366 +++- eventarc/v1/eventarc-gen.go | 1704 +++++++++++++++-- firebaseml/v2beta/firebaseml-api.json | 9 +- firebaseml/v2beta/firebaseml-gen.go | 7 +- logging/v2/logging-api.json | 4 +- logging/v2/logging-gen.go | 4 +- .../v1/networkmanagement-api.json | 40 +- networkmanagement/v1/networkmanagement-gen.go | 48 +- .../v1beta1/networkservices-api.json | 51 +- .../v1beta1/networkservices-gen.go | 68 +- pubsub/v1/pubsub-api.json | 4 +- pubsub/v1/pubsub-gen.go | 4 +- run/v1/run-api.json | 6 +- run/v1/run-gen.go | 20 +- securitycenter/v1/securitycenter-api.json | 10 +- securitycenter/v1/securitycenter-gen.go | 28 +- .../serviceconsumermanagement-api.json | 4 +- .../v1beta1/serviceconsumermanagement-gen.go | 5 +- 28 files changed, 2394 insertions(+), 231 deletions(-) diff --git a/admin/directory/v1/admin-api.json b/admin/directory/v1/admin-api.json index b510a271cb8..a52687760da 100644 --- a/admin/directory/v1/admin-api.json +++ b/admin/directory/v1/admin-api.json @@ -1677,7 +1677,7 @@ "type": "string" }, "userKey": { - "description": "Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. If it's an ID, it should match with the ID of the user object.", + "description": "Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. If it's an ID, it should match with the ID of the user object. Cannot be used with the `customer` parameter.", "location": "query", "type": "string" } @@ -4671,7 +4671,7 @@ } } }, - "revision": "20240903", + "revision": "20240917", "rootUrl": "https://admin.googleapis.com/", "schemas": { "Alias": { diff --git a/admin/directory/v1/admin-gen.go b/admin/directory/v1/admin-gen.go index 8bf0eb359c9..10dcb7724c6 100644 --- a/admin/directory/v1/admin-gen.go +++ b/admin/directory/v1/admin-gen.go @@ -10069,7 +10069,8 @@ func (c *GroupsListCall) SortOrder(sortOrder string) *GroupsListCall { // UserKey sets the optional parameter "userKey": Email or immutable ID of the // user if only those groups are to be listed, the given user is a member of. -// If it's an ID, it should match with the ID of the user object. +// If it's an ID, it should match with the ID of the user object. Cannot be +// used with the `customer` parameter. func (c *GroupsListCall) UserKey(userKey string) *GroupsListCall { c.urlParams_.Set("userKey", userKey) return c diff --git a/batch/v1/batch-api.json b/batch/v1/batch-api.json index 15ae00738c7..13e4a9ca627 100644 --- a/batch/v1/batch-api.json +++ b/batch/v1/batch-api.json @@ -561,7 +561,7 @@ } } }, - "revision": "20240821", + "revision": "20240911", "rootUrl": "https://batch.googleapis.com/", "schemas": { "Accelerator": { @@ -1287,7 +1287,7 @@ "type": "boolean" }, "instanceTemplate": { - "description": "Name of an instance template used to create VMs. Named the field as 'instance_template' instead of 'template' to avoid c++ keyword conflict.", + "description": "Name of an instance template used to create VMs. Named the field as 'instance_template' instead of 'template' to avoid C++ keyword conflict. Batch only supports global instance templates. You can specify the global instance template as a full or partial URL.", "type": "string" }, "policy": { diff --git a/batch/v1/batch-gen.go b/batch/v1/batch-gen.go index 9256063e932..aa9e70d935e 100644 --- a/batch/v1/batch-gen.go +++ b/batch/v1/batch-gen.go @@ -1233,8 +1233,9 @@ type InstancePolicyOrTemplate struct { // Ops Agent on your behalf. Default is false. InstallOpsAgent bool `json:"installOpsAgent,omitempty"` // InstanceTemplate: Name of an instance template used to create VMs. Named the - // field as 'instance_template' instead of 'template' to avoid c++ keyword - // conflict. + // field as 'instance_template' instead of 'template' to avoid C++ keyword + // conflict. Batch only supports global instance templates. You can specify the + // global instance template as a full or partial URL. InstanceTemplate string `json:"instanceTemplate,omitempty"` // Policy: InstancePolicy. Policy *InstancePolicy `json:"policy,omitempty"` diff --git a/bigquerydatatransfer/v1/bigquerydatatransfer-api.json b/bigquerydatatransfer/v1/bigquerydatatransfer-api.json index a62d4d2ace1..24b2a2e1057 100644 --- a/bigquerydatatransfer/v1/bigquerydatatransfer-api.json +++ b/bigquerydatatransfer/v1/bigquerydatatransfer-api.json @@ -1407,7 +1407,7 @@ } } }, - "revision": "20240806", + "revision": "20240914", "rootUrl": "https://bigquerydatatransfer.googleapis.com/", "schemas": { "CheckValidCredsRequest": { @@ -1691,6 +1691,17 @@ }, "type": "object" }, + "EventDrivenSchedule": { + "description": "Options customizing EventDriven transfers schedule.", + "id": "EventDrivenSchedule", + "properties": { + "pubsubSubscription": { + "description": "Pub/Sub subscription name used to receive events. Only Google Cloud Storage data source support this option. Format: projects/{project}/subscriptions/{subscription}", + "type": "string" + } + }, + "type": "object" + }, "ListDataSourcesResponse": { "description": "Returns list of supported data sources and their metadata.", "id": "ListDataSourcesResponse", @@ -1822,6 +1833,12 @@ }, "type": "object" }, + "ManualSchedule": { + "description": "Options customizing manual transfers schedule.", + "id": "ManualSchedule", + "properties": {}, + "type": "object" + }, "ScheduleOptions": { "description": "Options customizing the data transfer schedule.", "id": "ScheduleOptions", @@ -1843,6 +1860,25 @@ }, "type": "object" }, + "ScheduleOptionsV2": { + "description": "V2 options customizing different types of data transfer schedule. This field supports existing time-based and manual transfer schedule. Also supports Event-Driven transfer schedule. ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule.", + "id": "ScheduleOptionsV2", + "properties": { + "eventDrivenSchedule": { + "$ref": "EventDrivenSchedule", + "description": "Event driven transfer schedule options. If set, the transfer will be scheduled upon events arrial." + }, + "manualSchedule": { + "$ref": "ManualSchedule", + "description": "Manual transfer schedule. If set, the transfer run will not be auto-scheduled by the system, unless the client invokes StartManualTransferRuns. This is equivalent to disable_auto_scheduling = true." + }, + "timeBasedSchedule": { + "$ref": "TimeBasedSchedule", + "description": "Time based transfer schedule options. This is the default schedule option." + } + }, + "type": "object" + }, "ScheduleTransferRunsRequest": { "description": "A request to schedule transfer runs for a time range.", "id": "ScheduleTransferRunsRequest", @@ -1931,6 +1967,27 @@ }, "type": "object" }, + "TimeBasedSchedule": { + "description": "Options customizing the time based transfer schedule. Options are migrated from the original ScheduleOptions message.", + "id": "TimeBasedSchedule", + "properties": { + "endTime": { + "description": "Defines time to stop scheduling transfer runs. A transfer run cannot be scheduled at or after the end time. The end time can be changed at any moment.", + "format": "google-datetime", + "type": "string" + }, + "schedule": { + "description": "Data transfer schedule. If the data source does not support a custom schedule, this should be empty. If it is empty, the default value for the data source will be used. The specified times are in UTC. Examples of valid format: `1st,3rd monday of month 15:30`, `every wed,fri of jan,jun 13:15`, and `first sunday of quarter 00:00`. See more explanation about the format here: https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format NOTE: The minimum interval time between recurring transfers depends on the data source; refer to the documentation for your data source.", + "type": "string" + }, + "startTime": { + "description": "Specifies time to start scheduling transfer runs. The first run will be scheduled at or after the start time according to a recurrence pattern defined in the schedule string. The start time can be changed at any moment.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "TimeRange": { "description": "A specification for a time range, this will request transfer runs with run_time between start_time (inclusive) and end_time (exclusive).", "id": "TimeRange", @@ -1986,6 +2043,11 @@ "$ref": "EncryptionConfiguration", "description": "The encryption configuration part. Currently, it is only used for the optional KMS key name. The BigQuery service account of your project must be granted permissions to use the key. Read methods will return the key name applied in effect. Write methods will apply the key if it is present, or otherwise try to apply project default keys if it is absent." }, + "error": { + "$ref": "Status", + "description": "Output only. Error code with detailed information about reason of the latest config failure.", + "readOnly": true + }, "name": { "description": "Identifier. The resource name of the transfer config. Transfer config names have the form either `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or `projects/{project_id}/transferConfigs/{config_id}`, where `config_id` is usually a UUID, even though it is not guaranteed or required. The name is ignored when creating a transfer config.", "type": "string" @@ -2021,6 +2083,10 @@ "$ref": "ScheduleOptions", "description": "Options customizing the data transfer schedule." }, + "scheduleOptionsV2": { + "$ref": "ScheduleOptionsV2", + "description": "Options customizing different types of data transfer schedule. This field replaces \"schedule\" and \"schedule_options\" fields. ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule." + }, "state": { "description": "Output only. State of the most recently updated transfer run.", "enum": [ diff --git a/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go b/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go index 3b7ead7aeae..adf9fe08078 100644 --- a/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go +++ b/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go @@ -584,6 +584,30 @@ func (s EnrollDataSourcesRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// EventDrivenSchedule: Options customizing EventDriven transfers schedule. +type EventDrivenSchedule struct { + // PubsubSubscription: Pub/Sub subscription name used to receive events. Only + // Google Cloud Storage data source support this option. Format: + // projects/{project}/subscriptions/{subscription} + PubsubSubscription string `json:"pubsubSubscription,omitempty"` + // ForceSendFields is a list of field names (e.g. "PubsubSubscription") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PubsubSubscription") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s EventDrivenSchedule) MarshalJSON() ([]byte, error) { + type NoMethod EventDrivenSchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListDataSourcesResponse: Returns list of supported data sources and their // metadata. type ListDataSourcesResponse struct { @@ -771,6 +795,10 @@ func (s Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ManualSchedule: Options customizing manual transfers schedule. +type ManualSchedule struct { +} + // ScheduleOptions: Options customizing the data transfer schedule. type ScheduleOptions struct { // DisableAutoScheduling: If true, automatic scheduling of data transfer runs @@ -807,6 +835,40 @@ func (s ScheduleOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ScheduleOptionsV2: V2 options customizing different types of data transfer +// schedule. This field supports existing time-based and manual transfer +// schedule. Also supports Event-Driven transfer schedule. ScheduleOptionsV2 +// cannot be used together with ScheduleOptions/Schedule. +type ScheduleOptionsV2 struct { + // EventDrivenSchedule: Event driven transfer schedule options. If set, the + // transfer will be scheduled upon events arrial. + EventDrivenSchedule *EventDrivenSchedule `json:"eventDrivenSchedule,omitempty"` + // ManualSchedule: Manual transfer schedule. If set, the transfer run will not + // be auto-scheduled by the system, unless the client invokes + // StartManualTransferRuns. This is equivalent to disable_auto_scheduling = + // true. + ManualSchedule *ManualSchedule `json:"manualSchedule,omitempty"` + // TimeBasedSchedule: Time based transfer schedule options. This is the default + // schedule option. + TimeBasedSchedule *TimeBasedSchedule `json:"timeBasedSchedule,omitempty"` + // ForceSendFields is a list of field names (e.g. "EventDrivenSchedule") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EventDrivenSchedule") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ScheduleOptionsV2) MarshalJSON() ([]byte, error) { + type NoMethod ScheduleOptionsV2 + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ScheduleTransferRunsRequest: A request to schedule transfer runs for a time // range. type ScheduleTransferRunsRequest struct { @@ -949,6 +1011,46 @@ func (s Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// TimeBasedSchedule: Options customizing the time based transfer schedule. +// Options are migrated from the original ScheduleOptions message. +type TimeBasedSchedule struct { + // EndTime: Defines time to stop scheduling transfer runs. A transfer run + // cannot be scheduled at or after the end time. The end time can be changed at + // any moment. + EndTime string `json:"endTime,omitempty"` + // Schedule: Data transfer schedule. If the data source does not support a + // custom schedule, this should be empty. If it is empty, the default value for + // the data source will be used. The specified times are in UTC. Examples of + // valid format: `1st,3rd monday of month 15:30`, `every wed,fri of jan,jun + // 13:15`, and `first sunday of quarter 00:00`. See more explanation about the + // format here: + // https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format + // NOTE: The minimum interval time between recurring transfers depends on the + // data source; refer to the documentation for your data source. + Schedule string `json:"schedule,omitempty"` + // StartTime: Specifies time to start scheduling transfer runs. The first run + // will be scheduled at or after the start time according to a recurrence + // pattern defined in the schedule string. The start time can be changed at any + // moment. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TimeBasedSchedule) MarshalJSON() ([]byte, error) { + type NoMethod TimeBasedSchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // TimeRange: A specification for a time range, this will request transfer runs // with run_time between start_time (inclusive) and end_time (exclusive). type TimeRange struct { @@ -1017,6 +1119,9 @@ type TransferConfig struct { // it is present, or otherwise try to apply project default keys if it is // absent. EncryptionConfiguration *EncryptionConfiguration `json:"encryptionConfiguration,omitempty"` + // Error: Output only. Error code with detailed information about reason of the + // latest config failure. + Error *Status `json:"error,omitempty"` // Name: Identifier. The resource name of the transfer config. Transfer config // names have the form either // `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or @@ -1052,6 +1157,10 @@ type TransferConfig struct { Schedule string `json:"schedule,omitempty"` // ScheduleOptions: Options customizing the data transfer schedule. ScheduleOptions *ScheduleOptions `json:"scheduleOptions,omitempty"` + // ScheduleOptionsV2: Options customizing different types of data transfer + // schedule. This field replaces "schedule" and "schedule_options" fields. + // ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule. + ScheduleOptionsV2 *ScheduleOptionsV2 `json:"scheduleOptionsV2,omitempty"` // State: Output only. State of the most recently updated transfer run. // // Possible values: diff --git a/drive/v2/drive-api.json b/drive/v2/drive-api.json index 137b4ec21ad..267fe0b1293 100644 --- a/drive/v2/drive-api.json +++ b/drive/v2/drive-api.json @@ -1758,7 +1758,7 @@ "type": "integer" }, "orderBy": { - "description": "A comma-separated list of sort keys. Valid keys are `createdDate`, `folder`, `lastViewedByMeDate`, `modifiedByMeDate`, `modifiedDate`, `quotaBytesUsed`, `recency`, `sharedWithMeDate`, `starred`, `title`, and `title_natural`. Each key sorts ascending by default, but may be reversed with the `desc` modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.", + "description": "A comma-separated list of sort keys. Valid keys are: * `createdDate`: When the file was created. * `folder`: The folder ID. This field is sorted using alphabetical ordering. * `lastViewedByMeDate`: The last time the file was viewed by the user. * `modifiedByMeDate`: The last time the file was modified by the user. * `modifiedDate`: The last time the file was modified by anyone. * `quotaBytesUsed`: The number of storage quota bytes used by the file. * `recency`: The most recent timestamp from the file's date-time fields. * `sharedWithMeDate`: When the file was shared with the user, if applicable. * `starred`: Whether the user has starred the file. * `title`: The title of the file. This field is sorted using alphabetical ordering, so 1, 12, 2, 22. * `title_natural`: The title of the file. This field is sorted using natural sort ordering, so 1, 2, 12, 22. Each key sorts ascending by default, but can be reversed with the 'desc' modifier. Example usage: `?orderBy=folder,modifiedDate desc,title`. Note that there's a current limitation for users with approximately one million files in which the requested sort order is ignored.", "location": "query", "type": "string" }, @@ -3869,7 +3869,7 @@ } } }, - "revision": "20240809", + "revision": "20240914", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { diff --git a/drive/v2/drive-gen.go b/drive/v2/drive-gen.go index aa0ea731906..f997a7fdff7 100644 --- a/drive/v2/drive-gen.go +++ b/drive/v2/drive-gen.go @@ -7706,13 +7706,22 @@ func (c *FilesListCall) MaxResults(maxResults int64) *FilesListCall { } // OrderBy sets the optional parameter "orderBy": A comma-separated list of -// sort keys. Valid keys are `createdDate`, `folder`, `lastViewedByMeDate`, -// `modifiedByMeDate`, `modifiedDate`, `quotaBytesUsed`, `recency`, -// `sharedWithMeDate`, `starred`, `title`, and `title_natural`. Each key sorts -// ascending by default, but may be reversed with the `desc` modifier. Example -// usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a -// current limitation for users with approximately one million files in which -// the requested sort order is ignored. +// sort keys. Valid keys are: * `createdDate`: When the file was created. * +// `folder`: The folder ID. This field is sorted using alphabetical ordering. * +// `lastViewedByMeDate`: The last time the file was viewed by the user. * +// `modifiedByMeDate`: The last time the file was modified by the user. * +// `modifiedDate`: The last time the file was modified by anyone. * +// `quotaBytesUsed`: The number of storage quota bytes used by the file. * +// `recency`: The most recent timestamp from the file's date-time fields. * +// `sharedWithMeDate`: When the file was shared with the user, if applicable. * +// `starred`: Whether the user has starred the file. * `title`: The title of +// the file. This field is sorted using alphabetical ordering, so 1, 12, 2, 22. +// * `title_natural`: The title of the file. This field is sorted using natural +// sort ordering, so 1, 2, 12, 22. Each key sorts ascending by default, but can +// be reversed with the 'desc' modifier. Example usage: +// `?orderBy=folder,modifiedDate desc,title`. Note that there's a current +// limitation for users with approximately one million files in which the +// requested sort order is ignored. func (c *FilesListCall) OrderBy(orderBy string) *FilesListCall { c.urlParams_.Set("orderBy", orderBy) return c diff --git a/drive/v3/drive-api.json b/drive/v3/drive-api.json index 79d55f441ec..834c0b327df 100644 --- a/drive/v3/drive-api.json +++ b/drive/v3/drive-api.json @@ -1396,7 +1396,7 @@ "type": "boolean" }, "orderBy": { - "description": "A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but can be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name.", + "description": "A comma-separated list of sort keys. Valid keys are: * `createdTime`: When the file was created. * `folder`: The folder ID. This field is sorted using alphabetical ordering. * `modifiedByMeTime`: The last time the file was modified by the user. * `modifiedTime`: The last time the file was modified by anyone. * `name`: The name of the file. This field is sorted using alphabetical ordering, so 1, 12, 2, 22. * `name_natural`: The name of the file. This field is sorted using natural sort ordering, so 1, 2, 12, 22. * `quotaBytesUsed`: The number of storage quota bytes used by the file. * `recency`: The most recent timestamp from the file's date-time fields. * `sharedWithMeTime`: When the file was shared with the user, if applicable. * `starred`: Whether the user has starred the file. * `viewedByMeTime`: The last time the file was viewed by the user. Each key sorts ascending by default, but can be reversed with the 'desc' modifier. Example usage: `?orderBy=folder,modifiedTime desc,name`.", "location": "query", "type": "string" }, @@ -2664,7 +2664,7 @@ } } }, - "revision": "20240903", + "revision": "20240914", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { diff --git a/drive/v3/drive-gen.go b/drive/v3/drive-gen.go index 03e968b26c1..122526d467b 100644 --- a/drive/v3/drive-gen.go +++ b/drive/v3/drive-gen.go @@ -6504,11 +6504,20 @@ func (c *FilesListCall) IncludeTeamDriveItems(includeTeamDriveItems bool) *Files } // OrderBy sets the optional parameter "orderBy": A comma-separated list of -// sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', -// 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', -// 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts -// ascending by default, but can be reversed with the 'desc' modifier. Example -// usage: ?orderBy=folder,modifiedTime desc,name. +// sort keys. Valid keys are: * `createdTime`: When the file was created. * +// `folder`: The folder ID. This field is sorted using alphabetical ordering. * +// `modifiedByMeTime`: The last time the file was modified by the user. * +// `modifiedTime`: The last time the file was modified by anyone. * `name`: The +// name of the file. This field is sorted using alphabetical ordering, so 1, +// 12, 2, 22. * `name_natural`: The name of the file. This field is sorted +// using natural sort ordering, so 1, 2, 12, 22. * `quotaBytesUsed`: The number +// of storage quota bytes used by the file. * `recency`: The most recent +// timestamp from the file's date-time fields. * `sharedWithMeTime`: When the +// file was shared with the user, if applicable. * `starred`: Whether the user +// has starred the file. * `viewedByMeTime`: The last time the file was viewed +// by the user. Each key sorts ascending by default, but can be reversed with +// the 'desc' modifier. Example usage: `?orderBy=folder,modifiedTime +// desc,name`. func (c *FilesListCall) OrderBy(orderBy string) *FilesListCall { c.urlParams_.Set("orderBy", orderBy) return c diff --git a/eventarc/v1/eventarc-api.json b/eventarc/v1/eventarc-api.json index 010179db5b5..6940648dad9 100644 --- a/eventarc/v1/eventarc-api.json +++ b/eventarc/v1/eventarc-api.json @@ -710,6 +710,279 @@ } } }, + "enrollments": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/enrollments/{enrollmentsId}:getIamPolicy", + "httpMethod": "GET", + "id": "eventarc.projects.locations.enrollments.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/[^/]+/enrollments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/enrollments/{enrollmentsId}:setIamPolicy", + "httpMethod": "POST", + "id": "eventarc.projects.locations.enrollments.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/[^/]+/enrollments/[^/]+$", + "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}/enrollments/{enrollmentsId}:testIamPermissions", + "httpMethod": "POST", + "id": "eventarc.projects.locations.enrollments.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/[^/]+/enrollments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "googleApiSources": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/googleApiSources/{googleApiSourcesId}:getIamPolicy", + "httpMethod": "GET", + "id": "eventarc.projects.locations.googleApiSources.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/[^/]+/googleApiSources/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/googleApiSources/{googleApiSourcesId}:setIamPolicy", + "httpMethod": "POST", + "id": "eventarc.projects.locations.googleApiSources.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/[^/]+/googleApiSources/[^/]+$", + "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}/googleApiSources/{googleApiSourcesId}:testIamPermissions", + "httpMethod": "POST", + "id": "eventarc.projects.locations.googleApiSources.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/[^/]+/googleApiSources/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "messageBuses": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/messageBuses/{messageBusesId}:getIamPolicy", + "httpMethod": "GET", + "id": "eventarc.projects.locations.messageBuses.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/[^/]+/messageBuses/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/messageBuses/{messageBusesId}:setIamPolicy", + "httpMethod": "POST", + "id": "eventarc.projects.locations.messageBuses.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/[^/]+/messageBuses/[^/]+$", + "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}/messageBuses/{messageBusesId}:testIamPermissions", + "httpMethod": "POST", + "id": "eventarc.projects.locations.messageBuses.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/[^/]+/messageBuses/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "operations": { "methods": { "cancel": { @@ -833,6 +1106,97 @@ } } }, + "pipelines": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/pipelines/{pipelinesId}:getIamPolicy", + "httpMethod": "GET", + "id": "eventarc.projects.locations.pipelines.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/[^/]+/pipelines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/pipelines/{pipelinesId}:setIamPolicy", + "httpMethod": "POST", + "id": "eventarc.projects.locations.pipelines.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/[^/]+/pipelines/[^/]+$", + "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}/pipelines/{pipelinesId}:testIamPermissions", + "httpMethod": "POST", + "id": "eventarc.projects.locations.pipelines.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/[^/]+/pipelines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "providers": { "methods": { "get": { @@ -1197,7 +1561,7 @@ } } }, - "revision": "20240510", + "revision": "20240913", "rootUrl": "https://eventarc.googleapis.com/", "schemas": { "AuditConfig": { diff --git a/eventarc/v1/eventarc-gen.go b/eventarc/v1/eventarc-gen.go index 9a6d07584b8..9bbe32db05f 100644 --- a/eventarc/v1/eventarc-gen.go +++ b/eventarc/v1/eventarc-gen.go @@ -170,7 +170,11 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.ChannelConnections = NewProjectsLocationsChannelConnectionsService(s) rs.Channels = NewProjectsLocationsChannelsService(s) + rs.Enrollments = NewProjectsLocationsEnrollmentsService(s) + rs.GoogleApiSources = NewProjectsLocationsGoogleApiSourcesService(s) + rs.MessageBuses = NewProjectsLocationsMessageBusesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) + rs.Pipelines = NewProjectsLocationsPipelinesService(s) rs.Providers = NewProjectsLocationsProvidersService(s) rs.Triggers = NewProjectsLocationsTriggersService(s) return rs @@ -183,8 +187,16 @@ type ProjectsLocationsService struct { Channels *ProjectsLocationsChannelsService + Enrollments *ProjectsLocationsEnrollmentsService + + GoogleApiSources *ProjectsLocationsGoogleApiSourcesService + + MessageBuses *ProjectsLocationsMessageBusesService + Operations *ProjectsLocationsOperationsService + Pipelines *ProjectsLocationsPipelinesService + Providers *ProjectsLocationsProvidersService Triggers *ProjectsLocationsTriggersService @@ -208,6 +220,33 @@ type ProjectsLocationsChannelsService struct { s *Service } +func NewProjectsLocationsEnrollmentsService(s *Service) *ProjectsLocationsEnrollmentsService { + rs := &ProjectsLocationsEnrollmentsService{s: s} + return rs +} + +type ProjectsLocationsEnrollmentsService struct { + s *Service +} + +func NewProjectsLocationsGoogleApiSourcesService(s *Service) *ProjectsLocationsGoogleApiSourcesService { + rs := &ProjectsLocationsGoogleApiSourcesService{s: s} + return rs +} + +type ProjectsLocationsGoogleApiSourcesService struct { + s *Service +} + +func NewProjectsLocationsMessageBusesService(s *Service) *ProjectsLocationsMessageBusesService { + rs := &ProjectsLocationsMessageBusesService{s: s} + return rs +} + +type ProjectsLocationsMessageBusesService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -217,6 +256,15 @@ type ProjectsLocationsOperationsService struct { s *Service } +func NewProjectsLocationsPipelinesService(s *Service) *ProjectsLocationsPipelinesService { + rs := &ProjectsLocationsPipelinesService{s: s} + return rs +} + +type ProjectsLocationsPipelinesService struct { + s *Service +} + func NewProjectsLocationsProvidersService(s *Service) *ProjectsLocationsProvidersService { rs := &ProjectsLocationsProvidersService{s: s} return rs @@ -3890,84 +3938,102 @@ func (c *ProjectsLocationsChannelsTestIamPermissionsCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEnrollmentsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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`. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest +// - 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 *ProjectsLocationsEnrollmentsService) GetIamPolicy(resource string) *ProjectsLocationsEnrollmentsGetIamPolicyCall { + c := &ProjectsLocationsEnrollmentsGetIamPolicyCall{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 *ProjectsLocationsEnrollmentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEnrollmentsGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsEnrollmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnrollmentsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsEnrollmentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEnrollmentsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsEnrollmentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEnrollmentsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsEnrollmentsGetIamPolicyCall) 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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsEnrollmentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.operations.cancel" call. +// Do executes the "eventarc.projects.locations.enrollments.getIamPolicy" call. // 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 +// *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 *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *ProjectsLocationsEnrollmentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3986,7 +4052,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3999,73 +4065,80 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEnrollmentsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + 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`. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, +// and `PERMISSION_DENIED` errors. // -// - name: 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 +// - 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 *ProjectsLocationsEnrollmentsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEnrollmentsSetIamPolicyCall { + c := &ProjectsLocationsEnrollmentsSetIamPolicyCall{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 // details. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsEnrollmentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnrollmentsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsEnrollmentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEnrollmentsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEnrollmentsSetIamPolicyCall) 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEnrollmentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.operations.delete" call. +// Do executes the "eventarc.projects.locations.enrollments.setIamPolicy" call. // 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 +// *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 *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *ProjectsLocationsEnrollmentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4084,7 +4157,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4097,85 +4170,84 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEnrollmentsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + 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. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. // -// - name: 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 +// - 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 *ProjectsLocationsEnrollmentsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEnrollmentsTestIamPermissionsCall { + c := &ProjectsLocationsEnrollmentsTestIamPermissionsCall{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 // details. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsEnrollmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnrollmentsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsEnrollmentsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEnrollmentsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsEnrollmentsTestIamPermissionsCall) 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsEnrollmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.operations.get" call. +// Do executes the "eventarc.projects.locations.enrollments.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEnrollmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4194,7 +4266,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4207,49 +4279,1197 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsOperationsListCall struct { +type ProjectsLocationsGoogleApiSourcesGetIamPolicyCall struct { s *Service - name string + resource 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`. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - name: 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 +// - 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 *ProjectsLocationsGoogleApiSourcesService) GetIamPolicy(resource string) *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall { + c := &ProjectsLocationsGoogleApiSourcesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("filter", filter) +// 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 *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "eventarc.projects.locations.googleApiSources.getIamPolicy" call. +// 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 *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall) 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 +} + +type ProjectsLocationsGoogleApiSourcesSetIamPolicyCall 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 *ProjectsLocationsGoogleApiSourcesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGoogleApiSourcesSetIamPolicyCall { + c := &ProjectsLocationsGoogleApiSourcesSetIamPolicyCall{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 +// details. +func (c *ProjectsLocationsGoogleApiSourcesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGoogleApiSourcesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGoogleApiSourcesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGoogleApiSourcesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGoogleApiSourcesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGoogleApiSourcesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + 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 "eventarc.projects.locations.googleApiSources.setIamPolicy" call. +// 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 *ProjectsLocationsGoogleApiSourcesSetIamPolicyCall) 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 +} + +type ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall 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 *ProjectsLocationsGoogleApiSourcesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall { + c := &ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall{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 +// details. +func (c *ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + 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 "eventarc.projects.locations.googleApiSources.testIamPermissions" call. +// 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 *ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall) 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 +} + +type ProjectsLocationsMessageBusesGetIamPolicyCall 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 *ProjectsLocationsMessageBusesService) GetIamPolicy(resource string) *ProjectsLocationsMessageBusesGetIamPolicyCall { + c := &ProjectsLocationsMessageBusesGetIamPolicyCall{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 *ProjectsLocationsMessageBusesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsMessageBusesGetIamPolicyCall { + 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 +// details. +func (c *ProjectsLocationsMessageBusesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMessageBusesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsMessageBusesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsMessageBusesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMessageBusesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMessageBusesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsMessageBusesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMessageBusesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "eventarc.projects.locations.messageBuses.getIamPolicy" call. +// 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 *ProjectsLocationsMessageBusesGetIamPolicyCall) 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 +} + +type ProjectsLocationsMessageBusesSetIamPolicyCall 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 *ProjectsLocationsMessageBusesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsMessageBusesSetIamPolicyCall { + c := &ProjectsLocationsMessageBusesSetIamPolicyCall{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 +// details. +func (c *ProjectsLocationsMessageBusesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMessageBusesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMessageBusesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMessageBusesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsMessageBusesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMessageBusesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + 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 "eventarc.projects.locations.messageBuses.setIamPolicy" call. +// 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 *ProjectsLocationsMessageBusesSetIamPolicyCall) 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 +} + +type ProjectsLocationsMessageBusesTestIamPermissionsCall 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 *ProjectsLocationsMessageBusesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsMessageBusesTestIamPermissionsCall { + c := &ProjectsLocationsMessageBusesTestIamPermissionsCall{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 +// details. +func (c *ProjectsLocationsMessageBusesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMessageBusesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMessageBusesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsMessageBusesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsMessageBusesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMessageBusesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + 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 "eventarc.projects.locations.messageBuses.testIamPermissions" call. +// 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 *ProjectsLocationsMessageBusesTestIamPermissionsCall) 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 +} + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +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. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } + 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 "eventarc.projects.locations.operations.cancel" call. +// 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 +} + +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 +// details. +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. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "eventarc.projects.locations.operations.delete" call. +// 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 +} + +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 +// details. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "eventarc.projects.locations.operations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +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) +// 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 +// details. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "eventarc.projects.locations.operations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, 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 := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsPipelinesGetIamPolicyCall 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 *ProjectsLocationsPipelinesService) GetIamPolicy(resource string) *ProjectsLocationsPipelinesGetIamPolicyCall { + c := &ProjectsLocationsPipelinesGetIamPolicyCall{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 *ProjectsLocationsPipelinesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsPipelinesGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPipelinesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelinesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4257,27 +5477,27 @@ func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *Proj // IfNoneMatch sets an 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. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPipelinesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelinesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPipelinesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPipelinesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsPipelinesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPipelinesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -4285,7 +5505,7 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4293,18 +5513,17 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.operations.list" call. +// Do executes the "eventarc.projects.locations.pipelines.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *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 *ProjectsLocationsPipelinesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4323,7 +5542,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4336,25 +5555,218 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +type ProjectsLocationsPipelinesSetIamPolicyCall 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 *ProjectsLocationsPipelinesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsPipelinesSetIamPolicyCall { + c := &ProjectsLocationsPipelinesSetIamPolicyCall{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 +// details. +func (c *ProjectsLocationsPipelinesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelinesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsPipelinesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPipelinesSetIamPolicyCall { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsPipelinesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPipelinesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + 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 "eventarc.projects.locations.pipelines.setIamPolicy" call. +// 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 *ProjectsLocationsPipelinesSetIamPolicyCall) 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() } - if x.NextPageToken == "" { - return nil + 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 +} + +type ProjectsLocationsPipelinesTestIamPermissionsCall 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 *ProjectsLocationsPipelinesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsPipelinesTestIamPermissionsCall { + c := &ProjectsLocationsPipelinesTestIamPermissionsCall{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 +// details. +func (c *ProjectsLocationsPipelinesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelinesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsPipelinesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsPipelinesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsPipelinesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPipelinesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + 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 "eventarc.projects.locations.pipelines.testIamPermissions" call. +// 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 *ProjectsLocationsPipelinesTestIamPermissionsCall) 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() } - c.PageToken(x.NextPageToken) + 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 } type ProjectsLocationsProvidersGetCall struct { diff --git a/firebaseml/v2beta/firebaseml-api.json b/firebaseml/v2beta/firebaseml-api.json index 989560f833e..9b4c4ee1b06 100644 --- a/firebaseml/v2beta/firebaseml-api.json +++ b/firebaseml/v2beta/firebaseml-api.json @@ -206,7 +206,7 @@ } } }, - "revision": "20240911", + "revision": "20240917", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "Date": { @@ -1206,6 +1206,13 @@ "description": "Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed.", "id": "GoogleCloudAiplatformV1beta1Schema", "properties": { + "anyOf": { + "description": "Optional. The value should be validated against any (one or more) of the subschemas in the list.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Schema" + }, + "type": "array" + }, "default": { "description": "Optional. Default value of the data.", "type": "any" diff --git a/firebaseml/v2beta/firebaseml-gen.go b/firebaseml/v2beta/firebaseml-gen.go index b6e2df51da4..48a7c5c2fe6 100644 --- a/firebaseml/v2beta/firebaseml-gen.go +++ b/firebaseml/v2beta/firebaseml-gen.go @@ -1438,6 +1438,9 @@ func (s GoogleCloudAiplatformV1beta1SafetySetting) MarshalJSON() ([]byte, error) // object (https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may // be added in the future as needed. type GoogleCloudAiplatformV1beta1Schema struct { + // AnyOf: Optional. The value should be validated against any (one or more) of + // the subschemas in the list. + AnyOf []*GoogleCloudAiplatformV1beta1Schema `json:"anyOf,omitempty"` // Default: Optional. Default value of the data. Default interface{} `json:"default,omitempty"` // Description: Optional. The description of the data. @@ -1500,13 +1503,13 @@ type GoogleCloudAiplatformV1beta1Schema struct { // "ARRAY" - OpenAPI array type // "OBJECT" - OpenAPI object type Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Default") to unconditionally + // ForceSendFields is a list of field names (e.g. "AnyOf") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Default") to include in API + // NullFields is a list of field names (e.g. "AnyOf") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. diff --git a/logging/v2/logging-api.json b/logging/v2/logging-api.json index 81851320d02..487b58fbc47 100644 --- a/logging/v2/logging-api.json +++ b/logging/v2/logging-api.json @@ -8922,7 +8922,7 @@ } } }, - "revision": "20240908", + "revision": "20240913", "rootUrl": "https://logging.googleapis.com/", "schemas": { "AuditConfig": { @@ -10003,7 +10003,7 @@ "id": "LogBucket", "properties": { "analyticsEnabled": { - "description": "Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled.", + "description": "Optional. Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled.", "type": "boolean" }, "cmekSettings": { diff --git a/logging/v2/logging-gen.go b/logging/v2/logging-gen.go index ff5c943e258..b82d1b829f9 100644 --- a/logging/v2/logging-gen.go +++ b/logging/v2/logging-gen.go @@ -2634,8 +2634,8 @@ func (s LocationMetadata) MarshalJSON() ([]byte, error) { // LogBucket: Describes a repository in which log entries are stored. type LogBucket struct { - // AnalyticsEnabled: Whether log analytics is enabled for this bucket.Once - // enabled, log analytics features cannot be disabled. + // AnalyticsEnabled: Optional. Whether log analytics is enabled for this + // bucket.Once enabled, log analytics features cannot be disabled. AnalyticsEnabled bool `json:"analyticsEnabled,omitempty"` // CmekSettings: Optional. The CMEK settings of the log bucket. If present, new // log entries written to this log bucket are encrypted using the CMEK key diff --git a/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index eb2adde9796..9450ed43abd 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240905", + "revision": "20240911", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1162,9 +1162,13 @@ "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS", "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK", "REDIS_INSTANCE_NO_EXTERNAL_IP", + "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL", "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE", "REDIS_CLUSTER_UNSUPPORTED_PORT", - "REDIS_CLUSTER_NO_EXTERNAL_IP" + "REDIS_CLUSTER_NO_EXTERNAL_IP", + "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL", + "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION", + "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION" ], "enumDescriptions": [ "Cause is unspecified.", @@ -1242,9 +1246,13 @@ "Packet is dropped due to connecting from PUPI address to a PSA based Redis Instance.", "Packet is dropped due to no route to the destination network.", "Redis Instance does not have an external IP address.", + "Packet is dropped due to an unsupported protocol being used to connect to a Redis Instance. Only TCP connections are accepted by a Redis Instance.", "Generic drop cause for a packet being dropped inside a Redis Cluster service project.", "Packet is dropped due to an unsupported port being used to connect to a Redis Cluster. Ports 6379 and 11000 to 13047 should be used to connect to a Redis Cluster.", - "Redis Cluster does not have an external IP address." + "Redis Cluster does not have an external IP address.", + "Packet is dropped due to an unsupported protocol being used to connect to a Redis Cluster. Only TCP connections are accepted by a Redis Cluster.", + "Packet from the non-GCP (on-prem) or unknown GCP network is dropped due to the destination IP address not belonging to any IP prefix advertised via BGP by the Cloud Router.", + "Packet from the non-GCP (on-prem) or unknown GCP network is dropped due to the destination IP address not belonging to any IP prefix included to the local traffic selector of the VPN tunnel." ], "type": "string" }, @@ -2126,7 +2134,7 @@ "type": "object" }, "NetworkInfo": { - "description": "For display only. Metadata associated with a Compute Engine network.", + "description": "For display only. Metadata associated with a Compute Engine network. Next ID: 7", "id": "NetworkInfo", "properties": { "displayName": { @@ -2134,7 +2142,15 @@ "type": "string" }, "matchedIpRange": { - "description": "The IP range that matches the test.", + "description": "The IP range of the subnet matching the source IP address of the test.", + "type": "string" + }, + "matchedSubnetUri": { + "description": "URI of the subnet matching the source IP address of the test.", + "type": "string" + }, + "region": { + "description": "The region of the subnet matching the source IP address of the test.", "type": "string" }, "uri": { @@ -2485,6 +2501,14 @@ "description": "For display only. Metadata associated with a Compute Engine route.", "id": "RouteInfo", "properties": { + "advertisedRouteNextHopUri": { + "description": "For advertised routes, the URI of their next hop, i.e. the URI of the hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) the advertised prefix is advertised through, or URI of the source peered network.", + "type": "string" + }, + "advertisedRouteSourceRouterUri": { + "description": "For advertised dynamic routes, the URI of the Cloud Router that advertised the corresponding IP prefix.", + "type": "string" + }, "destIpRange": { "description": "Destination IP range of the route.", "type": "string" @@ -2569,6 +2593,10 @@ }, "type": "array" }, + "region": { + "description": "Region of the route (if applicable).", + "type": "string" + }, "routeScope": { "description": "Indicates where route is applicable.", "enum": [ @@ -2619,7 +2647,7 @@ "type": "array" }, "uri": { - "description": "URI of a route. Dynamic, peering static and peering dynamic routes do not have an URI. Advertised route from Google Cloud VPC to on-premises network also does not have an URI.", + "description": "URI of a route (if applicable).", "type": "string" } }, diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index 16161e8aa71..ffc7325e87d 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -1027,6 +1027,9 @@ type DropInfo struct { // to no route to the destination network. // "REDIS_INSTANCE_NO_EXTERNAL_IP" - Redis Instance does not have an external // IP address. + // "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL" - Packet is dropped due to an + // unsupported protocol being used to connect to a Redis Instance. Only TCP + // connections are accepted by a Redis Instance. // "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE" - Generic drop cause for a packet // being dropped inside a Redis Cluster service project. // "REDIS_CLUSTER_UNSUPPORTED_PORT" - Packet is dropped due to an unsupported @@ -1034,6 +1037,17 @@ type DropInfo struct { // should be used to connect to a Redis Cluster. // "REDIS_CLUSTER_NO_EXTERNAL_IP" - Redis Cluster does not have an external // IP address. + // "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL" - Packet is dropped due to an + // unsupported protocol being used to connect to a Redis Cluster. Only TCP + // connections are accepted by a Redis Cluster. + // "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION" - Packet from the non-GCP + // (on-prem) or unknown GCP network is dropped due to the destination IP + // address not belonging to any IP prefix advertised via BGP by the Cloud + // Router. + // "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION" - Packet from the non-GCP + // (on-prem) or unknown GCP network is dropped due to the destination IP + // address not belonging to any IP prefix included to the local traffic + // selector of the VPN tunnel. Cause string `json:"cause,omitempty"` // DestinationIp: Destination IP address of the dropped packet (if relevant). DestinationIp string `json:"destinationIp,omitempty"` @@ -1973,12 +1987,18 @@ func (s NatInfo) MarshalJSON() ([]byte, error) { } // NetworkInfo: For display only. Metadata associated with a Compute Engine -// network. +// network. Next ID: 7 type NetworkInfo struct { // DisplayName: Name of a Compute Engine network. DisplayName string `json:"displayName,omitempty"` - // MatchedIpRange: The IP range that matches the test. + // MatchedIpRange: The IP range of the subnet matching the source IP address of + // the test. MatchedIpRange string `json:"matchedIpRange,omitempty"` + // MatchedSubnetUri: URI of the subnet matching the source IP address of the + // test. + MatchedSubnetUri string `json:"matchedSubnetUri,omitempty"` + // Region: The region of the subnet matching the source IP address of the test. + Region string `json:"region,omitempty"` // Uri: URI of a Compute Engine network. Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "DisplayName") to @@ -2415,6 +2435,14 @@ type RerunConnectivityTestRequest struct { // RouteInfo: For display only. Metadata associated with a Compute Engine // route. type RouteInfo struct { + // AdvertisedRouteNextHopUri: For advertised routes, the URI of their next hop, + // i.e. the URI of the hybrid endpoint (VPN tunnel, Interconnect attachment, + // NCC router appliance) the advertised prefix is advertised through, or URI of + // the source peered network. + AdvertisedRouteNextHopUri string `json:"advertisedRouteNextHopUri,omitempty"` + // AdvertisedRouteSourceRouterUri: For advertised dynamic routes, the URI of + // the Cloud Router that advertised the corresponding IP prefix. + AdvertisedRouteSourceRouterUri string `json:"advertisedRouteSourceRouterUri,omitempty"` // DestIpRange: Destination IP range of the route. DestIpRange string `json:"destIpRange,omitempty"` // DestPortRanges: Destination port ranges of the route. Policy based routes @@ -2461,6 +2489,8 @@ type RouteInfo struct { Priority int64 `json:"priority,omitempty"` // Protocols: Protocols of the route. Policy based routes only. Protocols []string `json:"protocols,omitempty"` + // Region: Region of the route (if applicable). + Region string `json:"region,omitempty"` // RouteScope: Indicates where route is applicable. // // Possible values: @@ -2485,19 +2515,17 @@ type RouteInfo struct { SrcIpRange string `json:"srcIpRange,omitempty"` // SrcPortRanges: Source port ranges of the route. Policy based routes only. SrcPortRanges []string `json:"srcPortRanges,omitempty"` - // Uri: URI of a route. Dynamic, peering static and peering dynamic routes do - // not have an URI. Advertised route from Google Cloud VPC to on-premises - // network also does not have an URI. + // Uri: URI of a route (if applicable). Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestIpRange") to - // unconditionally include in API requests. By default, fields with empty or + // ForceSendFields is a list of field names (e.g. "AdvertisedRouteNextHopUri") + // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestIpRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "AdvertisedRouteNextHopUri") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/networkservices/v1beta1/networkservices-api.json b/networkservices/v1beta1/networkservices-api.json index f3b5c2562a3..deac9e3fd2e 100644 --- a/networkservices/v1beta1/networkservices-api.json +++ b/networkservices/v1beta1/networkservices-api.json @@ -2317,7 +2317,7 @@ } } }, - "revision": "20240818", + "revision": "20240913", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -3735,7 +3735,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Optional. The metadata provided here is included as part of the `metadata_context` (of type `google.protobuf.Struct`) in the `ProcessingRequest` message sent to the extension server. The metadata is available under the namespace `com.google.lb_route_extension.`. The following variables are supported in the metadata Struct: `{forwarding_rule_id}` - substituted with the forwarding rule's fully qualified resource name.", + "description": "Optional. The metadata provided here is included as part of the `metadata_context` (of type `google.protobuf.Struct`) in the `ProcessingRequest` message sent to the extension server. The metadata is available under the namespace `com.google.lb_route_extension.`. The following variables are supported in the metadata Struct: `{forwarding_rule_id}` - substituted with the forwarding rule's fully qualified resource name. Only one of the resource level metadata and extension level metadata can be set.", "type": "object" }, "name": { @@ -3805,7 +3805,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Optional. The metadata provided here is included in the `ProcessingRequest.metadata_context.filter_metadata` map field. The metadata is available under the key `com.google.lb_traffic_extension.`. The following variables are supported in the metadata: `{forwarding_rule_id}` - substituted with the forwarding rule's fully qualified resource name.", + "description": "Optional. The metadata provided here is included in the `ProcessingRequest.metadata_context.filter_metadata` map field. The metadata is available under the key `com.google.lb_traffic_extension.`. The following variables are supported in the metadata: `{forwarding_rule_id}` - substituted with the forwarding rule's fully qualified resource name. Only one of the resource level metadata and extension level metadata can be set.", "type": "object" }, "name": { @@ -4135,6 +4135,41 @@ }, "type": "object" }, + "LoggingConfig": { + "description": "The configuration for Platform Telemetry logging for Eventarc Avdvanced resources.", + "id": "LoggingConfig", + "properties": { + "logSeverity": { + "description": "Optional. The minimum severity of logs that will be sent to Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be sent, unless it is NONE.", + "enum": [ + "LOG_SEVERITY_UNSPECIFIED", + "NONE", + "DEBUG", + "INFO", + "NOTICE", + "WARNING", + "ERROR", + "CRITICAL", + "ALERT", + "EMERGENCY" + ], + "enumDescriptions": [ + "Log severity is not specified. This value is treated the same as NONE, but is used to distinguish between no update and update to NONE in update_masks.", + "Default value at resource creation, presence of this value must be treated as no logging/disable logging.", + "Debug or trace level logging.", + "Routine information, such as ongoing status or performance.", + "Normal but significant events, such as start up, shut down, or a configuration change.", + "Warning events might cause problems.", + "Error events are likely to cause problems.", + "Critical events cause more severe problems or outages.", + "A person must take action immediately.", + "One or more systems are unusable." + ], + "type": "string" + } + }, + "type": "object" + }, "Mesh": { "description": "Mesh represents a logical configuration grouping for workload to workload communication within a service mesh. Routes that point to mesh dictate how requests are routed within this logical mesh boundary.", "id": "Mesh", @@ -4346,6 +4381,16 @@ }, "type": "object" }, + "RetryFilterPerRouteConfig": { + "id": "RetryFilterPerRouteConfig", + "properties": { + "cryptoKeyName": { + "description": "The name of the crypto key to use for encrypting event data.", + "type": "string" + } + }, + "type": "object" + }, "ServiceBinding": { "description": "ServiceBinding is the resource that defines a Service Directory Service to be used in a BackendService resource.", "id": "ServiceBinding", diff --git a/networkservices/v1beta1/networkservices-gen.go b/networkservices/v1beta1/networkservices-gen.go index d7cbe33fe10..f7f91ee8312 100644 --- a/networkservices/v1beta1/networkservices-gen.go +++ b/networkservices/v1beta1/networkservices-gen.go @@ -2254,7 +2254,8 @@ type LbRouteExtension struct { // available under the namespace `com.google.lb_route_extension.`. The // following variables are supported in the metadata Struct: // `{forwarding_rule_id}` - substituted with the forwarding rule's fully - // qualified resource name. + // qualified resource name. Only one of the resource level metadata and + // extension level metadata can be set. Metadata googleapi.RawMessage `json:"metadata,omitempty"` // Name: Required. Identifier. Name of the `LbRouteExtension` resource in the // following format: @@ -2327,7 +2328,8 @@ type LbTrafficExtension struct { // `ProcessingRequest.metadata_context.filter_metadata` map field. The metadata // is available under the key `com.google.lb_traffic_extension.`. The following // variables are supported in the metadata: `{forwarding_rule_id}` - - // substituted with the forwarding rule's fully qualified resource name. + // substituted with the forwarding rule's fully qualified resource name. Only + // one of the resource level metadata and extension level metadata can be set. Metadata googleapi.RawMessage `json:"metadata,omitempty"` // Name: Required. Identifier. Name of the `LbTrafficExtension` resource in the // following format: @@ -2819,6 +2821,47 @@ func (s Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// LoggingConfig: The configuration for Platform Telemetry logging for Eventarc +// Avdvanced resources. +type LoggingConfig struct { + // LogSeverity: Optional. The minimum severity of logs that will be sent to + // Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be + // sent, unless it is NONE. + // + // Possible values: + // "LOG_SEVERITY_UNSPECIFIED" - Log severity is not specified. This value is + // treated the same as NONE, but is used to distinguish between no update and + // update to NONE in update_masks. + // "NONE" - Default value at resource creation, presence of this value must + // be treated as no logging/disable logging. + // "DEBUG" - Debug or trace level logging. + // "INFO" - Routine information, such as ongoing status or performance. + // "NOTICE" - Normal but significant events, such as start up, shut down, or + // a configuration change. + // "WARNING" - Warning events might cause problems. + // "ERROR" - Error events are likely to cause problems. + // "CRITICAL" - Critical events cause more severe problems or outages. + // "ALERT" - A person must take action immediately. + // "EMERGENCY" - One or more systems are unusable. + LogSeverity string `json:"logSeverity,omitempty"` + // ForceSendFields is a list of field names (e.g. "LogSeverity") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LogSeverity") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s LoggingConfig) MarshalJSON() ([]byte, error) { + type NoMethod LoggingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Mesh: Mesh represents a logical configuration grouping for workload to // workload communication within a service mesh. Routes that point to mesh // dictate how requests are routed within this logical mesh boundary. @@ -3126,6 +3169,27 @@ func (s Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type RetryFilterPerRouteConfig struct { + // CryptoKeyName: The name of the crypto key to use for encrypting event data. + CryptoKeyName string `json:"cryptoKeyName,omitempty"` + // ForceSendFields is a list of field names (e.g. "CryptoKeyName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CryptoKeyName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RetryFilterPerRouteConfig) MarshalJSON() ([]byte, error) { + type NoMethod RetryFilterPerRouteConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ServiceBinding: ServiceBinding is the resource that defines a Service // Directory Service to be used in a BackendService resource. type ServiceBinding struct { diff --git a/pubsub/v1/pubsub-api.json b/pubsub/v1/pubsub-api.json index abec1963015..36e8a27931c 100644 --- a/pubsub/v1/pubsub-api.json +++ b/pubsub/v1/pubsub-api.json @@ -1638,7 +1638,7 @@ } } }, - "revision": "20240730", + "revision": "20240912", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { @@ -2563,7 +2563,7 @@ "type": "object" }, "messageRetentionDuration": { - "description": "Optional. How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If `retain_acked_messages` is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a `Seek` can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 minutes.", + "description": "Optional. How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If `retain_acked_messages` is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a `Seek` can be done. Defaults to 7 days. Cannot be more than 31 days or less than 10 minutes.", "format": "google-duration", "type": "string" }, diff --git a/pubsub/v1/pubsub-gen.go b/pubsub/v1/pubsub-gen.go index a05cd99f9f5..4ed28e396f1 100644 --- a/pubsub/v1/pubsub-gen.go +++ b/pubsub/v1/pubsub-gen.go @@ -1876,8 +1876,8 @@ type Subscription struct { // messages in the subscription's backlog, from the moment a message is // published. If `retain_acked_messages` is true, then this also configures the // retention of acknowledged messages, and thus configures how far back in time - // a `Seek` can be done. Defaults to 7 days. Cannot be more than 7 days or less - // than 10 minutes. + // a `Seek` can be done. Defaults to 7 days. Cannot be more than 31 days or + // less than 10 minutes. MessageRetentionDuration string `json:"messageRetentionDuration,omitempty"` // Name: Required. The name of the subscription. It must have the format // "projects/{project}/subscriptions/{subscription}". `{subscription}` must diff --git a/run/v1/run-api.json b/run/v1/run-api.json index 4160fbdcc05..1e53c343fbc 100644 --- a/run/v1/run-api.json +++ b/run/v1/run-api.json @@ -2614,7 +2614,7 @@ } } }, - "revision": "20240802", + "revision": "20240916", "rootUrl": "https://run.googleapis.com/", "schemas": { "Addressable": { @@ -2934,7 +2934,7 @@ }, "readinessProbe": { "$ref": "Probe", - "description": "Not supported by Cloud Run." + "description": "Readiness probe to be used for health checks. Not supported by Cloud Run." }, "resources": { "$ref": "ResourceRequirements", @@ -5381,7 +5381,7 @@ "additionalProperties": { "type": "string" }, - "description": "Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. In Cloud Run, annotations with 'run.googleapis.com/' and 'autoscaling.knative.dev' are restricted, and the accepted annotations will be different depending on the resource type. * `autoscaling.knative.dev/maxScale`: Revision. * `autoscaling.knative.dev/minScale`: Revision. * `run.googleapis.com/base-images`: Service, Revision. * `run.googleapis.com/binary-authorization-breakglass`: Service, Job, * `run.googleapis.com/binary-authorization`: Service, Job, Execution. * `run.googleapis.com/build-base-image`: Service. * `run.googleapis.com/build-environment-variables`: Service. * `run.googleapis.com/build-id`: Service. * `run.googleapis.com/build-name`: Service. * `run.googleapis.com/build-service-account`: Service. * `run.googleapis.com/build-worker-pool`: Service. * `run.googleapis.com/client-name`: All resources. * `run.googleapis.com/cloudsql-instances`: Revision, Execution. * `run.googleapis.com/container-dependencies`: Revision . * `run.googleapis.com/cpu-throttling`: Revision. * `run.googleapis.com/custom-audiences`: Service. * `run.googleapis.com/default-url-disabled`: Service. * `run.googleapis.com/description`: Service. * `run.googleapis.com/enable-automatic-updates`: Service. * `run.googleapis.com/encryption-key-shutdown-hours`: Revision * `run.googleapis.com/encryption-key`: Revision, Execution. * `run.googleapis.com/execution-environment`: Revision, Execution. * `run.googleapis.com/function-target`: Service. * `run.googleapis.com/gc-traffic-tags`: Service. * `run.googleapis.com/image-uri`: Service. * `run.googleapis.com/ingress`: Service. * `run.googleapis.com/launch-stage`: Service, Job. * `run.googleapis.com/minScale`: Service (ALPHA) * `run.googleapis.com/network-interfaces`: Revision, Execution. * `run.googleapis.com/post-key-revocation-action-type`: Revision. * `run.googleapis.com/secrets`: Revision, Execution. * `run.googleapis.com/secure-session-agent`: Revision. * `run.googleapis.com/sessionAffinity`: Revision. * `run.googleapis.com/source-location`: Service. * `run.googleapis.com/startup-cpu-boost`: Revision. * `run.googleapis.com/vpc-access-connector`: Revision, Execution. * `run.googleapis.com/vpc-access-egress`: Revision, Execution.", + "description": "Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. In Cloud Run, annotations with 'run.googleapis.com/' and 'autoscaling.knative.dev' are restricted, and the accepted annotations will be different depending on the resource type. * `autoscaling.knative.dev/maxScale`: Revision. * `autoscaling.knative.dev/minScale`: Revision. * `run.googleapis.com/base-images`: Service, Revision. * `run.googleapis.com/binary-authorization-breakglass`: Service, Job, * `run.googleapis.com/binary-authorization`: Service, Job, Execution. * `run.googleapis.com/build-base-image`: Service. * `run.googleapis.com/build-enable-automatic-updates`: Service. * `run.googleapis.com/build-environment-variables`: Service. * `run.googleapis.com/build-function-target`: Service. * `run.googleapis.com/build-id`: Service. * `run.googleapis.com/build-image-uri`: Service. * `run.googleapis.com/build-name`: Service. * `run.googleapis.com/build-service-account`: Service. * `run.googleapis.com/build-source-location`: Service. * `run.googleapis.com/build-worker-pool`: Service. * `run.googleapis.com/client-name`: All resources. * `run.googleapis.com/cloudsql-instances`: Revision, Execution. * `run.googleapis.com/container-dependencies`: Revision . * `run.googleapis.com/cpu-throttling`: Revision. * `run.googleapis.com/custom-audiences`: Service. * `run.googleapis.com/default-url-disabled`: Service. * `run.googleapis.com/description`: Service. * `run.googleapis.com/encryption-key-shutdown-hours`: Revision * `run.googleapis.com/encryption-key`: Revision, Execution. * `run.googleapis.com/execution-environment`: Revision, Execution. * `run.googleapis.com/gc-traffic-tags`: Service. * `run.googleapis.com/ingress`: Service. * `run.googleapis.com/launch-stage`: Service, Job. * `run.googleapis.com/minScale`: Service (ALPHA) * `run.googleapis.com/network-interfaces`: Revision, Execution. * `run.googleapis.com/post-key-revocation-action-type`: Revision. * `run.googleapis.com/secrets`: Revision, Execution. * `run.googleapis.com/secure-session-agent`: Revision. * `run.googleapis.com/sessionAffinity`: Revision. * `run.googleapis.com/startup-cpu-boost`: Revision. * `run.googleapis.com/vpc-access-connector`: Revision, Execution. * `run.googleapis.com/vpc-access-egress`: Revision, Execution.", "type": "object" }, "clusterName": { diff --git a/run/v1/run-gen.go b/run/v1/run-gen.go index a88c7e48b9c..7cc2eb8b8b6 100644 --- a/run/v1/run-gen.go +++ b/run/v1/run-gen.go @@ -908,7 +908,8 @@ type Container struct { // chosen and passed to the container through the PORT environment variable for // the container to listen on. Ports []*ContainerPort `json:"ports,omitempty"` - // ReadinessProbe: Not supported by Cloud Run. + // ReadinessProbe: Readiness probe to be used for health checks. Not supported + // by Cloud Run. ReadinessProbe *Probe `json:"readinessProbe,omitempty"` // Resources: Compute Resources required by this container. Resources *ResourceRequirements `json:"resources,omitempty"` @@ -3917,9 +3918,14 @@ type ObjectMeta struct { // `run.googleapis.com/binary-authorization-breakglass`: Service, Job, * // `run.googleapis.com/binary-authorization`: Service, Job, Execution. * // `run.googleapis.com/build-base-image`: Service. * + // `run.googleapis.com/build-enable-automatic-updates`: Service. * // `run.googleapis.com/build-environment-variables`: Service. * - // `run.googleapis.com/build-id`: Service. * `run.googleapis.com/build-name`: - // Service. * `run.googleapis.com/build-service-account`: Service. * + // `run.googleapis.com/build-function-target`: Service. * + // `run.googleapis.com/build-id`: Service. * + // `run.googleapis.com/build-image-uri`: Service. * + // `run.googleapis.com/build-name`: Service. * + // `run.googleapis.com/build-service-account`: Service. * + // `run.googleapis.com/build-source-location`: Service. * // `run.googleapis.com/build-worker-pool`: Service. * // `run.googleapis.com/client-name`: All resources. * // `run.googleapis.com/cloudsql-instances`: Revision, Execution. * @@ -3928,21 +3934,17 @@ type ObjectMeta struct { // `run.googleapis.com/custom-audiences`: Service. * // `run.googleapis.com/default-url-disabled`: Service. * // `run.googleapis.com/description`: Service. * - // `run.googleapis.com/enable-automatic-updates`: Service. * // `run.googleapis.com/encryption-key-shutdown-hours`: Revision * // `run.googleapis.com/encryption-key`: Revision, Execution. * // `run.googleapis.com/execution-environment`: Revision, Execution. * - // `run.googleapis.com/function-target`: Service. * // `run.googleapis.com/gc-traffic-tags`: Service. * - // `run.googleapis.com/image-uri`: Service. * `run.googleapis.com/ingress`: - // Service. * `run.googleapis.com/launch-stage`: Service, Job. * - // `run.googleapis.com/minScale`: Service (ALPHA) * + // `run.googleapis.com/ingress`: Service. * `run.googleapis.com/launch-stage`: + // Service, Job. * `run.googleapis.com/minScale`: Service (ALPHA) * // `run.googleapis.com/network-interfaces`: Revision, Execution. * // `run.googleapis.com/post-key-revocation-action-type`: Revision. * // `run.googleapis.com/secrets`: Revision, Execution. * // `run.googleapis.com/secure-session-agent`: Revision. * // `run.googleapis.com/sessionAffinity`: Revision. * - // `run.googleapis.com/source-location`: Service. * // `run.googleapis.com/startup-cpu-boost`: Revision. * // `run.googleapis.com/vpc-access-connector`: Revision, Execution. * // `run.googleapis.com/vpc-access-egress`: Revision, Execution. diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index 89b583658a6..24b7fa56418 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -6084,7 +6084,7 @@ } } }, - "revision": "20240827", + "revision": "20240916", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -6656,6 +6656,10 @@ "description": "Represents a Microsoft Entra tenant.", "id": "AzureTenant", "properties": { + "displayName": { + "description": "The display name of the Azure tenant.", + "type": "string" + }, "id": { "description": "The ID of the Microsoft Entra tenant, for example, \"a11aaa11-aa11-1aa1-11aa-1aaa11a\".", "type": "string" @@ -9346,6 +9350,10 @@ "description": "Represents a Microsoft Entra tenant.", "id": "GoogleCloudSecuritycenterV2AzureTenant", "properties": { + "displayName": { + "description": "The display name of the Azure tenant.", + "type": "string" + }, "id": { "description": "The ID of the Microsoft Entra tenant, for example, \"a11aaa11-aa11-1aa1-11aa-1aaa11a\".", "type": "string" diff --git a/securitycenter/v1/securitycenter-gen.go b/securitycenter/v1/securitycenter-gen.go index d93b17de889..fcca9c0250b 100644 --- a/securitycenter/v1/securitycenter-gen.go +++ b/securitycenter/v1/securitycenter-gen.go @@ -1663,18 +1663,20 @@ func (s AzureSubscription) MarshalJSON() ([]byte, error) { // AzureTenant: Represents a Microsoft Entra tenant. type AzureTenant struct { + // DisplayName: The display name of the Azure tenant. + DisplayName string `json:"displayName,omitempty"` // Id: The ID of the Microsoft Entra tenant, for example, // "a11aaa11-aa11-1aa1-11aa-1aaa11a". Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -5032,18 +5034,20 @@ func (s GoogleCloudSecuritycenterV2AzureSubscription) MarshalJSON() ([]byte, err // GoogleCloudSecuritycenterV2AzureTenant: Represents a Microsoft Entra tenant. type GoogleCloudSecuritycenterV2AzureTenant struct { + // DisplayName: The display name of the Azure tenant. + DisplayName string `json:"displayName,omitempty"` // Id: The ID of the Microsoft Entra tenant, for example, // "a11aaa11-aa11-1aa1-11aa-1aaa11a". Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json index 78f7644075a..e25f3c48775 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json @@ -715,7 +715,7 @@ } } }, - "revision": "20240905", + "revision": "20240912", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "Api": { @@ -3281,7 +3281,7 @@ "id": "V1beta1DefaultIdentity", "properties": { "email": { - "description": "The email address of the default identity.", + "description": "The email address of the default identity. Calling GenerateDefaultIdentity with a deleted or purged default identity should expect does_not_exist@invalid-project.iam.gserviceaccount.com placeholder email.", "type": "string" }, "name": { diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go index 3227c14c6b3..3624059ef88 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go @@ -3995,7 +3995,10 @@ func (s V1beta1AddVisibilityLabelsResponse) MarshalJSON() ([]byte, error) { // V1beta1DefaultIdentity: A default identity in the Identity and Access // Management API. type V1beta1DefaultIdentity struct { - // Email: The email address of the default identity. + // Email: The email address of the default identity. Calling + // GenerateDefaultIdentity with a deleted or purged default identity should + // expect does_not_exist@invalid-project.iam.gserviceaccount.com placeholder + // email. Email string `json:"email,omitempty"` // Name: Default identity resource name. An example name would be: // `services/serviceconsumermanagement.googleapis.com/projects/123/defaultIdenti