diff --git a/dataform/v1beta1/dataform-api.json b/dataform/v1beta1/dataform-api.json index 2907ae28d5..4e941d7cef 100644 --- a/dataform/v1beta1/dataform-api.json +++ b/dataform/v1beta1/dataform-api.json @@ -467,7 +467,7 @@ "type": "integer" }, "pageToken": { - "description": "Optional. Page token received from a previous `FetchRepositoryHistory` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchRepositoryHistory` must match the call that provided the page token.", + "description": "Optional. Page token received from a previous `FetchRepositoryHistory` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchRepositoryHistory`, with the exception of `page_size`, must match the call that provided the page token.", "location": "query", "type": "string" } @@ -587,7 +587,7 @@ "type": "integer" }, "pageToken": { - "description": "Optional. Page token received from a previous `ListRepositories` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListRepositories` must match the call that provided the page token.", + "description": "Optional. Page token received from a previous `ListRepositories` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListRepositories`, with the exception of `page_size`, must match the call that provided the page token.", "location": "query", "type": "string" }, @@ -669,7 +669,7 @@ "type": "integer" }, "pageToken": { - "description": "Optional. Page token received from a previous `QueryRepositoryDirectoryContents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `QueryRepositoryDirectoryContents` must match the call that provided the page token.", + "description": "Optional. Page token received from a previous `QueryRepositoryDirectoryContents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `QueryRepositoryDirectoryContents`, with the exception of `page_size`, must match the call that provided the page token.", "location": "query", "type": "string" }, @@ -989,7 +989,7 @@ "type": "integer" }, "pageToken": { - "description": "Optional. Page token received from a previous `ListCompilationResults` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCompilationResults` must match the call that provided the page token.", + "description": "Optional. Page token received from a previous `ListCompilationResults` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCompilationResults`, with the exception of `page_size`, must match the call that provided the page token.", "location": "query", "type": "string" }, @@ -1037,7 +1037,7 @@ "type": "integer" }, "pageToken": { - "description": "Optional. Page token received from a previous `QueryCompilationResultActions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `QueryCompilationResultActions` must match the call that provided the page token.", + "description": "Optional. Page token received from a previous `QueryCompilationResultActions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `QueryCompilationResultActions`, with the exception of `page_size`, must match the call that provided the page token.", "location": "query", "type": "string" } @@ -1153,7 +1153,7 @@ "type": "integer" }, "pageToken": { - "description": "Optional. Page token received from a previous `ListReleaseConfigs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListReleaseConfigs` must match the call that provided the page token.", + "description": "Optional. Page token received from a previous `ListReleaseConfigs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListReleaseConfigs`, with the exception of `page_size`, must match the call that provided the page token.", "location": "query", "type": "string" }, @@ -1310,7 +1310,7 @@ "type": "integer" }, "pageToken": { - "description": "Optional. Page token received from a previous `ListWorkflowConfigs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListWorkflowConfigs` must match the call that provided the page token.", + "description": "Optional. Page token received from a previous `ListWorkflowConfigs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListWorkflowConfigs`, with the exception of `page_size`, must match the call that provided the page token.", "location": "query", "type": "string" }, @@ -1500,7 +1500,7 @@ "type": "integer" }, "pageToken": { - "description": "Optional. Page token received from a previous `ListWorkflowInvocations` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListWorkflowInvocations` must match the call that provided the page token.", + "description": "Optional. Page token received from a previous `ListWorkflowInvocations` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListWorkflowInvocations`, with the exception of `page_size`, must match the call that provided the page token.", "location": "query", "type": "string" }, @@ -1543,7 +1543,7 @@ "type": "integer" }, "pageToken": { - "description": "Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `QueryWorkflowInvocationActions` must match the call that provided the page token.", + "description": "Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `QueryWorkflowInvocationActions`, with the exception of `page_size`, must match the call that provided the page token.", "location": "query", "type": "string" } @@ -1841,7 +1841,7 @@ "type": "integer" }, "pageToken": { - "description": "Optional. Page token received from a previous `ListWorkspaces` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListWorkspaces` must match the call that provided the page token.", + "description": "Optional. Page token received from a previous `ListWorkspaces` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListWorkspaces`, with the exception of `page_size`, must match the call that provided the page token.", "location": "query", "type": "string" }, @@ -2017,7 +2017,7 @@ "type": "integer" }, "pageToken": { - "description": "Optional. Page token received from a previous `QueryDirectoryContents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `QueryDirectoryContents` must match the call that provided the page token.", + "description": "Optional. Page token received from a previous `QueryDirectoryContents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `QueryDirectoryContents`, with the exception of `page_size`, must match the call that provided the page token.", "location": "query", "type": "string" }, @@ -2182,7 +2182,7 @@ "type": "integer" }, "pageToken": { - "description": "Optional. Page token received from a previous `SearchFilesRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `SearchFilesRequest` must match the call that provided the page token.", + "description": "Optional. Page token received from a previous `SearchFilesRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `SearchFilesRequest`, with the exception of `page_size`, must match the call that provided the page token.", "location": "query", "type": "string" }, @@ -2295,7 +2295,7 @@ } } }, - "revision": "20240824", + "revision": "20241020", "rootUrl": "https://dataform.googleapis.com/", "schemas": { "Assertion": { @@ -2655,10 +2655,6 @@ "$ref": "Target", "description": "The action's identifier if the project had been compiled without any overrides configured. Unique within the compilation result." }, - "dataPreparation": { - "$ref": "DataPreparation", - "description": "The data preparation executed by this action." - }, "declaration": { "$ref": "Declaration", "description": "The declaration declared by this action." @@ -2735,36 +2731,6 @@ }, "type": "object" }, - "DataPreparation": { - "description": "Defines a compiled Data Preparation entity", - "id": "DataPreparation", - "properties": { - "contents": { - "description": "The data preparation definition, stored as a binary encoded proto.", - "format": "byte", - "type": "string" - }, - "dependencyTargets": { - "description": "A list of actions that this action depends on.", - "items": { - "$ref": "Target" - }, - "type": "array" - }, - "disabled": { - "description": "Whether this action is disabled (i.e. should not be run).", - "type": "boolean" - }, - "tags": { - "description": "Arbitrary, user-defined tags on this action.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "Declaration": { "description": "Represents a relation which is not managed by Dataform but which may be referenced by Dataform actions.", "id": "Declaration", @@ -3776,7 +3742,7 @@ "type": "string" }, "recentScheduledReleaseRecords": { - "description": "Output only. Records of the 10 most recent scheduled release attempts, ordered in in descending order of `release_time`. Updated whenever automatic creation of a compilation result is triggered by cron_schedule.", + "description": "Output only. Records of the 10 most recent scheduled release attempts, ordered in descending order of `release_time`. Updated whenever automatic creation of a compilation result is triggered by cron_schedule.", "items": { "$ref": "ScheduledReleaseRecord" }, @@ -3840,7 +3806,7 @@ "description": "Optional. If set, configures this repository to be linked to a Git remote." }, "kmsKeyName": { - "description": "Optional. The reference to a KMS encryption key. If provided, it will be used to encrypt user data in the repository and all child resources. It is not possible to add or update the encryption key after the repository is created. Example: `projects/[kms_project_id]/locations/[region]/keyRings/[key_region]/cryptoKeys/[key]`", + "description": "Optional. The reference to a KMS encryption key. If provided, it will be used to encrypt user data in the repository and all child resources. It is not possible to add or update the encryption key after the repository is created. Example: `projects/{kms_project}/locations/{location}/keyRings/{key_location}/cryptoKeys/{key}`", "type": "string" }, "labels": { @@ -4116,7 +4082,7 @@ "type": "string" }, "recentScheduledExecutionRecords": { - "description": "Output only. Records of the 10 most recent scheduled execution attempts, ordered in in descending order of `execution_time`. Updated whenever automatic creation of a workflow invocation is triggered by cron_schedule.", + "description": "Output only. Records of the 10 most recent scheduled execution attempts, ordered in descending order of `execution_time`. Updated whenever automatic creation of a workflow invocation is triggered by cron_schedule.", "items": { "$ref": "ScheduledExecutionRecord" }, @@ -4264,6 +4230,12 @@ "description": "Represents a Dataform Git workspace.", "id": "Workspace", "properties": { + "createTime": { + "description": "Output only. The timestamp of when the workspace was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, "dataEncryptionState": { "$ref": "DataEncryptionState", "description": "Output only. A data encryption state of a Git repository if this Workspace is protected by a KMS key.", diff --git a/dataform/v1beta1/dataform-gen.go b/dataform/v1beta1/dataform-gen.go index 607db32ffe..700a52c871 100644 --- a/dataform/v1beta1/dataform-gen.go +++ b/dataform/v1beta1/dataform-gen.go @@ -772,8 +772,6 @@ type CompilationResultAction struct { // CanonicalTarget: The action's identifier if the project had been compiled // without any overrides configured. Unique within the compilation result. CanonicalTarget *Target `json:"canonicalTarget,omitempty"` - // DataPreparation: The data preparation executed by this action. - DataPreparation *DataPreparation `json:"dataPreparation,omitempty"` // Declaration: The declaration declared by this action. Declaration *Declaration `json:"declaration,omitempty"` // FilePath: The full path including filename in which this action is located, @@ -891,34 +889,6 @@ func (s DataEncryptionState) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// DataPreparation: Defines a compiled Data Preparation entity -type DataPreparation struct { - // Contents: The data preparation definition, stored as a binary encoded proto. - Contents string `json:"contents,omitempty"` - // DependencyTargets: A list of actions that this action depends on. - DependencyTargets []*Target `json:"dependencyTargets,omitempty"` - // Disabled: Whether this action is disabled (i.e. should not be run). - Disabled bool `json:"disabled,omitempty"` - // Tags: Arbitrary, user-defined tags on this action. - Tags []string `json:"tags,omitempty"` - // ForceSendFields is a list of field names (e.g. "Contents") 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. "Contents") 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 DataPreparation) MarshalJSON() ([]byte, error) { - type NoMethod DataPreparation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // Declaration: Represents a relation which is not managed by Dataform but // which may be referenced by Dataform actions. type Declaration struct { @@ -2301,9 +2271,9 @@ type ReleaseConfig struct { // Name: Identifier. The release config's name. Name string `json:"name,omitempty"` // RecentScheduledReleaseRecords: Output only. Records of the 10 most recent - // scheduled release attempts, ordered in in descending order of - // `release_time`. Updated whenever automatic creation of a compilation result - // is triggered by cron_schedule. + // scheduled release attempts, ordered in descending order of `release_time`. + // Updated whenever automatic creation of a compilation result is triggered by + // cron_schedule. RecentScheduledReleaseRecords []*ScheduledReleaseRecord `json:"recentScheduledReleaseRecords,omitempty"` // ReleaseCompilationResult: Optional. The name of the currently released // compilation result for this release config. This value is updated when a @@ -2401,8 +2371,8 @@ type Repository struct { // will be used to encrypt user data in the repository and all child resources. // It is not possible to add or update the encryption key after the repository // is created. Example: - // `projects/[kms_project_id]/locations/[region]/keyRings/[key_region]/cryptoKey - // s/[key]` + // `projects/{kms_project}/locations/{location}/keyRings/{key_location}/cryptoKe + // ys/{key}` KmsKeyName string `json:"kmsKeyName,omitempty"` // Labels: Optional. Repository user labels. Labels map[string]string `json:"labels,omitempty"` @@ -2801,7 +2771,7 @@ type WorkflowConfig struct { // Name: Identifier. The workflow config's name. Name string `json:"name,omitempty"` // RecentScheduledExecutionRecords: Output only. Records of the 10 most recent - // scheduled execution attempts, ordered in in descending order of + // scheduled execution attempts, ordered in descending order of // `execution_time`. Updated whenever automatic creation of a workflow // invocation is triggered by cron_schedule. RecentScheduledExecutionRecords []*ScheduledExecutionRecord `json:"recentScheduledExecutionRecords,omitempty"` @@ -2947,6 +2917,8 @@ func (s WorkflowInvocationAction) MarshalJSON() ([]byte, error) { // Workspace: Represents a Dataform Git workspace. type Workspace struct { + // CreateTime: Output only. The timestamp of when the workspace was created. + CreateTime string `json:"createTime,omitempty"` // DataEncryptionState: Output only. A data encryption state of a Git // repository if this Workspace is protected by a KMS key. DataEncryptionState *DataEncryptionState `json:"dataEncryptionState,omitempty"` @@ -2955,15 +2927,15 @@ type Workspace struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DataEncryptionState") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. 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. "DataEncryptionState") 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. "CreateTime") 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:"-"` } @@ -4332,7 +4304,8 @@ func (c *ProjectsLocationsRepositoriesFetchHistoryCall) PageSize(pageSize int64) // PageToken sets the optional parameter "pageToken": Page token received from // a previous `FetchRepositoryHistory` call. Provide this to retrieve the // subsequent page. When paginating, all other parameters provided to -// `FetchRepositoryHistory` must match the call that provided the page token. +// `FetchRepositoryHistory`, with the exception of `page_size`, must match the +// call that provided the page token. func (c *ProjectsLocationsRepositoriesFetchHistoryCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesFetchHistoryCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -4834,8 +4807,9 @@ func (c *ProjectsLocationsRepositoriesListCall) PageSize(pageSize int64) *Projec // PageToken sets the optional parameter "pageToken": Page token received from // a previous `ListRepositories` call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to `ListRepositories` -// must match the call that provided the page token. +// page. When paginating, all other parameters provided to `ListRepositories`, +// with the exception of `page_size`, must match the call that provided the +// page token. func (c *ProjectsLocationsRepositoriesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -5098,8 +5072,8 @@ func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) PageSize(pageS // PageToken sets the optional parameter "pageToken": Page token received from // a previous `QueryRepositoryDirectoryContents` call. Provide this to retrieve // the subsequent page. When paginating, all other parameters provided to -// `QueryRepositoryDirectoryContents` must match the call that provided the -// page token. +// `QueryRepositoryDirectoryContents`, with the exception of `page_size`, must +// match the call that provided the page token. func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -6280,7 +6254,8 @@ func (c *ProjectsLocationsRepositoriesCompilationResultsListCall) PageSize(pageS // PageToken sets the optional parameter "pageToken": Page token received from // a previous `ListCompilationResults` call. Provide this to retrieve the // subsequent page. When paginating, all other parameters provided to -// `ListCompilationResults` must match the call that provided the page token. +// `ListCompilationResults`, with the exception of `page_size`, must match the +// call that provided the page token. func (c *ProjectsLocationsRepositoriesCompilationResultsListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesCompilationResultsListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -6434,8 +6409,8 @@ func (c *ProjectsLocationsRepositoriesCompilationResultsQueryCall) PageSize(page // PageToken sets the optional parameter "pageToken": Page token received from // a previous `QueryCompilationResultActions` call. Provide this to retrieve // the subsequent page. When paginating, all other parameters provided to -// `QueryCompilationResultActions` must match the call that provided the page -// token. +// `QueryCompilationResultActions`, with the exception of `page_size`, must +// match the call that provided the page token. func (c *ProjectsLocationsRepositoriesCompilationResultsQueryCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesCompilationResultsQueryCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -6894,7 +6869,8 @@ func (c *ProjectsLocationsRepositoriesReleaseConfigsListCall) PageSize(pageSize // PageToken sets the optional parameter "pageToken": Page token received from // a previous `ListReleaseConfigs` call. Provide this to retrieve the // subsequent page. When paginating, all other parameters provided to -// `ListReleaseConfigs` must match the call that provided the page token. +// `ListReleaseConfigs`, with the exception of `page_size`, must match the call +// that provided the page token. func (c *ProjectsLocationsRepositoriesReleaseConfigsListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesReleaseConfigsListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -7461,7 +7437,8 @@ func (c *ProjectsLocationsRepositoriesWorkflowConfigsListCall) PageSize(pageSize // PageToken sets the optional parameter "pageToken": Page token received from // a previous `ListWorkflowConfigs` call. Provide this to retrieve the // subsequent page. When paginating, all other parameters provided to -// `ListWorkflowConfigs` must match the call that provided the page token. +// `ListWorkflowConfigs`, with the exception of `page_size`, must match the +// call that provided the page token. func (c *ProjectsLocationsRepositoriesWorkflowConfigsListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesWorkflowConfigsListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -8138,7 +8115,8 @@ func (c *ProjectsLocationsRepositoriesWorkflowInvocationsListCall) PageSize(page // PageToken sets the optional parameter "pageToken": Page token received from // a previous `ListWorkflowInvocations` call. Provide this to retrieve the // subsequent page. When paginating, all other parameters provided to -// `ListWorkflowInvocations` must match the call that provided the page token. +// `ListWorkflowInvocations`, with the exception of `page_size`, must match the +// call that provided the page token. func (c *ProjectsLocationsRepositoriesWorkflowInvocationsListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesWorkflowInvocationsListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -8284,8 +8262,8 @@ func (c *ProjectsLocationsRepositoriesWorkflowInvocationsQueryCall) PageSize(pag // PageToken sets the optional parameter "pageToken": Page token received from // a previous `QueryWorkflowInvocationActions` call. Provide this to retrieve // the subsequent page. When paginating, all other parameters provided to -// `QueryWorkflowInvocationActions` must match the call that provided the page -// token. +// `QueryWorkflowInvocationActions`, with the exception of `page_size`, must +// match the call that provided the page token. func (c *ProjectsLocationsRepositoriesWorkflowInvocationsQueryCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesWorkflowInvocationsQueryCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -9426,8 +9404,9 @@ func (c *ProjectsLocationsRepositoriesWorkspacesListCall) PageSize(pageSize int6 // PageToken sets the optional parameter "pageToken": Page token received from // a previous `ListWorkspaces` call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to `ListWorkspaces` -// must match the call that provided the page token. +// page. When paginating, all other parameters provided to `ListWorkspaces`, +// with the exception of `page_size`, must match the call that provided the +// page token. func (c *ProjectsLocationsRepositoriesWorkspacesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesWorkspacesListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -10082,7 +10061,8 @@ func (c *ProjectsLocationsRepositoriesWorkspacesQueryDirectoryContentsCall) Page // PageToken sets the optional parameter "pageToken": Page token received from // a previous `QueryDirectoryContents` call. Provide this to retrieve the // subsequent page. When paginating, all other parameters provided to -// `QueryDirectoryContents` must match the call that provided the page token. +// `QueryDirectoryContents`, with the exception of `page_size`, must match the +// call that provided the page token. func (c *ProjectsLocationsRepositoriesWorkspacesQueryDirectoryContentsCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesWorkspacesQueryDirectoryContentsCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -10671,7 +10651,8 @@ func (c *ProjectsLocationsRepositoriesWorkspacesSearchFilesCall) PageSize(pageSi // PageToken sets the optional parameter "pageToken": Page token received from // a previous `SearchFilesRequest` call. Provide this to retrieve the // subsequent page. When paginating, all other parameters provided to -// `SearchFilesRequest` must match the call that provided the page token. +// `SearchFilesRequest`, with the exception of `page_size`, must match the call +// that provided the page token. func (c *ProjectsLocationsRepositoriesWorkspacesSearchFilesCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesWorkspacesSearchFilesCall { c.urlParams_.Set("pageToken", pageToken) return c diff --git a/datamigration/v1/datamigration-api.json b/datamigration/v1/datamigration-api.json index ba8ec7012d..79ceed6a13 100644 --- a/datamigration/v1/datamigration-api.json +++ b/datamigration/v1/datamigration-api.json @@ -2218,7 +2218,7 @@ } } }, - "revision": "20241015", + "revision": "20241022", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AlloyDbConnectionProfile": { @@ -6090,12 +6090,16 @@ "enum": [ "SSL_TYPE_UNSPECIFIED", "SERVER_ONLY", - "SERVER_CLIENT" + "SERVER_CLIENT", + "REQUIRED", + "NONE" ], "enumDescriptions": [ "Unspecified.", "Only 'ca_certificate' specified.", - "Both server ('ca_certificate'), and client ('client_key', 'client_certificate') specified." + "Both server ('ca_certificate'), and client ('client_key', 'client_certificate') specified.", + "Mandates SSL encryption for all connections. This doesn’t require certificate verification.", + "Connection is not encrypted." ], "type": "string" } diff --git a/datamigration/v1/datamigration-gen.go b/datamigration/v1/datamigration-gen.go index 5a184ba6c1..2a84320f72 100644 --- a/datamigration/v1/datamigration-gen.go +++ b/datamigration/v1/datamigration-gen.go @@ -4694,6 +4694,9 @@ type SslConfig struct { // "SERVER_ONLY" - Only 'ca_certificate' specified. // "SERVER_CLIENT" - Both server ('ca_certificate'), and client // ('client_key', 'client_certificate') specified. + // "REQUIRED" - Mandates SSL encryption for all connections. This doesn’t + // require certificate verification. + // "NONE" - Connection is not encrypted. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "CaCertificate") to // unconditionally include in API requests. By default, fields with empty or diff --git a/eventarc/v1/eventarc-api.json b/eventarc/v1/eventarc-api.json index 6940648dad..058880c17e 100644 --- a/eventarc/v1/eventarc-api.json +++ b/eventarc/v1/eventarc-api.json @@ -712,6 +712,109 @@ }, "enrollments": { "methods": { + "create": { + "description": "Create a new Enrollment in a particular project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/enrollments", + "httpMethod": "POST", + "id": "eventarc.projects.locations.enrollments.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "enrollmentId": { + "description": "Required. The user-provided ID to be assigned to the Enrollment. It should match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent collection in which to add this enrollment.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not post it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/enrollments", + "request": { + "$ref": "Enrollment" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete a single Enrollment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/enrollments/{enrollmentsId}", + "httpMethod": "DELETE", + "id": "eventarc.projects.locations.enrollments.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, and the Enrollment is not found, the request will succeed but no action will be taken on the server.", + "location": "query", + "type": "boolean" + }, + "etag": { + "description": "Optional. If provided, the Enrollment will only be deleted if the etag matches the current etag on the resource.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The name of the Enrollment to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/enrollments/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not post it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Get a single Enrollment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/enrollments/{enrollmentsId}", + "httpMethod": "GET", + "id": "eventarc.projects.locations.enrollments.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Enrollment to get.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/enrollments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Enrollment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getIamPolicy": { "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/enrollments/{enrollmentsId}:getIamPolicy", @@ -743,6 +846,96 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "list": { + "description": "List Enrollments.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/enrollments", + "httpMethod": "GET", + "id": "eventarc.projects.locations.enrollments.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter field that the list request will filter on. Possible filtersare described in https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. The sorting order of the resources returned. Value should be a comma-separated list of fields. The default sorting order is ascending. To specify descending order for a field, append a `desc` suffix; for example: `name desc, update_time`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of results to return on each page. Note: The service may send fewer.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The page token; provide the value from the `next_page_token` field in a previous call to retrieve the subsequent page. When paginating, all other parameters provided must match the previous call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent collection to list triggers on.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/enrollments", + "response": { + "$ref": "ListEnrollmentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update a single Enrollment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/enrollments/{enrollmentsId}", + "httpMethod": "PATCH", + "id": "eventarc.projects.locations.enrollments.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, and the Enrollment is not found, a new Enrollment will be created. In this situation, `update_mask` is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Identifier. Resource name of the form projects/{project}/locations/{location}/enrollments/{enrollment}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/enrollments/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of \"*\".", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not post it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Enrollment" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "setIamPolicy": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/enrollments/{enrollmentsId}:setIamPolicy", @@ -803,6 +996,109 @@ }, "googleApiSources": { "methods": { + "create": { + "description": "Create a new GoogleApiSource in a particular project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/googleApiSources", + "httpMethod": "POST", + "id": "eventarc.projects.locations.googleApiSources.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "googleApiSourceId": { + "description": "Required. The user-provided ID to be assigned to the GoogleApiSource. It should match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent collection in which to add this google api source.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not post it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/googleApiSources", + "request": { + "$ref": "GoogleApiSource" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete a single GoogleApiSource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/googleApiSources/{googleApiSourcesId}", + "httpMethod": "DELETE", + "id": "eventarc.projects.locations.googleApiSources.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, and the MessageBus is not found, the request will succeed but no action will be taken on the server.", + "location": "query", + "type": "boolean" + }, + "etag": { + "description": "Optional. If provided, the MessageBus will only be deleted if the etag matches the current etag on the resource.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The name of the GoogleApiSource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not post it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Get a single GoogleApiSource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/googleApiSources/{googleApiSourcesId}", + "httpMethod": "GET", + "id": "eventarc.projects.locations.googleApiSources.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the google api source to get.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleApiSource" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getIamPolicy": { "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/googleApiSources/{googleApiSourcesId}:getIamPolicy", @@ -834,92 +1130,411 @@ "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", + "list": { + "description": "List GoogleApiSources.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/googleApiSources", + "httpMethod": "GET", + "id": "eventarc.projects.locations.googleApiSources.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter field that the list request will filter on. Possible filtersare described in https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. The sorting order of the resources returned. Value should be a comma-separated list of fields. The default sorting order is ascending. To specify descending order for a field, append a `desc` suffix; for example: `name desc, update_time`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of results to return on each page. Note: The service may send fewer.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The page token; provide the value from the `next_page_token` field in a previous call to retrieve the subsequent page. When paginating, all other parameters provided must match the previous call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent collection to list GoogleApiSources on.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/googleApiSources", + "response": { + "$ref": "ListGoogleApiSourcesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update a single GoogleApiSource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/googleApiSources/{googleApiSourcesId}", + "httpMethod": "PATCH", + "id": "eventarc.projects.locations.googleApiSources.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, and the GoogleApiSource is not found, a new GoogleApiSource will be created. In this situation, `update_mask` is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Identifier. Resource name of the form projects/{project}/locations/{location}/googleApiSources/{google_api_source}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of \"*\".", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not post it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleApiSource" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "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": { + "create": { + "description": "Create a new MessageBus in a particular project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/messageBuses", + "httpMethod": "POST", + "id": "eventarc.projects.locations.messageBuses.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "messageBusId": { + "description": "Required. The user-provided ID to be assigned to the MessageBus. It should match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$)", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent collection in which to add this message bus.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not post it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/messageBuses", + "request": { + "$ref": "MessageBus" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete a single message bus.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/messageBuses/{messageBusesId}", + "httpMethod": "DELETE", + "id": "eventarc.projects.locations.messageBuses.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, and the MessageBus is not found, the request will succeed but no action will be taken on the server.", + "location": "query", + "type": "boolean" + }, + "etag": { + "description": "Optional. If provided, the MessageBus will only be deleted if the etag matches the current etag on the resource.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The name of the MessageBus to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not post it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Get a single MessageBus.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/messageBuses/{messageBusesId}", + "httpMethod": "GET", + "id": "eventarc.projects.locations.messageBuses.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the message bus to get.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "MessageBus" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/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" + ] + }, + "list": { + "description": "List message buses.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/messageBuses", + "httpMethod": "GET", + "id": "eventarc.projects.locations.messageBuses.list", "parameterOrder": [ - "resource" + "parent" ], "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "filter": { + "description": "Optional. The filter field that the list request will filter on. Possible filtersare described in https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. The sorting order of the resources returned. Value should be a comma-separated list of fields. The default sorting order is ascending. To specify descending order for a field, append a `desc` suffix; for example: `name desc, update_time`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of results to return on each page. Note: The service may send fewer.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The page token; provide the value from the `next_page_token` field in a previous call to retrieve the subsequent page. When paginating, all other parameters provided must match the previous call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent collection to list triggers on.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, + "path": "v1/{+parent}/messageBuses", "response": { - "$ref": "Policy" + "$ref": "ListMessageBusesResponse" }, "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", + "listEnrollments": { + "description": "List message bus enrollments.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/messageBuses/{messageBusesId}:listEnrollments", + "httpMethod": "GET", + "id": "eventarc.projects.locations.messageBuses.listEnrollments", "parameterOrder": [ - "resource" + "parent" ], "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.", + "pageSize": { + "description": "Optional. The maximum number of results to return on each page. Note: The service may send fewer.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The page token; provide the value from the `next_page_token` field in a previous call to retrieve the subsequent page. When paginating, all other parameters provided must match the previous call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent message bus to list enrollments on.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, + "path": "v1/{+parent}:listEnrollments", "response": { - "$ref": "TestIamPermissionsResponse" + "$ref": "ListMessageBusEnrollmentsResponse" }, "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", + }, + "patch": { + "description": "Update a single message bus.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/messageBuses/{messageBusesId}", + "httpMethod": "PATCH", + "id": "eventarc.projects.locations.messageBuses.patch", "parameterOrder": [ - "resource" + "name" ], "parameters": { - "options.requestedPolicyVersion": { - "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", + "allowMissing": { + "description": "Optional. If set to true, and the MessageBus is not found, a new MessageBus will be created. In this situation, `update_mask` is ignored.", "location": "query", - "type": "integer" + "type": "boolean" }, - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "name": { + "description": "Identifier. Resource name of the form projects/{project}/locations/{location}/messageBuses/{message_bus}", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+$", "required": true, "type": "string" + }, + "updateMask": { + "description": "Optional. The fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of \"*\".", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not post it.", + "location": "query", + "type": "boolean" } }, - "path": "v1/{+resource}:getIamPolicy", + "path": "v1/{+name}", + "request": { + "$ref": "MessageBus" + }, "response": { - "$ref": "Policy" + "$ref": "GoogleLongrunningOperation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -1091,49 +1706,242 @@ "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "pipelines": { + "methods": { + "create": { + "description": "Create a new Pipeline in a particular project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/pipelines", + "httpMethod": "POST", + "id": "eventarc.projects.locations.pipelines.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent collection in which to add this pipeline.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pipelineId": { + "description": "Required. The user-provided ID to be assigned to the Pipeline.", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not post it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/pipelines", + "request": { + "$ref": "Pipeline" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete a single pipeline.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/pipelines/{pipelinesId}", + "httpMethod": "DELETE", + "id": "eventarc.projects.locations.pipelines.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set to true, and the Pipeline is not found, the request will succeed but no action will be taken on the server.", + "location": "query", + "type": "boolean" + }, + "etag": { + "description": "Optional. If provided, the Pipeline will only be deleted if the etag matches the current etag on the resource.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The name of the Pipeline to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/pipelines/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not post it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Get a single Pipeline.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/pipelines/{pipelinesId}", + "httpMethod": "GET", + "id": "eventarc.projects.locations.pipelines.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the pipeline to get.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/pipelines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Pipeline" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/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" + ] + }, + "list": { + "description": "List pipelines.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/pipelines", + "httpMethod": "GET", + "id": "eventarc.projects.locations.pipelines.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter field that the list request will filter on. Possible filters are described in https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. The sorting order of the resources returned. Value should be a comma-separated list of fields. The default sorting order is ascending. To specify descending order for a field, append a `desc` suffix; for example: `name desc, update_time`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of results to return on each page. Note: The service may send fewer.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The page token; provide the value from the `next_page_token` field in a previous call to retrieve the subsequent page. When paginating, all other parameters provided must match the previous call that provided the page token.", "location": "query", "type": "string" + }, + "parent": { + "description": "Required. The parent collection to list pipelines on.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" } }, - "path": "v1/{+name}/operations", + "path": "v1/{+parent}/pipelines", "response": { - "$ref": "GoogleLongrunningListOperationsResponse" + "$ref": "ListPipelinesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - } - } - }, - "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", + }, + "patch": { + "description": "Update a single pipeline.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/pipelines/{pipelinesId}", + "httpMethod": "PATCH", + "id": "eventarc.projects.locations.pipelines.patch", "parameterOrder": [ - "resource" + "name" ], "parameters": { - "options.requestedPolicyVersion": { - "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", + "allowMissing": { + "description": "Optional. If set to true, and the Pipeline is not found, a new Pipeline will be created. In this situation, `update_mask` is ignored.", "location": "query", - "type": "integer" + "type": "boolean" }, - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "name": { + "description": "Identifier. The resource name of the Pipeline. Must be unique within the location of the project and must be in `projects/{project}/locations/{location}/pipelines/{pipeline}` format.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/pipelines/[^/]+$", "required": true, "type": "string" + }, + "updateMask": { + "description": "Optional. The fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of \"*\".", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not post it.", + "location": "query", + "type": "boolean" } }, - "path": "v1/{+resource}:getIamPolicy", + "path": "v1/{+name}", + "request": { + "$ref": "Pipeline" + }, "response": { - "$ref": "Policy" + "$ref": "GoogleLongrunningOperation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -1561,7 +2369,7 @@ } } }, - "revision": "20240913", + "revision": "20241021", "rootUrl": "https://eventarc.googleapis.com/", "schemas": { "AuditConfig": { @@ -1794,6 +2602,69 @@ "properties": {}, "type": "object" }, + "Enrollment": { + "description": "An enrollment represents a subscription for messages on a particular message bus. It defines a matching criteria for messages on the bus and the subscriber endpoint where matched messages should be delivered.", + "id": "Enrollment", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Resource annotations.", + "type": "object" + }, + "celMatch": { + "description": "Required. A CEL expression identifying which messages this enrollment applies to.", + "type": "string" + }, + "createTime": { + "description": "Output only. The creation time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "destination": { + "description": "Required. Destination is the Pipeline that the Enrollment is delivering to. It must point to the full resource name of a Pipeline. Format: \"projects/{PROJECT_ID}/locations/{region}/pipelines/{PIPELINE_ID)\"", + "type": "string" + }, + "displayName": { + "description": "Optional. Resource display name.", + "type": "string" + }, + "etag": { + "description": "Output only. This checksum is computed by the server based on the value of other fields, and might be sent only on update and delete requests to ensure that the client has an up-to-date value before proceeding.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Resource labels.", + "type": "object" + }, + "messageBus": { + "description": "Required. Resource name of the message bus identifying the source of the messages. It matches the form projects/{project}/locations/{location}/messageBuses/{messageBus}.", + "type": "string" + }, + "name": { + "description": "Identifier. Resource name of the form projects/{project}/locations/{location}/enrollments/{enrollment}", + "type": "string" + }, + "uid": { + "description": "Output only. Server assigned unique identifier for the channel. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The last-modified time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "EventFilter": { "description": "Filters events based on exact matches on the CloudEvents attributes.", "id": "EventFilter", @@ -1893,49 +2764,309 @@ }, "type": "object" }, - "GKE": { - "description": "Represents a GKE destination.", - "id": "GKE", + "GKE": { + "description": "Represents a GKE destination.", + "id": "GKE", + "properties": { + "cluster": { + "description": "Required. The name of the cluster the GKE service is running in. The cluster must be running in the same project as the trigger being created.", + "type": "string" + }, + "location": { + "description": "Required. The name of the Google Compute Engine in which the cluster resides, which can either be compute zone (for example, us-central1-a) for the zonal clusters or region (for example, us-central1) for regional clusters.", + "type": "string" + }, + "namespace": { + "description": "Required. The namespace the GKE service is running in.", + "type": "string" + }, + "path": { + "description": "Optional. The relative path on the GKE service the events should be sent to. The value must conform to the definition of a URI path segment (section 3.3 of RFC2396). Examples: \"/route\", \"route\", \"route/subroute\".", + "type": "string" + }, + "service": { + "description": "Required. Name of the GKE service.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleApiSource": { + "description": "A GoogleApiSource represents a subscription of 1P events from a MessageBus.", + "id": "GoogleApiSource", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Resource annotations.", + "type": "object" + }, + "createTime": { + "description": "Output only. The creation time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "cryptoKeyName": { + "description": "Optional. Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt their event data. It must match the pattern `projects/*/locations/*/keyRings/*/cryptoKeys/*`.", + "type": "string" + }, + "destination": { + "description": "Required. Destination is the message bus that the GoogleApiSource is delivering to. It must be point to the full resource name of a MessageBus. Format: \"projects/{PROJECT_ID}/locations/{region}/messagesBuses/{MESSAGE_BUS_ID)", + "type": "string" + }, + "displayName": { + "description": "Optional. Resource display name.", + "type": "string" + }, + "etag": { + "description": "Output only. This checksum is computed by the server based on the value of other fields, and might be sent only on update and delete requests to ensure that the client has an up-to-date value before proceeding.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Resource labels.", + "type": "object" + }, + "loggingConfig": { + "$ref": "LoggingConfig", + "description": "Optional. Config to control Platform logging for the GoogleApiSource." + }, + "name": { + "description": "Identifier. Resource name of the form projects/{project}/locations/{location}/googleApiSources/{google_api_source}", + "type": "string" + }, + "uid": { + "description": "Output only. Server assigned unique identifier for the channel. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The last-modified time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleChannelConfig": { + "description": "A GoogleChannelConfig is a resource that stores the custom settings respected by Eventarc first-party triggers in the matching region. Once configured, first-party event data will be protected using the specified custom managed encryption key instead of Google-managed encryption keys.", + "id": "GoogleChannelConfig", + "properties": { + "cryptoKeyName": { + "description": "Optional. Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt their event data. It must match the pattern `projects/*/locations/*/keyRings/*/cryptoKeys/*`.", + "type": "string" + }, + "name": { + "description": "Required. The resource name of the config. Must be in the format of, `projects/{project}/locations/{location}/googleChannelConfig`.", + "type": "string" + }, + "updateTime": { + "description": "Output only. The last-modified time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudEventarcV1PipelineDestination": { + "description": "Represents a target of an invocation over HTTP.", + "id": "GoogleCloudEventarcV1PipelineDestination", + "properties": { + "authenticationConfig": { + "$ref": "GoogleCloudEventarcV1PipelineDestinationAuthenticationConfig", + "description": "Optional. An authentication config used to authenticate message requests, such that destinations can verify the source. For example, this can be used with private GCP destinations that require GCP credentials to access like Cloud Run. This field is optional and should be set only by users interested in authenticated push" + }, + "httpEndpoint": { + "$ref": "GoogleCloudEventarcV1PipelineDestinationHttpEndpoint", + "description": "Optional. An HTTP endpoint destination described by an URI. If a DNS FQDN is provided as the endpoint, Pipeline will create a peering zone to the consumer VPC and forward DNS requests to the VPC specified by network config to resolve the service endpoint. See: https://cloud.google.com/dns/docs/zones/zones-overview#peering_zones" + }, + "messageBus": { + "description": "Optional. The resource name of the Message Bus to which events should be published. The Message Bus resource should exist in the same project as the Pipeline. Format: `projects/{project}/locations/{location}/messageBuses/{message_bus}`", + "type": "string" + }, + "networkConfig": { + "$ref": "GoogleCloudEventarcV1PipelineDestinationNetworkConfig", + "description": "Optional. Network config is used to configure how Pipeline resolves and connects to a destination." + }, + "outputPayloadFormat": { + "$ref": "GoogleCloudEventarcV1PipelineMessagePayloadFormat", + "description": "Optional. The message format before it is delivered to the destination. If not set, the message will be delivered in the format it was originally delivered to the Pipeline. This field can only be set if Pipeline.input_payload_format is also set." + }, + "topic": { + "description": "Optional. The resource name of the Pub/Sub topic to which events should be published. Format: `projects/{project}/locations/{location}/topics/{topic}`", + "type": "string" + }, + "workflow": { + "description": "Optional. The resource name of the Workflow whose Executions are triggered by the events. The Workflow resource should be deployed in the same project as the Pipeline. Format: `projects/{project}/locations/{location}/workflows/{workflow}`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudEventarcV1PipelineDestinationAuthenticationConfig": { + "description": "Represents a config used to authenticate message requests.", + "id": "GoogleCloudEventarcV1PipelineDestinationAuthenticationConfig", + "properties": { + "googleOidc": { + "$ref": "GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOidcToken", + "description": "Optional. This authenticate method will apply Google OIDC tokens signed by a GCP service account to the requests." + }, + "oauthToken": { + "$ref": "GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOAuthToken", + "description": "Optional. If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com." + } + }, + "type": "object" + }, + "GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOAuthToken": { + "description": "Contains information needed for generating an [OAuth token](https://developers.google.com/identity/protocols/OAuth2). This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com.", + "id": "GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOAuthToken", + "properties": { + "scope": { + "description": "Optional. OAuth scope to be used for generating OAuth access token. If not specified, \"https://www.googleapis.com/auth/cloud-platform\" will be used.", + "type": "string" + }, + "serviceAccount": { + "description": "Required. Service account email used to generate the [OAuth token](https://developers.google.com/identity/protocols/OAuth2). The principal who calls this API must have iam.serviceAccounts.actAs permission in the service account. See https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common for more information. Eventarc service agents must have roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline to create OAuth2 tokens for authenticated requests.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOidcToken": { + "description": "Represents a config used to authenticate with a Google OIDC token using a GCP service account. Use this authentication method to invoke your Cloud Run and Cloud Functions destinations or HTTP endpoints that support Google OIDC.", + "id": "GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOidcToken", + "properties": { + "audience": { + "description": "Optional. Audience to be used to generate the OIDC Token. The audience claim identifies the recipient that the JWT is intended for. If unspecified, the destination URI will be used.", + "type": "string" + }, + "serviceAccount": { + "description": "Required. Service account email used to generate the OIDC Token. The principal who calls this API must have iam.serviceAccounts.actAs permission in the service account. See https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common for more information. Eventarc service agents must have roles/roles/iam.serviceAccountTokenCreator role to allow the Pipeline to create OpenID tokens for authenticated requests.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudEventarcV1PipelineDestinationHttpEndpoint": { + "description": "Represents a HTTP endpoint destination.", + "id": "GoogleCloudEventarcV1PipelineDestinationHttpEndpoint", + "properties": { + "messageBindingTemplate": { + "description": "Optional. The CEL expression used to construct a new HTTP request to be sent to the final destination. The result of the CEL expression must be a map of key/value pairs such that: - If a map named `headers` exists on the result of the expression, then its key/value pairs are directly mapped to the HTTP request headers. The headers values are constructed from the corresponding value type’s canonical representation. If the `headers` field doesn’t exist then the resulting HTTP request will be without headers. - If a field named `body` exists on the result of the expression then its value is directly mapped to the body of the request. If the value of the `body` field is of type bytes or string then it is used for the HTTP request body as-is, with no conversion. If the body field is of any other type then it is converted to a JSON string. If the body field doesn’t exist then the resulting HTTP request will be without a body. - Any other fields in the resulting expression will be ignored. The CEL expression may access the incoming CloudEvent message in its definition, as follows: - The `data` field of the incoming CloudEvent message can be accessed using the `message.data` value. - Each attribute of the incoming CloudEvent message can be accessed using the `message.` value, where is replaced with the name of the attribute. Headers added to the request by previous filters in the chain can be accessed in the CEL expression using the `headers` variable. The `headers` variable defines a map of key/value pairs corresponding to the HTTP headers added by previous mediation steps and not the headers present on the original incoming request. For example, the following CEL expression can be used to construct a Headers-only HTTP request by adding an additional header to the headers added by previous mediations in the Pipeline: ``` {\"headers\": headers.merge({\"new-header-key\": \"new-header-value\"})} ``` Additionally, the following CEL extension functions are provided for use in this CEL expression: - toBase64Url: map.toBase64Url() -\u003e string - Converts a CelValue to a base64url encoded string - toJsonString: map.toJsonString() -\u003e string - Converts a CelValue to a JSON string - merge: map1.merge(map2) -\u003e map3 - Merges the passed CEL map with the existing CEL map the function is applied to. - If the same key exists in both maps, if the key's value is type map both maps are merged else the value from the passed map is used. - toMap: list(map).toMap() -\u003e map - Converts a CEL list of CEL maps to a single CEL map - toDestinationPayloadFormat(): message.data.toDestinationPayloadFormat() -\u003e string or bytes - Converts the message data to the destination payload format specified in Pipeline.Destination.output_payload_format - This function is meant to be applied to the message.data field. - If the destination payload format is not set, the function will return the message data unchanged. - toCloudEventJsonWithPayloadFormat: message.toCloudEventJsonWithPayloadFormat() -\u003e map - Converts a message to the corresponding structure of JSON format for CloudEvents - This function applies toDestinationPayloadFormat() to the message data. It also sets the corresponding datacontenttype of the CloudEvent, as indicated by Pipeline.Destination.output_payload_format. If no output_payload_format is set it will use the existing datacontenttype on the CloudEvent if present, else leave datacontenttype absent. - This function expects that the content of the message will adhere to the standard CloudEvent format. If it doesn’t then this function will fail. - The result is a CEL map that corresponds to the JSON representation of the CloudEvent. To convert that data to a JSON string it can be chained with the toJsonString function. If a binding is not specified here, by default the message is treated as a CloudEvent and is mapped to the HTTP request according to the CloudEvent HTTP Protocol Binding Binary Content Mode. The Pipeline converts the data field of the message to the format provided in Pipeline.Destination.output_payload_format and maps it to the body field of the result. It also sets the corresponding Content-Type header to the output_payload_format type. If the Pipeline.Destination.output_payload_format is not set, then the Pipeline will treat the data field of the message as opaque binary data and attach it to the request body as bytes. In this case the Content-type header will be set to the value of the datacontenttype attribute set on the incoming CloudEvent message if present and the `application/octet-stream` MIME type otherwise. The Pipeline expects that the content of the message will adhere to the standard CloudEvent format. If it doesn’t then the outgoing message request may fail with a persistent error.", + "type": "string" + }, + "uri": { + "description": "Required. The URI of the HTTP enpdoint. The value must be a RFC2396 URI string. Examples: `http://10.10.10.8:80/route`, `http://svc.us-central1.p.local:8080/`. Only HTTP and HTTPS protocols are supported. The host can be either a static IP addressable from the VPC specified by the network config, or an internal DNS hostname of the service resolvable via Cloud DNS.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudEventarcV1PipelineDestinationNetworkConfig": { + "description": "Represents a network config to be used for destination resolution and connectivity.", + "id": "GoogleCloudEventarcV1PipelineDestinationNetworkConfig", + "properties": { + "networkAttachment": { + "description": "Required. Name of the NetworkAttachment that allows access to the consumer VPC. Format: `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudEventarcV1PipelineMediation": { + "description": "Mediation defines different ways to modify the Pipeline.", + "id": "GoogleCloudEventarcV1PipelineMediation", "properties": { - "cluster": { - "description": "Required. The name of the cluster the GKE service is running in. The cluster must be running in the same project as the trigger being created.", - "type": "string" - }, - "location": { - "description": "Required. The name of the Google Compute Engine in which the cluster resides, which can either be compute zone (for example, us-central1-a) for the zonal clusters or region (for example, us-central1) for regional clusters.", - "type": "string" - }, - "namespace": { - "description": "Required. The namespace the GKE service is running in.", + "transformation": { + "$ref": "GoogleCloudEventarcV1PipelineMediationTransformation", + "description": "Optional. How the Pipeline is to transform messages" + } + }, + "type": "object" + }, + "GoogleCloudEventarcV1PipelineMediationTransformation": { + "description": "Transformation defines the way to transform an incoming message.", + "id": "GoogleCloudEventarcV1PipelineMediationTransformation", + "properties": { + "transformationTemplate": { + "description": "Optional. The template to apply to transform messages.", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudEventarcV1PipelineMessagePayloadFormat": { + "description": "Represents the format of message data.", + "id": "GoogleCloudEventarcV1PipelineMessagePayloadFormat", + "properties": { + "avro": { + "$ref": "GoogleCloudEventarcV1PipelineMessagePayloadFormatAvroFormat", + "description": "Optional. Avro format." }, - "path": { - "description": "Optional. The relative path on the GKE service the events should be sent to. The value must conform to the definition of a URI path segment (section 3.3 of RFC2396). Examples: \"/route\", \"route\", \"route/subroute\".", - "type": "string" + "json": { + "$ref": "GoogleCloudEventarcV1PipelineMessagePayloadFormatJsonFormat", + "description": "Optional. JSON format." }, - "service": { - "description": "Required. Name of the GKE service.", + "protobuf": { + "$ref": "GoogleCloudEventarcV1PipelineMessagePayloadFormatProtobufFormat", + "description": "Optional. Protobuf format." + } + }, + "type": "object" + }, + "GoogleCloudEventarcV1PipelineMessagePayloadFormatAvroFormat": { + "description": "The format of an AVRO message payload.", + "id": "GoogleCloudEventarcV1PipelineMessagePayloadFormatAvroFormat", + "properties": { + "schemaDefinition": { + "description": "Optional. The entire schema definition is stored in this field.", "type": "string" } }, "type": "object" }, - "GoogleChannelConfig": { - "description": "A GoogleChannelConfig is a resource that stores the custom settings respected by Eventarc first-party triggers in the matching region. Once configured, first-party event data will be protected using the specified custom managed encryption key instead of Google-managed encryption keys.", - "id": "GoogleChannelConfig", + "GoogleCloudEventarcV1PipelineMessagePayloadFormatJsonFormat": { + "description": "The format of a JSON message payload.", + "id": "GoogleCloudEventarcV1PipelineMessagePayloadFormatJsonFormat", + "properties": {}, + "type": "object" + }, + "GoogleCloudEventarcV1PipelineMessagePayloadFormatProtobufFormat": { + "description": "The format of a Protobuf message payload.", + "id": "GoogleCloudEventarcV1PipelineMessagePayloadFormatProtobufFormat", "properties": { - "cryptoKeyName": { - "description": "Optional. Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt their event data. It must match the pattern `projects/*/locations/*/keyRings/*/cryptoKeys/*`.", + "schemaDefinition": { + "description": "Optional. The entire schema definition is stored in this field.", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudEventarcV1PipelineRetryPolicy": { + "description": "The retry policy configuration for the Pipeline. The pipeline exponentially backs off in case the destination is non responsive or returns a retryable error code. The default semantics are as follows: The backoff starts with a 5 second delay and doubles the delay after each failed attempt (10 seconds, 20 seconds, 40 seconds, etc.). The delay is capped at 60 seconds by default. Please note that if you set the min_retry_delay and max_retry_delay fields to the same value this will make the duration between retries constant.", + "id": "GoogleCloudEventarcV1PipelineRetryPolicy", + "properties": { + "maxAttempts": { + "description": "Optional. The maximum number of delivery attempts for any message. The value must be between 1 and 100. The default value for this field is 5.", + "format": "int32", + "type": "integer" }, - "name": { - "description": "Required. The resource name of the config. Must be in the format of, `projects/{project}/locations/{location}/googleChannelConfig`.", + "maxRetryDelay": { + "description": "Optional. The maximum amount of seconds to wait between retry attempts. The value must be between 0 and 600. The default value for this field is 60.", + "format": "google-duration", "type": "string" }, - "updateTime": { - "description": "Output only. The last-modified time.", - "format": "google-datetime", - "readOnly": true, + "minRetryDelay": { + "description": "Optional. The minimum amount of seconds to wait between retry attempts. The value must be between 0 and 600. The default value for this field is 5.", + "format": "google-duration", "type": "string" } }, @@ -2088,6 +3219,56 @@ }, "type": "object" }, + "ListEnrollmentsResponse": { + "description": "The response message for the `ListEnrollments` method.", + "id": "ListEnrollmentsResponse", + "properties": { + "enrollments": { + "description": "The requested Enrollments, up to the number specified in `page_size`.", + "items": { + "$ref": "Enrollment" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A page token that can be sent to `ListEnrollments` to request the next page. If this is empty, then there are no more pages.", + "type": "string" + }, + "unreachable": { + "description": "Unreachable resources, if any.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListGoogleApiSourcesResponse": { + "description": "The response message for the `ListGoogleApiSources` method.", + "id": "ListGoogleApiSourcesResponse", + "properties": { + "googleApiSources": { + "description": "The requested GoogleApiSources, up to the number specified in `page_size`.", + "items": { + "$ref": "GoogleApiSource" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A page token that can be sent to `ListMessageBusEnrollments` to request the next page. If this is empty, then there are no more pages.", + "type": "string" + }, + "unreachable": { + "description": "Unreachable resources, if any.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -2106,6 +3287,81 @@ }, "type": "object" }, + "ListMessageBusEnrollmentsResponse": { + "description": "The response message for the `ListMessageBusEnrollments` method.`", + "id": "ListMessageBusEnrollmentsResponse", + "properties": { + "enrollments": { + "description": "The requested enrollments, up to the number specified in `page_size`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A page token that can be sent to `ListMessageBusEnrollments` to request the next page. If this is empty, then there are no more pages.", + "type": "string" + }, + "unreachable": { + "description": "Unreachable resources, if any.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListMessageBusesResponse": { + "description": "The response message for the `ListMessageBuses` method.", + "id": "ListMessageBusesResponse", + "properties": { + "messageBuses": { + "description": "The requested message buses, up to the number specified in `page_size`.", + "items": { + "$ref": "MessageBus" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A page token that can be sent to `ListMessageBuses` to request the next page. If this is empty, then there are no more pages.", + "type": "string" + }, + "unreachable": { + "description": "Unreachable resources, if any.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListPipelinesResponse": { + "description": "The response message for the ListPipelines method.", + "id": "ListPipelinesResponse", + "properties": { + "nextPageToken": { + "description": "A page token that can be sent to `ListPipelines` to request the next page. If this is empty, then there are no more pages.", + "type": "string" + }, + "pipelines": { + "description": "The requested pipelines, up to the number specified in `page_size`.", + "items": { + "$ref": "Pipeline" + }, + "type": "array" + }, + "unreachable": { + "description": "Unreachable resources, if any.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListProvidersResponse": { "description": "The response message for the `ListProviders` method.", "id": "ListProvidersResponse", @@ -2190,6 +3446,100 @@ }, "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" + }, + "MessageBus": { + "description": "MessageBus for the messages flowing through the system. The admin has visibility and control over the messages being published and consumed and can restrict publishers and subscribers to only a subset of data available in the system by defining authorization policies.", + "id": "MessageBus", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Resource annotations.", + "type": "object" + }, + "createTime": { + "description": "Output only. The creation time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "cryptoKeyName": { + "description": "Optional. Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt their event data. It must match the pattern `projects/*/locations/*/keyRings/*/cryptoKeys/*`.", + "type": "string" + }, + "displayName": { + "description": "Optional. Resource display name.", + "type": "string" + }, + "etag": { + "description": "Output only. This checksum is computed by the server based on the value of other fields, and might be sent only on update and delete requests to ensure that the client has an up-to-date value before proceeding.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Resource labels.", + "type": "object" + }, + "loggingConfig": { + "$ref": "LoggingConfig", + "description": "Optional. Config to control Platform logging for the Message Bus. This log configuration is applied to the Message Bus itself, and all the Enrollments attached to it." + }, + "name": { + "description": "Identifier. Resource name of the form projects/{project}/locations/{location}/messageBuses/{message_bus}", + "type": "string" + }, + "uid": { + "description": "Output only. Server assigned unique identifier for the channel. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The last-modified time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "NetworkConfig": { "description": "Network Configuration that can be inherited by other protos.", "id": "NetworkConfig", @@ -2245,6 +3595,86 @@ }, "type": "object" }, + "Pipeline": { + "description": "A representation of the Pipeline resource.", + "id": "Pipeline", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User-defined annotations. See https://google.aip.dev/128#annotations.", + "type": "object" + }, + "createTime": { + "description": "Output only. The creation time. A timestamp in RFC3339 UTC \"Zulu\" format, with nanosecond resolution and up to nine fractional digits. Examples: \"2014-10-02T15:01:23Z\" and \"2014-10-02T15:01:23.045123456Z\".", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "cryptoKeyName": { + "description": "Optional. Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt the event data. If not set, an internal Google-owned key will be used to encrypt messages. It must match the pattern \"projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}\".", + "type": "string" + }, + "destinations": { + "description": "Required. List of destinations to which messages will be forwarded. Currently, exactly one destination is supported per Pipeline.", + "items": { + "$ref": "GoogleCloudEventarcV1PipelineDestination" + }, + "type": "array" + }, + "displayName": { + "description": "Optional. Display name of resource.", + "type": "string" + }, + "etag": { + "description": "Output only. This checksum is computed by the server based on the value of other fields, and might be sent only on create requests to ensure that the client has an up-to-date value before proceeding.", + "type": "string" + }, + "inputPayloadFormat": { + "$ref": "GoogleCloudEventarcV1PipelineMessagePayloadFormat", + "description": "Optional. The payload format expected for the messages received by the Pipeline. If input_payload_format is set then any messages not matching this format will be treated as persistent errors. If input_payload_format is not set, then the message data will be treated as an opaque binary and no output format can be set on the Pipeline through the Pipeline.Destination.output_payload_format field. Any Mediations on the Pipeline that involve access to the data field will fail as persistent errors." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User labels attached to the Pipeline that can be used to group resources. An object containing a list of \"key\": value pairs. Example: { \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }.", + "type": "object" + }, + "loggingConfig": { + "$ref": "LoggingConfig", + "description": "Optional. Config to control Platform Logging for Pipelines." + }, + "mediations": { + "description": "Optional. List of mediation operations to be performed on the message. Currently, only one Transformation operation is allowed in each Pipeline.", + "items": { + "$ref": "GoogleCloudEventarcV1PipelineMediation" + }, + "type": "array" + }, + "name": { + "description": "Identifier. The resource name of the Pipeline. Must be unique within the location of the project and must be in `projects/{project}/locations/{location}/pipelines/{pipeline}` format.", + "type": "string" + }, + "retryPolicy": { + "$ref": "GoogleCloudEventarcV1PipelineRetryPolicy", + "description": "Optional. The retry policy to use in the pipeline." + }, + "uid": { + "description": "Output only. Server-assigned unique identifier for the Pipeline. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The last-modified time. A timestamp in RFC3339 UTC \"Zulu\" format, with nanosecond resolution and up to nine fractional digits. Examples: \"2014-10-02T15:01:23Z\" and \"2014-10-02T15:01:23.045123456Z\".", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Policy": { "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", diff --git a/eventarc/v1/eventarc-gen.go b/eventarc/v1/eventarc-gen.go index 9bbe32db05..c1e7852427 100644 --- a/eventarc/v1/eventarc-gen.go +++ b/eventarc/v1/eventarc-gen.go @@ -662,6 +662,63 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// Enrollment: An enrollment represents a subscription for messages on a +// particular message bus. It defines a matching criteria for messages on the +// bus and the subscriber endpoint where matched messages should be delivered. +type Enrollment struct { + // Annotations: Optional. Resource annotations. + Annotations map[string]string `json:"annotations,omitempty"` + // CelMatch: Required. A CEL expression identifying which messages this + // enrollment applies to. + CelMatch string `json:"celMatch,omitempty"` + // CreateTime: Output only. The creation time. + CreateTime string `json:"createTime,omitempty"` + // Destination: Required. Destination is the Pipeline that the Enrollment is + // delivering to. It must point to the full resource name of a Pipeline. + // Format: "projects/{PROJECT_ID}/locations/{region}/pipelines/{PIPELINE_ID)" + Destination string `json:"destination,omitempty"` + // DisplayName: Optional. Resource display name. + DisplayName string `json:"displayName,omitempty"` + // Etag: Output only. This checksum is computed by the server based on the + // value of other fields, and might be sent only on update and delete requests + // to ensure that the client has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + // Labels: Optional. Resource labels. + Labels map[string]string `json:"labels,omitempty"` + // MessageBus: Required. Resource name of the message bus identifying the + // source of the messages. It matches the form + // projects/{project}/locations/{location}/messageBuses/{messageBus}. + MessageBus string `json:"messageBus,omitempty"` + // Name: Identifier. Resource name of the form + // projects/{project}/locations/{location}/enrollments/{enrollment} + Name string `json:"name,omitempty"` + // Uid: Output only. Server assigned unique identifier for the channel. The + // value is a UUID4 string and guaranteed to remain unchanged until the + // resource is deleted. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. The last-modified time. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. 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. "Annotations") 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 Enrollment) MarshalJSON() ([]byte, error) { + type NoMethod Enrollment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // EventFilter: Filters events based on exact matches on the CloudEvents // attributes. type EventFilter struct { @@ -849,6 +906,63 @@ func (s GKE) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleApiSource: A GoogleApiSource represents a subscription of 1P events +// from a MessageBus. +type GoogleApiSource struct { + // Annotations: Optional. Resource annotations. + Annotations map[string]string `json:"annotations,omitempty"` + // CreateTime: Output only. The creation time. + CreateTime string `json:"createTime,omitempty"` + // CryptoKeyName: Optional. Resource name of a KMS crypto key (managed by the + // user) used to encrypt/decrypt their event data. It must match the pattern + // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + CryptoKeyName string `json:"cryptoKeyName,omitempty"` + // Destination: Required. Destination is the message bus that the + // GoogleApiSource is delivering to. It must be point to the full resource name + // of a MessageBus. Format: + // "projects/{PROJECT_ID}/locations/{region}/messagesBuses/{MESSAGE_BUS_ID) + Destination string `json:"destination,omitempty"` + // DisplayName: Optional. Resource display name. + DisplayName string `json:"displayName,omitempty"` + // Etag: Output only. This checksum is computed by the server based on the + // value of other fields, and might be sent only on update and delete requests + // to ensure that the client has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + // Labels: Optional. Resource labels. + Labels map[string]string `json:"labels,omitempty"` + // LoggingConfig: Optional. Config to control Platform logging for the + // GoogleApiSource. + LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"` + // Name: Identifier. Resource name of the form + // projects/{project}/locations/{location}/googleApiSources/{google_api_source} + Name string `json:"name,omitempty"` + // Uid: Output only. Server assigned unique identifier for the channel. The + // value is a UUID4 string and guaranteed to remain unchanged until the + // resource is deleted. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. The last-modified time. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. 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. "Annotations") 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 GoogleApiSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleApiSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleChannelConfig: A GoogleChannelConfig is a resource that stores the // custom settings respected by Eventarc first-party triggers in the matching // region. Once configured, first-party event data will be protected using the @@ -885,6 +999,451 @@ func (s GoogleChannelConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudEventarcV1PipelineDestination: Represents a target of an +// invocation over HTTP. +type GoogleCloudEventarcV1PipelineDestination struct { + // AuthenticationConfig: Optional. An authentication config used to + // authenticate message requests, such that destinations can verify the source. + // For example, this can be used with private GCP destinations that require GCP + // credentials to access like Cloud Run. This field is optional and should be + // set only by users interested in authenticated push + AuthenticationConfig *GoogleCloudEventarcV1PipelineDestinationAuthenticationConfig `json:"authenticationConfig,omitempty"` + // HttpEndpoint: Optional. An HTTP endpoint destination described by an URI. If + // a DNS FQDN is provided as the endpoint, Pipeline will create a peering zone + // to the consumer VPC and forward DNS requests to the VPC specified by network + // config to resolve the service endpoint. See: + // https://cloud.google.com/dns/docs/zones/zones-overview#peering_zones + HttpEndpoint *GoogleCloudEventarcV1PipelineDestinationHttpEndpoint `json:"httpEndpoint,omitempty"` + // MessageBus: Optional. The resource name of the Message Bus to which events + // should be published. The Message Bus resource should exist in the same + // project as the Pipeline. Format: + // `projects/{project}/locations/{location}/messageBuses/{message_bus}` + MessageBus string `json:"messageBus,omitempty"` + // NetworkConfig: Optional. Network config is used to configure how Pipeline + // resolves and connects to a destination. + NetworkConfig *GoogleCloudEventarcV1PipelineDestinationNetworkConfig `json:"networkConfig,omitempty"` + // OutputPayloadFormat: Optional. The message format before it is delivered to + // the destination. If not set, the message will be delivered in the format it + // was originally delivered to the Pipeline. This field can only be set if + // Pipeline.input_payload_format is also set. + OutputPayloadFormat *GoogleCloudEventarcV1PipelineMessagePayloadFormat `json:"outputPayloadFormat,omitempty"` + // Topic: Optional. The resource name of the Pub/Sub topic to which events + // should be published. Format: + // `projects/{project}/locations/{location}/topics/{topic}` + Topic string `json:"topic,omitempty"` + // Workflow: Optional. The resource name of the Workflow whose Executions are + // triggered by the events. The Workflow resource should be deployed in the + // same project as the Pipeline. Format: + // `projects/{project}/locations/{location}/workflows/{workflow}` + Workflow string `json:"workflow,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuthenticationConfig") 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. "AuthenticationConfig") 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 GoogleCloudEventarcV1PipelineDestination) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudEventarcV1PipelineDestination + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudEventarcV1PipelineDestinationAuthenticationConfig: Represents a +// config used to authenticate message requests. +type GoogleCloudEventarcV1PipelineDestinationAuthenticationConfig struct { + // GoogleOidc: Optional. This authenticate method will apply Google OIDC tokens + // signed by a GCP service account to the requests. + GoogleOidc *GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOidcToken `json:"googleOidc,omitempty"` + // OauthToken: Optional. If specified, an OAuth token + // (https://developers.google.com/identity/protocols/OAuth2) will be generated + // and attached as an `Authorization` header in the HTTP request. This type of + // authorization should generally only be used when calling Google APIs hosted + // on *.googleapis.com. + OauthToken *GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOAuthToken `json:"oauthToken,omitempty"` + // ForceSendFields is a list of field names (e.g. "GoogleOidc") 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. "GoogleOidc") 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 GoogleCloudEventarcV1PipelineDestinationAuthenticationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudEventarcV1PipelineDestinationAuthenticationConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOAuthToken: +// Contains information needed for generating an OAuth token +// (https://developers.google.com/identity/protocols/OAuth2). This type of +// authorization should generally only be used when calling Google APIs hosted +// on *.googleapis.com. +type GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOAuthToken struct { + // Scope: Optional. OAuth scope to be used for generating OAuth access token. + // If not specified, "https://www.googleapis.com/auth/cloud-platform" will be + // used. + Scope string `json:"scope,omitempty"` + // ServiceAccount: Required. Service account email used to generate the OAuth + // token (https://developers.google.com/identity/protocols/OAuth2). The + // principal who calls this API must have iam.serviceAccounts.actAs permission + // in the service account. See + // https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common + // for more information. Eventarc service agents must have + // roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline to create + // OAuth2 tokens for authenticated requests. + ServiceAccount string `json:"serviceAccount,omitempty"` + // ForceSendFields is a list of field names (e.g. "Scope") 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. "Scope") 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 GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOAuthToken) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOAuthToken + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOidcToken: +// Represents a config used to authenticate with a Google OIDC token using a +// GCP service account. Use this authentication method to invoke your Cloud Run +// and Cloud Functions destinations or HTTP endpoints that support Google OIDC. +type GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOidcToken struct { + // Audience: Optional. Audience to be used to generate the OIDC Token. The + // audience claim identifies the recipient that the JWT is intended for. If + // unspecified, the destination URI will be used. + Audience string `json:"audience,omitempty"` + // ServiceAccount: Required. Service account email used to generate the OIDC + // Token. The principal who calls this API must have iam.serviceAccounts.actAs + // permission in the service account. See + // https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common + // for more information. Eventarc service agents must have + // roles/roles/iam.serviceAccountTokenCreator role to allow the Pipeline to + // create OpenID tokens for authenticated requests. + ServiceAccount string `json:"serviceAccount,omitempty"` + // ForceSendFields is a list of field names (e.g. "Audience") 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. "Audience") 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 GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOidcToken) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudEventarcV1PipelineDestinationAuthenticationConfigOidcToken + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudEventarcV1PipelineDestinationHttpEndpoint: Represents a HTTP +// endpoint destination. +type GoogleCloudEventarcV1PipelineDestinationHttpEndpoint struct { + // MessageBindingTemplate: Optional. The CEL expression used to construct a new + // HTTP request to be sent to the final destination. The result of the CEL + // expression must be a map of key/value pairs such that: - If a map named + // `headers` exists on the result of the expression, then its key/value pairs + // are directly mapped to the HTTP request headers. The headers values are + // constructed from the corresponding value type’s canonical representation. + // If the `headers` field doesn’t exist then the resulting HTTP request will + // be without headers. - If a field named `body` exists on the result of the + // expression then its value is directly mapped to the body of the request. If + // the value of the `body` field is of type bytes or string then it is used for + // the HTTP request body as-is, with no conversion. If the body field is of any + // other type then it is converted to a JSON string. If the body field + // doesn’t exist then the resulting HTTP request will be without a body. - + // Any other fields in the resulting expression will be ignored. The CEL + // expression may access the incoming CloudEvent message in its definition, as + // follows: - The `data` field of the incoming CloudEvent message can be + // accessed using the `message.data` value. - Each attribute of the incoming + // CloudEvent message can be accessed using the `message.` value, where is + // replaced with the name of the attribute. Headers added to the request by + // previous filters in the chain can be accessed in the CEL expression using + // the `headers` variable. The `headers` variable defines a map of key/value + // pairs corresponding to the HTTP headers added by previous mediation steps + // and not the headers present on the original incoming request. For example, + // the following CEL expression can be used to construct a Headers-only HTTP + // request by adding an additional header to the headers added by previous + // mediations in the Pipeline: ``` {"headers": headers.merge({"new-header-key": + // "new-header-value"})} ``` Additionally, the following CEL extension + // functions are provided for use in this CEL expression: - toBase64Url: + // map.toBase64Url() -> string - Converts a CelValue to a base64url encoded + // string - toJsonString: map.toJsonString() -> string - Converts a CelValue to + // a JSON string - merge: map1.merge(map2) -> map3 - Merges the passed CEL map + // with the existing CEL map the function is applied to. - If the same key + // exists in both maps, if the key's value is type map both maps are merged + // else the value from the passed map is used. - toMap: list(map).toMap() -> + // map - Converts a CEL list of CEL maps to a single CEL map - + // toDestinationPayloadFormat(): message.data.toDestinationPayloadFormat() -> + // string or bytes - Converts the message data to the destination payload + // format specified in Pipeline.Destination.output_payload_format - This + // function is meant to be applied to the message.data field. - If the + // destination payload format is not set, the function will return the message + // data unchanged. - toCloudEventJsonWithPayloadFormat: + // message.toCloudEventJsonWithPayloadFormat() -> map - Converts a message to + // the corresponding structure of JSON format for CloudEvents - This function + // applies toDestinationPayloadFormat() to the message data. It also sets the + // corresponding datacontenttype of the CloudEvent, as indicated by + // Pipeline.Destination.output_payload_format. If no output_payload_format is + // set it will use the existing datacontenttype on the CloudEvent if present, + // else leave datacontenttype absent. - This function expects that the content + // of the message will adhere to the standard CloudEvent format. If it + // doesn’t then this function will fail. - The result is a CEL map that + // corresponds to the JSON representation of the CloudEvent. To convert that + // data to a JSON string it can be chained with the toJsonString function. If a + // binding is not specified here, by default the message is treated as a + // CloudEvent and is mapped to the HTTP request according to the CloudEvent + // HTTP Protocol Binding Binary Content Mode. The Pipeline converts the data + // field of the message to the format provided in + // Pipeline.Destination.output_payload_format and maps it to the body field of + // the result. It also sets the corresponding Content-Type header to the + // output_payload_format type. If the + // Pipeline.Destination.output_payload_format is not set, then the Pipeline + // will treat the data field of the message as opaque binary data and attach it + // to the request body as bytes. In this case the Content-type header will be + // set to the value of the datacontenttype attribute set on the incoming + // CloudEvent message if present and the `application/octet-stream` MIME type + // otherwise. The Pipeline expects that the content of the message will adhere + // to the standard CloudEvent format. If it doesn’t then the outgoing message + // request may fail with a persistent error. + MessageBindingTemplate string `json:"messageBindingTemplate,omitempty"` + // Uri: Required. The URI of the HTTP enpdoint. The value must be a RFC2396 URI + // string. Examples: `http://10.10.10.8:80/route`, + // `http://svc.us-central1.p.local:8080/`. Only HTTP and HTTPS protocols are + // supported. The host can be either a static IP addressable from the VPC + // specified by the network config, or an internal DNS hostname of the service + // resolvable via Cloud DNS. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "MessageBindingTemplate") 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. "MessageBindingTemplate") 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 GoogleCloudEventarcV1PipelineDestinationHttpEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudEventarcV1PipelineDestinationHttpEndpoint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudEventarcV1PipelineDestinationNetworkConfig: Represents a network +// config to be used for destination resolution and connectivity. +type GoogleCloudEventarcV1PipelineDestinationNetworkConfig struct { + // NetworkAttachment: Required. Name of the NetworkAttachment that allows + // access to the consumer VPC. Format: + // `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMEN + // T_NAME}` + NetworkAttachment string `json:"networkAttachment,omitempty"` + // ForceSendFields is a list of field names (e.g. "NetworkAttachment") 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. "NetworkAttachment") 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 GoogleCloudEventarcV1PipelineDestinationNetworkConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudEventarcV1PipelineDestinationNetworkConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudEventarcV1PipelineMediation: Mediation defines different ways to +// modify the Pipeline. +type GoogleCloudEventarcV1PipelineMediation struct { + // Transformation: Optional. How the Pipeline is to transform messages + Transformation *GoogleCloudEventarcV1PipelineMediationTransformation `json:"transformation,omitempty"` + // ForceSendFields is a list of field names (e.g. "Transformation") 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. "Transformation") 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 GoogleCloudEventarcV1PipelineMediation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudEventarcV1PipelineMediation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudEventarcV1PipelineMediationTransformation: Transformation defines +// the way to transform an incoming message. +type GoogleCloudEventarcV1PipelineMediationTransformation struct { + // TransformationTemplate: Optional. The template to apply to transform + // messages. + TransformationTemplate string `json:"transformationTemplate,omitempty"` + // ForceSendFields is a list of field names (e.g. "TransformationTemplate") 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. "TransformationTemplate") 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 GoogleCloudEventarcV1PipelineMediationTransformation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudEventarcV1PipelineMediationTransformation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudEventarcV1PipelineMessagePayloadFormat: Represents the format of +// message data. +type GoogleCloudEventarcV1PipelineMessagePayloadFormat struct { + // Avro: Optional. Avro format. + Avro *GoogleCloudEventarcV1PipelineMessagePayloadFormatAvroFormat `json:"avro,omitempty"` + // Json: Optional. JSON format. + Json *GoogleCloudEventarcV1PipelineMessagePayloadFormatJsonFormat `json:"json,omitempty"` + // Protobuf: Optional. Protobuf format. + Protobuf *GoogleCloudEventarcV1PipelineMessagePayloadFormatProtobufFormat `json:"protobuf,omitempty"` + // ForceSendFields is a list of field names (e.g. "Avro") 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. "Avro") 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 GoogleCloudEventarcV1PipelineMessagePayloadFormat) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudEventarcV1PipelineMessagePayloadFormat + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudEventarcV1PipelineMessagePayloadFormatAvroFormat: The format of +// an AVRO message payload. +type GoogleCloudEventarcV1PipelineMessagePayloadFormatAvroFormat struct { + // SchemaDefinition: Optional. The entire schema definition is stored in this + // field. + SchemaDefinition string `json:"schemaDefinition,omitempty"` + // ForceSendFields is a list of field names (e.g. "SchemaDefinition") 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. "SchemaDefinition") 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 GoogleCloudEventarcV1PipelineMessagePayloadFormatAvroFormat) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudEventarcV1PipelineMessagePayloadFormatAvroFormat + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudEventarcV1PipelineMessagePayloadFormatJsonFormat: The format of a +// JSON message payload. +type GoogleCloudEventarcV1PipelineMessagePayloadFormatJsonFormat struct { +} + +// GoogleCloudEventarcV1PipelineMessagePayloadFormatProtobufFormat: The format +// of a Protobuf message payload. +type GoogleCloudEventarcV1PipelineMessagePayloadFormatProtobufFormat struct { + // SchemaDefinition: Optional. The entire schema definition is stored in this + // field. + SchemaDefinition string `json:"schemaDefinition,omitempty"` + // ForceSendFields is a list of field names (e.g. "SchemaDefinition") 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. "SchemaDefinition") 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 GoogleCloudEventarcV1PipelineMessagePayloadFormatProtobufFormat) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudEventarcV1PipelineMessagePayloadFormatProtobufFormat + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudEventarcV1PipelineRetryPolicy: The retry policy configuration for +// the Pipeline. The pipeline exponentially backs off in case the destination +// is non responsive or returns a retryable error code. The default semantics +// are as follows: The backoff starts with a 5 second delay and doubles the +// delay after each failed attempt (10 seconds, 20 seconds, 40 seconds, etc.). +// The delay is capped at 60 seconds by default. Please note that if you set +// the min_retry_delay and max_retry_delay fields to the same value this will +// make the duration between retries constant. +type GoogleCloudEventarcV1PipelineRetryPolicy struct { + // MaxAttempts: Optional. The maximum number of delivery attempts for any + // message. The value must be between 1 and 100. The default value for this + // field is 5. + MaxAttempts int64 `json:"maxAttempts,omitempty"` + // MaxRetryDelay: Optional. The maximum amount of seconds to wait between retry + // attempts. The value must be between 0 and 600. The default value for this + // field is 60. + MaxRetryDelay string `json:"maxRetryDelay,omitempty"` + // MinRetryDelay: Optional. The minimum amount of seconds to wait between retry + // attempts. The value must be between 0 and 600. The default value for this + // field is 5. + MinRetryDelay string `json:"minRetryDelay,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxAttempts") 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. "MaxAttempts") 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 GoogleCloudEventarcV1PipelineRetryPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudEventarcV1PipelineRetryPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleLongrunningCancelOperationRequest: The request message for // Operations.CancelOperation. type GoogleLongrunningCancelOperationRequest struct { @@ -1089,14 +1648,78 @@ func (s ListChannelsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListLocationsResponse: The response message for Locations.ListLocations. -type ListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in the - // request. - Locations []*Location `json:"locations,omitempty"` - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` - +// ListEnrollmentsResponse: The response message for the `ListEnrollments` +// method. +type ListEnrollmentsResponse struct { + // Enrollments: The requested Enrollments, up to the number specified in + // `page_size`. + Enrollments []*Enrollment `json:"enrollments,omitempty"` + // NextPageToken: A page token that can be sent to `ListEnrollments` to request + // the next page. If this is empty, then there are no more pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Unreachable resources, if any. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Enrollments") 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. "Enrollments") 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 ListEnrollmentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListEnrollmentsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListGoogleApiSourcesResponse: The response message for the +// `ListGoogleApiSources` method. +type ListGoogleApiSourcesResponse struct { + // GoogleApiSources: The requested GoogleApiSources, up to the number specified + // in `page_size`. + GoogleApiSources []*GoogleApiSource `json:"googleApiSources,omitempty"` + // NextPageToken: A page token that can be sent to `ListMessageBusEnrollments` + // to request the next page. If this is empty, then there are no more pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Unreachable resources, if any. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "GoogleApiSources") 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. "GoogleApiSources") 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 ListGoogleApiSourcesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListGoogleApiSourcesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in the + // request. + Locations []*Location `json:"locations,omitempty"` + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Locations") to @@ -1117,6 +1740,101 @@ func (s ListLocationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListMessageBusEnrollmentsResponse: The response message for the +// `ListMessageBusEnrollments` method.` +type ListMessageBusEnrollmentsResponse struct { + // Enrollments: The requested enrollments, up to the number specified in + // `page_size`. + Enrollments []string `json:"enrollments,omitempty"` + // NextPageToken: A page token that can be sent to `ListMessageBusEnrollments` + // to request the next page. If this is empty, then there are no more pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Unreachable resources, if any. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Enrollments") 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. "Enrollments") 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 ListMessageBusEnrollmentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMessageBusEnrollmentsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListMessageBusesResponse: The response message for the `ListMessageBuses` +// method. +type ListMessageBusesResponse struct { + // MessageBuses: The requested message buses, up to the number specified in + // `page_size`. + MessageBuses []*MessageBus `json:"messageBuses,omitempty"` + // NextPageToken: A page token that can be sent to `ListMessageBuses` to + // request the next page. If this is empty, then there are no more pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Unreachable resources, if any. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "MessageBuses") 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. "MessageBuses") 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 ListMessageBusesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMessageBusesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListPipelinesResponse: The response message for the ListPipelines method. +type ListPipelinesResponse struct { + // NextPageToken: A page token that can be sent to `ListPipelines` to request + // the next page. If this is empty, then there are no more pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Pipelines: The requested pipelines, up to the number specified in + // `page_size`. + Pipelines []*Pipeline `json:"pipelines,omitempty"` + // Unreachable: Unreachable resources, if any. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. 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. "NextPageToken") 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 ListPipelinesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPipelinesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListProvidersResponse: The response message for the `ListProviders` method. type ListProvidersResponse struct { // NextPageToken: A page token that can be sent to `ListProviders` to request @@ -1216,6 +1934,102 @@ 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) +} + +// MessageBus: MessageBus for the messages flowing through the system. The +// admin has visibility and control over the messages being published and +// consumed and can restrict publishers and subscribers to only a subset of +// data available in the system by defining authorization policies. +type MessageBus struct { + // Annotations: Optional. Resource annotations. + Annotations map[string]string `json:"annotations,omitempty"` + // CreateTime: Output only. The creation time. + CreateTime string `json:"createTime,omitempty"` + // CryptoKeyName: Optional. Resource name of a KMS crypto key (managed by the + // user) used to encrypt/decrypt their event data. It must match the pattern + // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + CryptoKeyName string `json:"cryptoKeyName,omitempty"` + // DisplayName: Optional. Resource display name. + DisplayName string `json:"displayName,omitempty"` + // Etag: Output only. This checksum is computed by the server based on the + // value of other fields, and might be sent only on update and delete requests + // to ensure that the client has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + // Labels: Optional. Resource labels. + Labels map[string]string `json:"labels,omitempty"` + // LoggingConfig: Optional. Config to control Platform logging for the Message + // Bus. This log configuration is applied to the Message Bus itself, and all + // the Enrollments attached to it. + LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"` + // Name: Identifier. Resource name of the form + // projects/{project}/locations/{location}/messageBuses/{message_bus} + Name string `json:"name,omitempty"` + // Uid: Output only. Server assigned unique identifier for the channel. The + // value is a UUID4 string and guaranteed to remain unchanged until the + // resource is deleted. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. The last-modified time. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. 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. "Annotations") 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 MessageBus) MarshalJSON() ([]byte, error) { + type NoMethod MessageBus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // NetworkConfig: Network Configuration that can be inherited by other protos. type NetworkConfig struct { // NetworkAttachment: Required. Name of the NetworkAttachment that allows @@ -1279,6 +2093,84 @@ func (s OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Pipeline: A representation of the Pipeline resource. +type Pipeline struct { + // Annotations: Optional. User-defined annotations. See + // https://google.aip.dev/128#annotations. + Annotations map[string]string `json:"annotations,omitempty"` + // CreateTime: Output only. The creation time. A timestamp in RFC3339 UTC + // "Zulu" format, with nanosecond resolution and up to nine fractional digits. + // Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". + CreateTime string `json:"createTime,omitempty"` + // CryptoKeyName: Optional. Resource name of a KMS crypto key (managed by the + // user) used to encrypt/decrypt the event data. If not set, an internal + // Google-owned key will be used to encrypt messages. It must match the pattern + // "projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}" + // . + CryptoKeyName string `json:"cryptoKeyName,omitempty"` + // Destinations: Required. List of destinations to which messages will be + // forwarded. Currently, exactly one destination is supported per Pipeline. + Destinations []*GoogleCloudEventarcV1PipelineDestination `json:"destinations,omitempty"` + // DisplayName: Optional. Display name of resource. + DisplayName string `json:"displayName,omitempty"` + // Etag: Output only. This checksum is computed by the server based on the + // value of other fields, and might be sent only on create requests to ensure + // that the client has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + // InputPayloadFormat: Optional. The payload format expected for the messages + // received by the Pipeline. If input_payload_format is set then any messages + // not matching this format will be treated as persistent errors. If + // input_payload_format is not set, then the message data will be treated as an + // opaque binary and no output format can be set on the Pipeline through the + // Pipeline.Destination.output_payload_format field. Any Mediations on the + // Pipeline that involve access to the data field will fail as persistent + // errors. + InputPayloadFormat *GoogleCloudEventarcV1PipelineMessagePayloadFormat `json:"inputPayloadFormat,omitempty"` + // Labels: Optional. User labels attached to the Pipeline that can be used to + // group resources. An object containing a list of "key": value pairs. Example: + // { "name": "wrench", "mass": "1.3kg", "count": "3" }. + Labels map[string]string `json:"labels,omitempty"` + // LoggingConfig: Optional. Config to control Platform Logging for Pipelines. + LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"` + // Mediations: Optional. List of mediation operations to be performed on the + // message. Currently, only one Transformation operation is allowed in each + // Pipeline. + Mediations []*GoogleCloudEventarcV1PipelineMediation `json:"mediations,omitempty"` + // Name: Identifier. The resource name of the Pipeline. Must be unique within + // the location of the project and must be in + // `projects/{project}/locations/{location}/pipelines/{pipeline}` format. + Name string `json:"name,omitempty"` + // RetryPolicy: Optional. The retry policy to use in the pipeline. + RetryPolicy *GoogleCloudEventarcV1PipelineRetryPolicy `json:"retryPolicy,omitempty"` + // Uid: Output only. Server-assigned unique identifier for the Pipeline. The + // value is a UUID4 string and guaranteed to remain unchanged until the + // resource is deleted. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. The last-modified time. A timestamp in RFC3339 UTC + // "Zulu" format, with nanosecond resolution and up to nine fractional digits. + // Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. 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. "Annotations") 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 Pipeline) MarshalJSON() ([]byte, error) { + type NoMethod Pipeline + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Policy: An Identity and Access Management (IAM) policy, which specifies // access controls for Google Cloud resources. A `Policy` is a collection of // `bindings`. A `binding` binds one or more `members`, or principals, to a @@ -3938,102 +4830,92 @@ func (c *ProjectsLocationsChannelsTestIamPermissionsCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsEnrollmentsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEnrollmentsCreateCall struct { + s *Service + parent string + enrollment *Enrollment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// Create: Create a new Enrollment in a particular project and location. // -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsEnrollmentsService) GetIamPolicy(resource string) *ProjectsLocationsEnrollmentsGetIamPolicyCall { - c := &ProjectsLocationsEnrollmentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The parent collection in which to add this enrollment. +func (r *ProjectsLocationsEnrollmentsService) Create(parent string, enrollment *Enrollment) *ProjectsLocationsEnrollmentsCreateCall { + c := &ProjectsLocationsEnrollmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.enrollment = enrollment 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)) +// EnrollmentId sets the optional parameter "enrollmentId": Required. The +// user-provided ID to be assigned to the Enrollment. It should match the +// format (^a-z ([a-z0-9-]{0,61}[a-z0-9])?$). +func (c *ProjectsLocationsEnrollmentsCreateCall) EnrollmentId(enrollmentId string) *ProjectsLocationsEnrollmentsCreateCall { + c.urlParams_.Set("enrollmentId", enrollmentId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validate +// the request and preview the review, but do not post it. +func (c *ProjectsLocationsEnrollmentsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEnrollmentsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEnrollmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnrollmentsGetIamPolicyCall { +func (c *ProjectsLocationsEnrollmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnrollmentsCreateCall { 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 *ProjectsLocationsEnrollmentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEnrollmentsGetIamPolicyCall { +func (c *ProjectsLocationsEnrollmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsEnrollmentsCreateCall { 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 *ProjectsLocationsEnrollmentsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEnrollmentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -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_) - } +func (c *ProjectsLocationsEnrollmentsCreateCall) 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.enrollment) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/enrollments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.enrollments.getIamPolicy" call. +// Do executes the "eventarc.projects.locations.enrollments.create" 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 *ProjectsLocationsEnrollmentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *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 *ProjectsLocationsEnrollmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4052,7 +4934,7 @@ func (c *ProjectsLocationsEnrollmentsGetIamPolicyCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4065,80 +4947,93 @@ func (c *ProjectsLocationsEnrollmentsGetIamPolicyCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsEnrollmentsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEnrollmentsDeleteCall struct { + s *Service + name string + 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. +// Delete: Delete a single Enrollment. // -// - 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 +// - name: The name of the Enrollment to be deleted. +func (r *ProjectsLocationsEnrollmentsService) Delete(name string) *ProjectsLocationsEnrollmentsDeleteCall { + c := &ProjectsLocationsEnrollmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the Enrollment is not found, the request will succeed but no action will be +// taken on the server. +func (c *ProjectsLocationsEnrollmentsDeleteCall) AllowMissing(allowMissing bool) *ProjectsLocationsEnrollmentsDeleteCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// Etag sets the optional parameter "etag": If provided, the Enrollment will +// only be deleted if the etag matches the current etag on the resource. +func (c *ProjectsLocationsEnrollmentsDeleteCall) Etag(etag string) *ProjectsLocationsEnrollmentsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validate +// the request and preview the review, but do not post it. +func (c *ProjectsLocationsEnrollmentsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEnrollmentsDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEnrollmentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnrollmentsSetIamPolicyCall { +func (c *ProjectsLocationsEnrollmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnrollmentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEnrollmentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEnrollmentsSetIamPolicyCall { +func (c *ProjectsLocationsEnrollmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEnrollmentsDeleteCall { 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 *ProjectsLocationsEnrollmentsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEnrollmentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEnrollmentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsEnrollmentsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", 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 := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.enrollments.setIamPolicy" call. +// Do executes the "eventarc.projects.locations.enrollments.delete" 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 *ProjectsLocationsEnrollmentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *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 *ProjectsLocationsEnrollmentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4157,7 +5052,7 @@ func (c *ProjectsLocationsEnrollmentsSetIamPolicyCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4170,84 +5065,82 @@ func (c *ProjectsLocationsEnrollmentsSetIamPolicyCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsEnrollmentsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEnrollmentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +// Get: Get a single Enrollment. // -// - 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 +// - name: The name of the Enrollment to get. +func (r *ProjectsLocationsEnrollmentsService) Get(name string) *ProjectsLocationsEnrollmentsGetCall { + c := &ProjectsLocationsEnrollmentsGetCall{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 *ProjectsLocationsEnrollmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnrollmentsTestIamPermissionsCall { +func (c *ProjectsLocationsEnrollmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnrollmentsGetCall { 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 *ProjectsLocationsEnrollmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEnrollmentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEnrollmentsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEnrollmentsTestIamPermissionsCall { +func (c *ProjectsLocationsEnrollmentsGetCall) Context(ctx context.Context) *ProjectsLocationsEnrollmentsGetCall { 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 *ProjectsLocationsEnrollmentsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsEnrollmentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -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 +func (c *ProjectsLocationsEnrollmentsGetCall) 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}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.enrollments.testIamPermissions" call. +// Do executes the "eventarc.projects.locations.enrollments.get" 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 *ProjectsLocationsEnrollmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +// *Enrollment.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 *ProjectsLocationsEnrollmentsGetCall) Do(opts ...googleapi.CallOption) (*Enrollment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4266,7 +5159,7 @@ func (c *ProjectsLocationsEnrollmentsTestIamPermissionsCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &Enrollment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4279,7 +5172,7 @@ func (c *ProjectsLocationsEnrollmentsTestIamPermissionsCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsGoogleApiSourcesGetIamPolicyCall struct { +type ProjectsLocationsEnrollmentsGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -4294,8 +5187,8 @@ type ProjectsLocationsGoogleApiSourcesGetIamPolicyCall struct { // - 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)} +func (r *ProjectsLocationsEnrollmentsService) GetIamPolicy(resource string) *ProjectsLocationsEnrollmentsGetIamPolicyCall { + c := &ProjectsLocationsEnrollmentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -4312,7 +5205,7 @@ func (r *ProjectsLocationsGoogleApiSourcesService) GetIamPolicy(resource string) // 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 { +func (c *ProjectsLocationsEnrollmentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEnrollmentsGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -4320,7 +5213,7 @@ func (c *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall) OptionsRequestedPoli // 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 { +func (c *ProjectsLocationsEnrollmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnrollmentsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4328,27 +5221,27 @@ func (c *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall) Fields(s ...googleap // 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 { +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 *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall { +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 *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEnrollmentsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +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_) @@ -4369,12 +5262,12 @@ func (c *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.googleApiSources.getIamPolicy" call. +// Do executes the "eventarc.projects.locations.enrollments.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) { +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 { @@ -4406,80 +5299,116 @@ func (c *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsGoogleApiSourcesSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEnrollmentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, -// and `PERMISSION_DENIED` errors. +// List: List Enrollments. // -// - 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 +// - parent: The parent collection to list triggers on. +func (r *ProjectsLocationsEnrollmentsService) List(parent string) *ProjectsLocationsEnrollmentsListCall { + c := &ProjectsLocationsEnrollmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter field that the list +// request will filter on. Possible filtersare described in +// https://google.aip.dev/160. +func (c *ProjectsLocationsEnrollmentsListCall) Filter(filter string) *ProjectsLocationsEnrollmentsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": The sorting order of the +// resources returned. Value should be a comma-separated list of fields. The +// default sorting order is ascending. To specify descending order for a field, +// append a `desc` suffix; for example: `name desc, update_time`. +func (c *ProjectsLocationsEnrollmentsListCall) OrderBy(orderBy string) *ProjectsLocationsEnrollmentsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return on each page. Note: The service may send fewer. +func (c *ProjectsLocationsEnrollmentsListCall) PageSize(pageSize int64) *ProjectsLocationsEnrollmentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token; provide +// the value from the `next_page_token` field in a previous call to retrieve +// the subsequent page. When paginating, all other parameters provided must +// match the previous call that provided the page token. +func (c *ProjectsLocationsEnrollmentsListCall) PageToken(pageToken string) *ProjectsLocationsEnrollmentsListCall { + 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 *ProjectsLocationsGoogleApiSourcesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGoogleApiSourcesSetIamPolicyCall { +func (c *ProjectsLocationsEnrollmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnrollmentsListCall { 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 *ProjectsLocationsEnrollmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEnrollmentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGoogleApiSourcesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGoogleApiSourcesSetIamPolicyCall { +func (c *ProjectsLocationsEnrollmentsListCall) Context(ctx context.Context) *ProjectsLocationsEnrollmentsListCall { 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 { +func (c *ProjectsLocationsEnrollmentsListCall) 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 +func (c *ProjectsLocationsEnrollmentsListCall) 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}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/enrollments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.googleApiSources.setIamPolicy" call. +// Do executes the "eventarc.projects.locations.enrollments.list" 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) { +// *ListEnrollmentsResponse.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 *ProjectsLocationsEnrollmentsListCall) Do(opts ...googleapi.CallOption) (*ListEnrollmentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4498,7 +5427,7 @@ func (c *ProjectsLocationsGoogleApiSourcesSetIamPolicyCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &ListEnrollmentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4511,84 +5440,123 @@ func (c *ProjectsLocationsGoogleApiSourcesSetIamPolicyCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsEnrollmentsListCall) Pages(ctx context.Context, f func(*ListEnrollmentsResponse) 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) + } } -// 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. +type ProjectsLocationsEnrollmentsPatchCall struct { + s *Service + name string + enrollment *Enrollment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update a single Enrollment. // -// - 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 +// - name: Identifier. Resource name of the form +// projects/{project}/locations/{location}/enrollments/{enrollment}. +func (r *ProjectsLocationsEnrollmentsService) Patch(name string, enrollment *Enrollment) *ProjectsLocationsEnrollmentsPatchCall { + c := &ProjectsLocationsEnrollmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.enrollment = enrollment + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the Enrollment is not found, a new Enrollment will be created. In this +// situation, `update_mask` is ignored. +func (c *ProjectsLocationsEnrollmentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsEnrollmentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": The fields to be +// updated; only fields explicitly provided are updated. If no field mask is +// provided, all provided fields in the request are updated. To update all +// fields, provide a field mask of "*". +func (c *ProjectsLocationsEnrollmentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEnrollmentsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validate +// the request and preview the review, but do not post it. +func (c *ProjectsLocationsEnrollmentsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEnrollmentsPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall { +func (c *ProjectsLocationsEnrollmentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnrollmentsPatchCall { 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 { +func (c *ProjectsLocationsEnrollmentsPatchCall) Context(ctx context.Context) *ProjectsLocationsEnrollmentsPatchCall { 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 { +func (c *ProjectsLocationsEnrollmentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEnrollmentsPatchCall) 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) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.enrollment) 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 := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.googleApiSources.testIamPermissions" call. +// Do executes the "eventarc.projects.locations.enrollments.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsEnrollmentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4607,7 +5575,7 @@ func (c *ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4620,86 +5588,64 @@ func (c *ProjectsLocationsGoogleApiSourcesTestIamPermissionsCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsMessageBusesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEnrollmentsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, +// and `PERMISSION_DENIED` errors. // -// - resource: REQUIRED: The resource for which the policy is being requested. +// - 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) GetIamPolicy(resource string) *ProjectsLocationsMessageBusesGetIamPolicyCall { - c := &ProjectsLocationsMessageBusesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEnrollmentsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEnrollmentsSetIamPolicyCall { + c := &ProjectsLocationsEnrollmentsSetIamPolicyCall{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)) + 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 *ProjectsLocationsMessageBusesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMessageBusesGetIamPolicyCall { +func (c *ProjectsLocationsEnrollmentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnrollmentsSetIamPolicyCall { 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 { +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 *ProjectsLocationsMessageBusesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEnrollmentsSetIamPolicyCall) 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_) - } +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/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -4710,12 +5656,12 @@ func (c *ProjectsLocationsMessageBusesGetIamPolicyCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.messageBuses.getIamPolicy" call. +// Do executes the "eventarc.projects.locations.enrollments.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 *ProjectsLocationsMessageBusesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 { @@ -4747,62 +5693,65 @@ func (c *ProjectsLocationsMessageBusesGetIamPolicyCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsMessageBusesSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEnrollmentsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + 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. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. // -// - resource: REQUIRED: The resource for which the policy is being 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)} +// - 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.setiampolicyrequest = setiampolicyrequest + 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 *ProjectsLocationsMessageBusesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMessageBusesSetIamPolicyCall { +func (c *ProjectsLocationsEnrollmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnrollmentsTestIamPermissionsCall { 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 { +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 *ProjectsLocationsMessageBusesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEnrollmentsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMessageBusesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +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.setiampolicyrequest) + 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}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -4815,12 +5764,13 @@ func (c *ProjectsLocationsMessageBusesSetIamPolicyCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.messageBuses.setIamPolicy" call. +// Do executes the "eventarc.projects.locations.enrollments.testIamPermissions" 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) { +// *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 *ProjectsLocationsEnrollmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4839,7 +5789,7 @@ func (c *ProjectsLocationsMessageBusesSetIamPolicyCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4852,65 +5802,73 @@ func (c *ProjectsLocationsMessageBusesSetIamPolicyCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsMessageBusesTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGoogleApiSourcesCreateCall struct { + s *Service + parent string + googleapisource *GoogleApiSource + 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. +// Create: Create a new GoogleApiSource in a particular project and location. // -// - 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 +// - parent: The parent collection in which to add this google api source. +func (r *ProjectsLocationsGoogleApiSourcesService) Create(parent string, googleapisource *GoogleApiSource) *ProjectsLocationsGoogleApiSourcesCreateCall { + c := &ProjectsLocationsGoogleApiSourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleapisource = googleapisource + return c +} + +// GoogleApiSourceId sets the optional parameter "googleApiSourceId": Required. +// The user-provided ID to be assigned to the GoogleApiSource. It should match +// the format (^a-z ([a-z0-9-]{0,61}[a-z0-9])?$). +func (c *ProjectsLocationsGoogleApiSourcesCreateCall) GoogleApiSourceId(googleApiSourceId string) *ProjectsLocationsGoogleApiSourcesCreateCall { + c.urlParams_.Set("googleApiSourceId", googleApiSourceId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validate +// the request and preview the review, but do not post it. +func (c *ProjectsLocationsGoogleApiSourcesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsGoogleApiSourcesCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMessageBusesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMessageBusesTestIamPermissionsCall { +func (c *ProjectsLocationsGoogleApiSourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGoogleApiSourcesCreateCall { 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 { +func (c *ProjectsLocationsGoogleApiSourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsGoogleApiSourcesCreateCall { 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 { +func (c *ProjectsLocationsGoogleApiSourcesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMessageBusesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGoogleApiSourcesCreateCall) 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) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapisource) 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 := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/googleApiSources") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -4918,18 +5876,1992 @@ func (c *ProjectsLocationsMessageBusesTestIamPermissionsCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.messageBuses.testIamPermissions" call. +// Do executes the "eventarc.projects.locations.googleApiSources.create" call. // Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsMessageBusesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsGoogleApiSourcesCreateCall) 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 ProjectsLocationsGoogleApiSourcesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete a single GoogleApiSource. +// +// - name: The name of the GoogleApiSource to be deleted. +func (r *ProjectsLocationsGoogleApiSourcesService) Delete(name string) *ProjectsLocationsGoogleApiSourcesDeleteCall { + c := &ProjectsLocationsGoogleApiSourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the MessageBus is not found, the request will succeed but no action will be +// taken on the server. +func (c *ProjectsLocationsGoogleApiSourcesDeleteCall) AllowMissing(allowMissing bool) *ProjectsLocationsGoogleApiSourcesDeleteCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// Etag sets the optional parameter "etag": If provided, the MessageBus will +// only be deleted if the etag matches the current etag on the resource. +func (c *ProjectsLocationsGoogleApiSourcesDeleteCall) Etag(etag string) *ProjectsLocationsGoogleApiSourcesDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validate +// the request and preview the review, but do not post it. +func (c *ProjectsLocationsGoogleApiSourcesDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsGoogleApiSourcesDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGoogleApiSourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGoogleApiSourcesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGoogleApiSourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGoogleApiSourcesDeleteCall { + 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 *ProjectsLocationsGoogleApiSourcesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGoogleApiSourcesDeleteCall) 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.googleApiSources.delete" 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 *ProjectsLocationsGoogleApiSourcesDeleteCall) 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 ProjectsLocationsGoogleApiSourcesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get a single GoogleApiSource. +// +// - name: The name of the google api source to get. +func (r *ProjectsLocationsGoogleApiSourcesService) Get(name string) *ProjectsLocationsGoogleApiSourcesGetCall { + c := &ProjectsLocationsGoogleApiSourcesGetCall{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 *ProjectsLocationsGoogleApiSourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGoogleApiSourcesGetCall { + 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 *ProjectsLocationsGoogleApiSourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGoogleApiSourcesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGoogleApiSourcesGetCall) Context(ctx context.Context) *ProjectsLocationsGoogleApiSourcesGetCall { + 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 *ProjectsLocationsGoogleApiSourcesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGoogleApiSourcesGetCall) 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.googleApiSources.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleApiSource.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 *ProjectsLocationsGoogleApiSourcesGetCall) Do(opts ...googleapi.CallOption) (*GoogleApiSource, 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 := &GoogleApiSource{ + 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 ProjectsLocationsGoogleApiSourcesGetIamPolicyCall 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 *ProjectsLocationsGoogleApiSourcesService) GetIamPolicy(resource string) *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall { + c := &ProjectsLocationsGoogleApiSourcesGetIamPolicyCall{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 *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGoogleApiSourcesGetIamPolicyCall { + 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 *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 ProjectsLocationsGoogleApiSourcesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List GoogleApiSources. +// +// - parent: The parent collection to list GoogleApiSources on. +func (r *ProjectsLocationsGoogleApiSourcesService) List(parent string) *ProjectsLocationsGoogleApiSourcesListCall { + c := &ProjectsLocationsGoogleApiSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter field that the list +// request will filter on. Possible filtersare described in +// https://google.aip.dev/160. +func (c *ProjectsLocationsGoogleApiSourcesListCall) Filter(filter string) *ProjectsLocationsGoogleApiSourcesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": The sorting order of the +// resources returned. Value should be a comma-separated list of fields. The +// default sorting order is ascending. To specify descending order for a field, +// append a `desc` suffix; for example: `name desc, update_time`. +func (c *ProjectsLocationsGoogleApiSourcesListCall) OrderBy(orderBy string) *ProjectsLocationsGoogleApiSourcesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return on each page. Note: The service may send fewer. +func (c *ProjectsLocationsGoogleApiSourcesListCall) PageSize(pageSize int64) *ProjectsLocationsGoogleApiSourcesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token; provide +// the value from the `next_page_token` field in a previous call to retrieve +// the subsequent page. When paginating, all other parameters provided must +// match the previous call that provided the page token. +func (c *ProjectsLocationsGoogleApiSourcesListCall) PageToken(pageToken string) *ProjectsLocationsGoogleApiSourcesListCall { + 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 *ProjectsLocationsGoogleApiSourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGoogleApiSourcesListCall { + 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 *ProjectsLocationsGoogleApiSourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGoogleApiSourcesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGoogleApiSourcesListCall) Context(ctx context.Context) *ProjectsLocationsGoogleApiSourcesListCall { + 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 *ProjectsLocationsGoogleApiSourcesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGoogleApiSourcesListCall) 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/{+parent}/googleApiSources") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "eventarc.projects.locations.googleApiSources.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListGoogleApiSourcesResponse.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 *ProjectsLocationsGoogleApiSourcesListCall) Do(opts ...googleapi.CallOption) (*ListGoogleApiSourcesResponse, 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 := &ListGoogleApiSourcesResponse{ + 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 *ProjectsLocationsGoogleApiSourcesListCall) Pages(ctx context.Context, f func(*ListGoogleApiSourcesResponse) 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 ProjectsLocationsGoogleApiSourcesPatchCall struct { + s *Service + name string + googleapisource *GoogleApiSource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update a single GoogleApiSource. +// +// - name: Identifier. Resource name of the form +// projects/{project}/locations/{location}/googleApiSources/{google_api_source +// }. +func (r *ProjectsLocationsGoogleApiSourcesService) Patch(name string, googleapisource *GoogleApiSource) *ProjectsLocationsGoogleApiSourcesPatchCall { + c := &ProjectsLocationsGoogleApiSourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleapisource = googleapisource + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the GoogleApiSource is not found, a new GoogleApiSource will be created. In +// this situation, `update_mask` is ignored. +func (c *ProjectsLocationsGoogleApiSourcesPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsGoogleApiSourcesPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": The fields to be +// updated; only fields explicitly provided are updated. If no field mask is +// provided, all provided fields in the request are updated. To update all +// fields, provide a field mask of "*". +func (c *ProjectsLocationsGoogleApiSourcesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGoogleApiSourcesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validate +// the request and preview the review, but do not post it. +func (c *ProjectsLocationsGoogleApiSourcesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsGoogleApiSourcesPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGoogleApiSourcesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGoogleApiSourcesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGoogleApiSourcesPatchCall) Context(ctx context.Context) *ProjectsLocationsGoogleApiSourcesPatchCall { + 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 *ProjectsLocationsGoogleApiSourcesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGoogleApiSourcesPatchCall) 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.googleapisource) + 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 += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "eventarc.projects.locations.googleApiSources.patch" 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 *ProjectsLocationsGoogleApiSourcesPatchCall) 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 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 ProjectsLocationsMessageBusesCreateCall struct { + s *Service + parent string + messagebus *MessageBus + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a new MessageBus in a particular project and location. +// +// - parent: The parent collection in which to add this message bus. +func (r *ProjectsLocationsMessageBusesService) Create(parent string, messagebus *MessageBus) *ProjectsLocationsMessageBusesCreateCall { + c := &ProjectsLocationsMessageBusesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.messagebus = messagebus + return c +} + +// MessageBusId sets the optional parameter "messageBusId": Required. The +// user-provided ID to be assigned to the MessageBus. It should match the +// format (^a-z ([a-z0-9-]{0,61}[a-z0-9])?$) +func (c *ProjectsLocationsMessageBusesCreateCall) MessageBusId(messageBusId string) *ProjectsLocationsMessageBusesCreateCall { + c.urlParams_.Set("messageBusId", messageBusId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validate +// the request and preview the review, but do not post it. +func (c *ProjectsLocationsMessageBusesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsMessageBusesCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsMessageBusesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMessageBusesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMessageBusesCreateCall) Context(ctx context.Context) *ProjectsLocationsMessageBusesCreateCall { + 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 *ProjectsLocationsMessageBusesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMessageBusesCreateCall) 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.messagebus) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/messageBuses") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "eventarc.projects.locations.messageBuses.create" 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 *ProjectsLocationsMessageBusesCreateCall) 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 ProjectsLocationsMessageBusesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete a single message bus. +// +// - name: The name of the MessageBus to be deleted. +func (r *ProjectsLocationsMessageBusesService) Delete(name string) *ProjectsLocationsMessageBusesDeleteCall { + c := &ProjectsLocationsMessageBusesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the MessageBus is not found, the request will succeed but no action will be +// taken on the server. +func (c *ProjectsLocationsMessageBusesDeleteCall) AllowMissing(allowMissing bool) *ProjectsLocationsMessageBusesDeleteCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// Etag sets the optional parameter "etag": If provided, the MessageBus will +// only be deleted if the etag matches the current etag on the resource. +func (c *ProjectsLocationsMessageBusesDeleteCall) Etag(etag string) *ProjectsLocationsMessageBusesDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validate +// the request and preview the review, but do not post it. +func (c *ProjectsLocationsMessageBusesDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsMessageBusesDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsMessageBusesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMessageBusesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMessageBusesDeleteCall) Context(ctx context.Context) *ProjectsLocationsMessageBusesDeleteCall { + 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 *ProjectsLocationsMessageBusesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMessageBusesDeleteCall) 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.messageBuses.delete" 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 *ProjectsLocationsMessageBusesDeleteCall) 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 ProjectsLocationsMessageBusesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get a single MessageBus. +// +// - name: The name of the message bus to get. +func (r *ProjectsLocationsMessageBusesService) Get(name string) *ProjectsLocationsMessageBusesGetCall { + c := &ProjectsLocationsMessageBusesGetCall{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 *ProjectsLocationsMessageBusesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMessageBusesGetCall { + 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 *ProjectsLocationsMessageBusesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMessageBusesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMessageBusesGetCall) Context(ctx context.Context) *ProjectsLocationsMessageBusesGetCall { + 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 *ProjectsLocationsMessageBusesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMessageBusesGetCall) 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.messageBuses.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *MessageBus.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 *ProjectsLocationsMessageBusesGetCall) Do(opts ...googleapi.CallOption) (*MessageBus, 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 := &MessageBus{ + 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 ProjectsLocationsMessageBusesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List message buses. +// +// - parent: The parent collection to list triggers on. +func (r *ProjectsLocationsMessageBusesService) List(parent string) *ProjectsLocationsMessageBusesListCall { + c := &ProjectsLocationsMessageBusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter field that the list +// request will filter on. Possible filtersare described in +// https://google.aip.dev/160. +func (c *ProjectsLocationsMessageBusesListCall) Filter(filter string) *ProjectsLocationsMessageBusesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": The sorting order of the +// resources returned. Value should be a comma-separated list of fields. The +// default sorting order is ascending. To specify descending order for a field, +// append a `desc` suffix; for example: `name desc, update_time`. +func (c *ProjectsLocationsMessageBusesListCall) OrderBy(orderBy string) *ProjectsLocationsMessageBusesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return on each page. Note: The service may send fewer. +func (c *ProjectsLocationsMessageBusesListCall) PageSize(pageSize int64) *ProjectsLocationsMessageBusesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token; provide +// the value from the `next_page_token` field in a previous call to retrieve +// the subsequent page. When paginating, all other parameters provided must +// match the previous call that provided the page token. +func (c *ProjectsLocationsMessageBusesListCall) PageToken(pageToken string) *ProjectsLocationsMessageBusesListCall { + 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 *ProjectsLocationsMessageBusesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMessageBusesListCall { + 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 *ProjectsLocationsMessageBusesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMessageBusesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMessageBusesListCall) Context(ctx context.Context) *ProjectsLocationsMessageBusesListCall { + 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 *ProjectsLocationsMessageBusesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMessageBusesListCall) 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/{+parent}/messageBuses") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "eventarc.projects.locations.messageBuses.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListMessageBusesResponse.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 *ProjectsLocationsMessageBusesListCall) Do(opts ...googleapi.CallOption) (*ListMessageBusesResponse, 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 := &ListMessageBusesResponse{ + 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 *ProjectsLocationsMessageBusesListCall) Pages(ctx context.Context, f func(*ListMessageBusesResponse) 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 ProjectsLocationsMessageBusesListEnrollmentsCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListEnrollments: List message bus enrollments. +// +// - parent: The parent message bus to list enrollments on. +func (r *ProjectsLocationsMessageBusesService) ListEnrollments(parent string) *ProjectsLocationsMessageBusesListEnrollmentsCall { + c := &ProjectsLocationsMessageBusesListEnrollmentsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return on each page. Note: The service may send fewer. +func (c *ProjectsLocationsMessageBusesListEnrollmentsCall) PageSize(pageSize int64) *ProjectsLocationsMessageBusesListEnrollmentsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token; provide +// the value from the `next_page_token` field in a previous call to retrieve +// the subsequent page. When paginating, all other parameters provided must +// match the previous call that provided the page token. +func (c *ProjectsLocationsMessageBusesListEnrollmentsCall) PageToken(pageToken string) *ProjectsLocationsMessageBusesListEnrollmentsCall { + 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 *ProjectsLocationsMessageBusesListEnrollmentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMessageBusesListEnrollmentsCall { + 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 *ProjectsLocationsMessageBusesListEnrollmentsCall) IfNoneMatch(entityTag string) *ProjectsLocationsMessageBusesListEnrollmentsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMessageBusesListEnrollmentsCall) Context(ctx context.Context) *ProjectsLocationsMessageBusesListEnrollmentsCall { + 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 *ProjectsLocationsMessageBusesListEnrollmentsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMessageBusesListEnrollmentsCall) 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/{+parent}:listEnrollments") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "eventarc.projects.locations.messageBuses.listEnrollments" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListMessageBusEnrollmentsResponse.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 *ProjectsLocationsMessageBusesListEnrollmentsCall) Do(opts ...googleapi.CallOption) (*ListMessageBusEnrollmentsResponse, 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 := &ListMessageBusEnrollmentsResponse{ + 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 *ProjectsLocationsMessageBusesListEnrollmentsCall) Pages(ctx context.Context, f func(*ListMessageBusEnrollmentsResponse) 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 ProjectsLocationsMessageBusesPatchCall struct { + s *Service + name string + messagebus *MessageBus + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update a single message bus. +// +// - name: Identifier. Resource name of the form +// projects/{project}/locations/{location}/messageBuses/{message_bus}. +func (r *ProjectsLocationsMessageBusesService) Patch(name string, messagebus *MessageBus) *ProjectsLocationsMessageBusesPatchCall { + c := &ProjectsLocationsMessageBusesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.messagebus = messagebus + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the MessageBus is not found, a new MessageBus will be created. In this +// situation, `update_mask` is ignored. +func (c *ProjectsLocationsMessageBusesPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsMessageBusesPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": The fields to be +// updated; only fields explicitly provided are updated. If no field mask is +// provided, all provided fields in the request are updated. To update all +// fields, provide a field mask of "*". +func (c *ProjectsLocationsMessageBusesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMessageBusesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validate +// the request and preview the review, but do not post it. +func (c *ProjectsLocationsMessageBusesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsMessageBusesPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsMessageBusesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMessageBusesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMessageBusesPatchCall) Context(ctx context.Context) *ProjectsLocationsMessageBusesPatchCall { + 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 *ProjectsLocationsMessageBusesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMessageBusesPatchCall) 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.messagebus) + 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 += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "eventarc.projects.locations.messageBuses.patch" 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 *ProjectsLocationsMessageBusesPatchCall) 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 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 { @@ -4961,68 +7893,659 @@ func (c *ProjectsLocationsMessageBusesTestIamPermissionsCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +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) + 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) + } } -// 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`. +type ProjectsLocationsPipelinesCreateCall struct { + s *Service + parent string + pipeline *Pipeline + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a new Pipeline in a particular project and location. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest +// - parent: The parent collection in which to add this pipeline. +func (r *ProjectsLocationsPipelinesService) Create(parent string, pipeline *Pipeline) *ProjectsLocationsPipelinesCreateCall { + c := &ProjectsLocationsPipelinesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.pipeline = pipeline + return c +} + +// PipelineId sets the optional parameter "pipelineId": Required. The +// user-provided ID to be assigned to the Pipeline. +func (c *ProjectsLocationsPipelinesCreateCall) PipelineId(pipelineId string) *ProjectsLocationsPipelinesCreateCall { + c.urlParams_.Set("pipelineId", pipelineId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validate +// the request and preview the review, but do not post it. +func (c *ProjectsLocationsPipelinesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsPipelinesCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsPipelinesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelinesCreateCall { 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 { +func (c *ProjectsLocationsPipelinesCreateCall) Context(ctx context.Context) *ProjectsLocationsPipelinesCreateCall { 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 *ProjectsLocationsPipelinesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPipelinesCreateCall) 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 - } + body, err := googleapi.WithoutDataWrapper.JSONReader(c.pipeline) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelines") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "eventarc.projects.locations.pipelines.create" 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 *ProjectsLocationsPipelinesCreateCall) 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 ProjectsLocationsPipelinesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete a single pipeline. +// +// - name: The name of the Pipeline to be deleted. +func (r *ProjectsLocationsPipelinesService) Delete(name string) *ProjectsLocationsPipelinesDeleteCall { + c := &ProjectsLocationsPipelinesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the Pipeline is not found, the request will succeed but no action will be +// taken on the server. +func (c *ProjectsLocationsPipelinesDeleteCall) AllowMissing(allowMissing bool) *ProjectsLocationsPipelinesDeleteCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// Etag sets the optional parameter "etag": If provided, the Pipeline will only +// be deleted if the etag matches the current etag on the resource. +func (c *ProjectsLocationsPipelinesDeleteCall) Etag(etag string) *ProjectsLocationsPipelinesDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validate +// the request and preview the review, but do not post it. +func (c *ProjectsLocationsPipelinesDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsPipelinesDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsPipelinesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelinesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsPipelinesDeleteCall) Context(ctx context.Context) *ProjectsLocationsPipelinesDeleteCall { + 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 *ProjectsLocationsPipelinesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPipelinesDeleteCall) 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}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -5033,12 +8556,13 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.operations.cancel" call. +// Do executes the "eventarc.projects.locations.pipelines.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 *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// *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 *ProjectsLocationsPipelinesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5057,7 +8581,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5070,22 +8594,20 @@ 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 ProjectsLocationsPipelinesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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`. +// Get: Get a single Pipeline. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the pipeline to get. +func (r *ProjectsLocationsPipelinesService) Get(name string) *ProjectsLocationsPipelinesGetCall { + c := &ProjectsLocationsPipelinesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -5093,34 +8615,45 @@ func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocati // 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 *ProjectsLocationsPipelinesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelinesGetCall { 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 *ProjectsLocationsPipelinesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelinesGetCall { + c.ifNoneMatch_ = entityTag + 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 *ProjectsLocationsPipelinesGetCall) Context(ctx context.Context) *ProjectsLocationsPipelinesGetCall { 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 *ProjectsLocationsPipelinesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPipelinesGetCall) 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("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -5131,12 +8664,12 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.operations.delete" call. +// Do executes the "eventarc.projects.locations.pipelines.get" 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 +// *Pipeline.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 *ProjectsLocationsPipelinesGetCall) Do(opts ...googleapi.CallOption) (*Pipeline, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5155,7 +8688,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Pipeline{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5168,30 +8701,48 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsOperationsGetCall struct { +type ProjectsLocationsPipelinesGetIamPolicyCall struct { s *Service - name string + resource 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. +// 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. -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 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 *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsPipelinesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelinesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5199,27 +8750,27 @@ func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *Proje // 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 { +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 *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +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 *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsPipelinesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *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_) @@ -5227,7 +8778,7 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon var body io.Reader = nil 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}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5235,18 +8786,17 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon } 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.pipelines.getIamPolicy" 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) { +// *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 { @@ -5265,7 +8815,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5278,41 +8828,53 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsOperationsListCall struct { +type ProjectsLocationsPipelinesListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the request. If -// the server doesn't support this method, it returns `UNIMPLEMENTED`. +// List: List pipelines. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { - c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent collection to list pipelines on. +func (r *ProjectsLocationsPipelinesService) List(parent string) *ProjectsLocationsPipelinesListCall { + c := &ProjectsLocationsPipelinesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { +// Filter sets the optional parameter "filter": The filter field that the list +// request will filter on. Possible filters are described in +// https://google.aip.dev/160. +func (c *ProjectsLocationsPipelinesListCall) Filter(filter string) *ProjectsLocationsPipelinesListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { +// OrderBy sets the optional parameter "orderBy": The sorting order of the +// resources returned. Value should be a comma-separated list of fields. The +// default sorting order is ascending. To specify descending order for a field, +// append a `desc` suffix; for example: `name desc, update_time`. +func (c *ProjectsLocationsPipelinesListCall) OrderBy(orderBy string) *ProjectsLocationsPipelinesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return on each page. Note: The service may send fewer. +func (c *ProjectsLocationsPipelinesListCall) PageSize(pageSize int64) *ProjectsLocationsPipelinesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { +// PageToken sets the optional parameter "pageToken": The page token; provide +// the value from the `next_page_token` field in a previous call to retrieve +// the subsequent page. When paginating, all other parameters provided must +// match the previous call that provided the page token. +func (c *ProjectsLocationsPipelinesListCall) PageToken(pageToken string) *ProjectsLocationsPipelinesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -5320,7 +8882,7 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPipelinesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelinesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5328,27 +8890,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 *ProjectsLocationsPipelinesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelinesListCall { 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 *ProjectsLocationsPipelinesListCall) Context(ctx context.Context) *ProjectsLocationsPipelinesListCall { 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 *ProjectsLocationsPipelinesListCall) 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 *ProjectsLocationsPipelinesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -5356,7 +8918,7 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelines") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5364,18 +8926,18 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.operations.list" call. +// Do executes the "eventarc.projects.locations.pipelines.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) { +// *ListPipelinesResponse.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 *ProjectsLocationsPipelinesListCall) Do(opts ...googleapi.CallOption) (*ListPipelinesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5394,7 +8956,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &ListPipelinesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5410,7 +8972,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsPipelinesListCall) Pages(ctx context.Context, f func(*ListPipelinesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -5428,102 +8990,103 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( } } -type ProjectsLocationsPipelinesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPipelinesPatchCall struct { + s *Service + name string + pipeline *Pipeline + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// Patch: Update a single pipeline. // -// - 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 +// - name: Identifier. The resource name of the Pipeline. Must be unique within +// the location of the project and must be in +// `projects/{project}/locations/{location}/pipelines/{pipeline}` format. +func (r *ProjectsLocationsPipelinesService) Patch(name string, pipeline *Pipeline) *ProjectsLocationsPipelinesPatchCall { + c := &ProjectsLocationsPipelinesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.pipeline = pipeline 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)) +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the Pipeline is not found, a new Pipeline will be created. In this +// situation, `update_mask` is ignored. +func (c *ProjectsLocationsPipelinesPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsPipelinesPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": The fields to be +// updated; only fields explicitly provided are updated. If no field mask is +// provided, all provided fields in the request are updated. To update all +// fields, provide a field mask of "*". +func (c *ProjectsLocationsPipelinesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPipelinesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validate +// the request and preview the review, but do not post it. +func (c *ProjectsLocationsPipelinesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsPipelinesPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelinesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelinesGetIamPolicyCall { +func (c *ProjectsLocationsPipelinesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelinesPatchCall { 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 *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 *ProjectsLocationsPipelinesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPipelinesGetIamPolicyCall { +func (c *ProjectsLocationsPipelinesPatchCall) Context(ctx context.Context) *ProjectsLocationsPipelinesPatchCall { 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 *ProjectsLocationsPipelinesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsPipelinesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -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_) - } +func (c *ProjectsLocationsPipelinesPatchCall) 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.pipeline) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "eventarc.projects.locations.pipelines.getIamPolicy" call. +// Do executes the "eventarc.projects.locations.pipelines.patch" 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 *ProjectsLocationsPipelinesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *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 *ProjectsLocationsPipelinesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5542,7 +9105,7 @@ func (c *ProjectsLocationsPipelinesGetIamPolicyCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index e28b58f187..b097796648 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -2255,7 +2255,7 @@ } } }, - "revision": "20241010", + "revision": "20241017", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2994,7 +2994,8 @@ "description": "Git repo configuration for the cluster." }, "metricsGcpServiceAccountEmail": { - "description": "The Email of the Google Cloud Service Account (GSA) used for exporting Config Sync metrics to Cloud Monitoring and Cloud Monarch when Workload Identity is enabled. The GSA should have the Monitoring Metric Writer (roles/monitoring.metricWriter) IAM role. The Kubernetes ServiceAccount `default` in the namespace `config-management-monitoring` should be bound to the GSA.", + "deprecated": true, + "description": "The Email of the Google Cloud Service Account (GSA) used for exporting Config Sync metrics to Cloud Monitoring and Cloud Monarch when Workload Identity is enabled. The GSA should have the Monitoring Metric Writer (roles/monitoring.metricWriter) IAM role. The Kubernetes ServiceAccount `default` in the namespace `config-management-monitoring` should be bound to the GSA. Deprecated: If Workload Identity Federation for GKE is enabled, Google Cloud Service Account is no longer needed for exporting Config Sync metrics: https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/monitor-config-sync-cloud-monitoring#custom-monitoring.", "type": "string" }, "oci": { @@ -3212,6 +3213,12 @@ ], "type": "string" }, + "crCount": { + "description": "Output only. The number of RootSync and RepoSync CRs in the cluster.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, "deploymentState": { "$ref": "ConfigManagementConfigSyncDeploymentState", "description": "Information about the deployment of ConfigSync, including the version of the various Pods deployed" @@ -5282,6 +5289,21 @@ "$ref": "Authority", "description": "Optional. How to identify workloads from this Membership. See the documentation on Workload Identity for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity" }, + "clusterTier": { + "description": "Output only. The tier of the cluster.", + "enum": [ + "CLUSTER_TIER_UNSPECIFIED", + "STANDARD", + "ENTERPRISE" + ], + "enumDescriptions": [ + "The ClusterTier is not set.", + "The ClusterTier is standard.", + "The ClusterTier is enterprise." + ], + "readOnly": true, + "type": "string" + }, "createTime": { "description": "Output only. When the Membership was created.", "format": "google-datetime", diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index 9dd4698829..86dbc74fd2 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -1398,7 +1398,10 @@ type ConfigManagementConfigSync struct { // Monarch when Workload Identity is enabled. The GSA should have the // Monitoring Metric Writer (roles/monitoring.metricWriter) IAM role. The // Kubernetes ServiceAccount `default` in the namespace - // `config-management-monitoring` should be bound to the GSA. + // `config-management-monitoring` should be bound to the GSA. Deprecated: If + // Workload Identity Federation for GKE is enabled, Google Cloud Service + // Account is no longer needed for exporting Config Sync metrics: + // https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/monitor-config-sync-cloud-monitoring#custom-monitoring. MetricsGcpServiceAccountEmail string `json:"metricsGcpServiceAccountEmail,omitempty"` // Oci: OCI repo configuration for the cluster Oci *ConfigManagementOciConfig `json:"oci,omitempty"` @@ -1567,6 +1570,9 @@ type ConfigManagementConfigSyncState struct { // "STOPPED" - Syncing resources to the cluster is stopped at the cluster // level. ClusterLevelStopSyncingState string `json:"clusterLevelStopSyncingState,omitempty"` + // CrCount: Output only. The number of RootSync and RepoSync CRs in the + // cluster. + CrCount int64 `json:"crCount,omitempty"` // DeploymentState: Information about the deployment of ConfigSync, including // the version of the various Pods deployed DeploymentState *ConfigManagementConfigSyncDeploymentState `json:"deploymentState,omitempty"` @@ -4187,6 +4193,13 @@ type Membership struct { // documentation on Workload Identity for more details: // https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity Authority *Authority `json:"authority,omitempty"` + // ClusterTier: Output only. The tier of the cluster. + // + // Possible values: + // "CLUSTER_TIER_UNSPECIFIED" - The ClusterTier is not set. + // "STANDARD" - The ClusterTier is standard. + // "ENTERPRISE" - The ClusterTier is enterprise. + ClusterTier string `json:"clusterTier,omitempty"` // CreateTime: Output only. When the Membership was created. CreateTime string `json:"createTime,omitempty"` // DeleteTime: Output only. When the Membership was deleted. diff --git a/gkehub/v1beta/gkehub-api.json b/gkehub/v1beta/gkehub-api.json index 402f755053..e1503a88df 100644 --- a/gkehub/v1beta/gkehub-api.json +++ b/gkehub/v1beta/gkehub-api.json @@ -2111,7 +2111,7 @@ } } }, - "revision": "20241010", + "revision": "20241017", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2734,7 +2734,8 @@ "description": "Git repo configuration for the cluster." }, "metricsGcpServiceAccountEmail": { - "description": "The Email of the Google Cloud Service Account (GSA) used for exporting Config Sync metrics to Cloud Monitoring and Cloud Monarch when Workload Identity is enabled. The GSA should have the Monitoring Metric Writer (roles/monitoring.metricWriter) IAM role. The Kubernetes ServiceAccount `default` in the namespace `config-management-monitoring` should be bound to the GSA.", + "deprecated": true, + "description": "The Email of the Google Cloud Service Account (GSA) used for exporting Config Sync metrics to Cloud Monitoring and Cloud Monarch when Workload Identity is enabled. The GSA should have the Monitoring Metric Writer (roles/monitoring.metricWriter) IAM role. The Kubernetes ServiceAccount `default` in the namespace `config-management-monitoring` should be bound to the GSA. Deprecated: If Workload Identity Federation for GKE is enabled, Google Cloud Service Account is no longer needed for exporting Config Sync metrics: https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/monitor-config-sync-cloud-monitoring#custom-monitoring.", "type": "string" }, "oci": { @@ -2952,6 +2953,12 @@ ], "type": "string" }, + "crCount": { + "description": "Output only. The number of RootSync and RepoSync CRs in the cluster.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, "deploymentState": { "$ref": "ConfigManagementConfigSyncDeploymentState", "description": "Information about the deployment of ConfigSync, including the version of the various Pods deployed" @@ -4953,6 +4960,21 @@ "$ref": "Authority", "description": "Optional. How to identify workloads from this Membership. See the documentation on Workload Identity for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity" }, + "clusterTier": { + "description": "Output only. The tier of the cluster.", + "enum": [ + "CLUSTER_TIER_UNSPECIFIED", + "STANDARD", + "ENTERPRISE" + ], + "enumDescriptions": [ + "The ClusterTier is not set.", + "The ClusterTier is standard.", + "The ClusterTier is enterprise." + ], + "readOnly": true, + "type": "string" + }, "createTime": { "description": "Output only. When the Membership was created.", "format": "google-datetime", diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index 85a3b3b427..7a1a367b8b 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -1259,7 +1259,10 @@ type ConfigManagementConfigSync struct { // Monarch when Workload Identity is enabled. The GSA should have the // Monitoring Metric Writer (roles/monitoring.metricWriter) IAM role. The // Kubernetes ServiceAccount `default` in the namespace - // `config-management-monitoring` should be bound to the GSA. + // `config-management-monitoring` should be bound to the GSA. Deprecated: If + // Workload Identity Federation for GKE is enabled, Google Cloud Service + // Account is no longer needed for exporting Config Sync metrics: + // https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/monitor-config-sync-cloud-monitoring#custom-monitoring. MetricsGcpServiceAccountEmail string `json:"metricsGcpServiceAccountEmail,omitempty"` // Oci: OCI repo configuration for the cluster Oci *ConfigManagementOciConfig `json:"oci,omitempty"` @@ -1428,6 +1431,9 @@ type ConfigManagementConfigSyncState struct { // "STOPPED" - Syncing resources to the cluster is stopped at the cluster // level. ClusterLevelStopSyncingState string `json:"clusterLevelStopSyncingState,omitempty"` + // CrCount: Output only. The number of RootSync and RepoSync CRs in the + // cluster. + CrCount int64 `json:"crCount,omitempty"` // DeploymentState: Information about the deployment of ConfigSync, including // the version of the various Pods deployed DeploymentState *ConfigManagementConfigSyncDeploymentState `json:"deploymentState,omitempty"` @@ -3948,6 +3954,13 @@ type Membership struct { // documentation on Workload Identity for more details: // https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity Authority *Authority `json:"authority,omitempty"` + // ClusterTier: Output only. The tier of the cluster. + // + // Possible values: + // "CLUSTER_TIER_UNSPECIFIED" - The ClusterTier is not set. + // "STANDARD" - The ClusterTier is standard. + // "ENTERPRISE" - The ClusterTier is enterprise. + ClusterTier string `json:"clusterTier,omitempty"` // CreateTime: Output only. When the Membership was created. CreateTime string `json:"createTime,omitempty"` // DeleteTime: Output only. When the Membership was deleted. diff --git a/tpu/v2alpha1/tpu-api.json b/tpu/v2alpha1/tpu-api.json index 772f54bf3b..847952bc84 100644 --- a/tpu/v2alpha1/tpu-api.json +++ b/tpu/v2alpha1/tpu-api.json @@ -965,7 +965,7 @@ } } }, - "revision": "20241009", + "revision": "20241017", "rootUrl": "https://tpu.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -1461,6 +1461,20 @@ "nodeIdPrefix": { "description": "Prefix of node_ids in case of multi-node request Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. If node_count = 3 and node_id_prefix = \"np\", node ids of nodes created will be \"np-0\", \"np-1\", \"np-2\". If this field is not provided we use queued_resource_id as the node_id_prefix.", "type": "string" + }, + "workloadType": { + "description": "Optional. The workload type for the multi-node request.", + "enum": [ + "WORKLOAD_TYPE_UNSPECIFIED", + "THROUGHPUT_OPTIMIZED", + "AVAILABILITY_OPTIMIZED" + ], + "enumDescriptions": [ + "Not specified.", + "All of the nodes are available most of the time. Recommended for training workloads.", + "Most of the nodes are available all of the time. Recommended for serving workloads." + ], + "type": "string" } }, "type": "object" diff --git a/tpu/v2alpha1/tpu-gen.go b/tpu/v2alpha1/tpu-gen.go index ac9aba7fcb..8531f8c2ed 100644 --- a/tpu/v2alpha1/tpu-gen.go +++ b/tpu/v2alpha1/tpu-gen.go @@ -929,6 +929,15 @@ type MultiNodeParams struct { // "np-2". If this field is not provided we use queued_resource_id as the // node_id_prefix. NodeIdPrefix string `json:"nodeIdPrefix,omitempty"` + // WorkloadType: Optional. The workload type for the multi-node request. + // + // Possible values: + // "WORKLOAD_TYPE_UNSPECIFIED" - Not specified. + // "THROUGHPUT_OPTIMIZED" - All of the nodes are available most of the time. + // Recommended for training workloads. + // "AVAILABILITY_OPTIMIZED" - Most of the nodes are available all of the + // time. Recommended for serving workloads. + WorkloadType string `json:"workloadType,omitempty"` // ForceSendFields is a list of field names (e.g. "NodeCount") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See diff --git a/workloadmanager/v1/workloadmanager-api.json b/workloadmanager/v1/workloadmanager-api.json index 65d138bffc..50303bde22 100644 --- a/workloadmanager/v1/workloadmanager-api.json +++ b/workloadmanager/v1/workloadmanager-api.json @@ -772,7 +772,7 @@ } } }, - "revision": "20241009", + "revision": "20241016", "rootUrl": "https://workloadmanager.googleapis.com/", "schemas": { "AgentCommand": { @@ -793,42 +793,6 @@ }, "type": "object" }, - "AssetLocation": { - "description": "Provides the mapping of a cloud asset to a direct physical location or to a proxy that defines the location on its behalf.", - "id": "AssetLocation", - "properties": { - "ccfeRmsPath": { - "description": "Spanner path of the CCFE RMS database. It is only applicable for CCFE tenants that use CCFE RMS for storing resource metadata.", - "type": "string" - }, - "expected": { - "$ref": "IsolationExpectations", - "description": "Defines the customer expectation around ZI/ZS for this asset and ZI/ZS state of the region at the time of asset creation." - }, - "extraParameters": { - "description": "Defines extra parameters required for specific asset types.", - "items": { - "$ref": "ExtraParameter" - }, - "type": "array" - }, - "locationData": { - "description": "Contains all kinds of physical location definitions for this asset.", - "items": { - "$ref": "LocationData" - }, - "type": "array" - }, - "parentAsset": { - "description": "Defines parents assets if any in order to allow later generation of child_asset_location data via child assets.", - "items": { - "$ref": "CloudAsset" - }, - "type": "array" - } - }, - "type": "object" - }, "BigQueryDestination": { "description": "Message describing big query destination", "id": "BigQueryDestination", @@ -844,49 +808,12 @@ }, "type": "object" }, - "BlobstoreLocation": { - "description": "Policy ID that identified data placement in Blobstore as per go/blobstore-user-guide#data-metadata-placement-and-failure-domains", - "id": "BlobstoreLocation", - "properties": { - "policyId": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "CancelOperationRequest", "properties": {}, "type": "object" }, - "CloudAsset": { - "id": "CloudAsset", - "properties": { - "assetName": { - "type": "string" - }, - "assetType": { - "type": "string" - } - }, - "type": "object" - }, - "CloudAssetComposition": { - "id": "CloudAssetComposition", - "properties": { - "childAsset": { - "items": { - "$ref": "CloudAsset" - }, - "type": "array" - } - }, - "type": "object" - }, "Command": { "description": "* Command specifies the type of command to execute.", "id": "Command", @@ -902,18 +829,6 @@ }, "type": "object" }, - "DirectLocationAssignment": { - "id": "DirectLocationAssignment", - "properties": { - "location": { - "items": { - "$ref": "LocationAssignment" - }, - "type": "array" - } - }, - "type": "object" - }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -1029,6 +944,14 @@ "description": "The name of execution resource. The format is projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}", "type": "string" }, + "notices": { + "description": "Output only. Additional information generated by the execution", + "items": { + "$ref": "Notice" + }, + "readOnly": true, + "type": "array" + }, "ruleResults": { "description": "Output only. execution result summary per rule", "items": { @@ -1160,17 +1083,6 @@ }, "type": "object" }, - "ExtraParameter": { - "description": "Defines parameters that should only be used for specific asset types.", - "id": "ExtraParameter", - "properties": { - "regionalMigDistributionPolicy": { - "$ref": "RegionalMigDistributionPolicy", - "description": "Details about zones used by regional compute.googleapis.com/InstanceGroupManager to create instances." - } - }, - "type": "object" - }, "GceInstanceFilter": { "description": "Message describing compute engine instance filter", "id": "GceInstanceFilter", @@ -1214,131 +1126,6 @@ }, "type": "object" }, - "IsolationExpectations": { - "id": "IsolationExpectations", - "properties": { - "requirementOverride": { - "$ref": "RequirementOverride", - "description": "Explicit overrides for ZI and ZS requirements to be used for resources that should be excluded from ZI/ZS verification logic." - }, - "ziOrgPolicy": { - "enum": [ - "ZI_UNSPECIFIED", - "ZI_UNKNOWN", - "ZI_NOT_REQUIRED", - "ZI_PREFERRED", - "ZI_REQUIRED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "", - "" - ], - "type": "string" - }, - "ziRegionPolicy": { - "enum": [ - "ZI_REGION_POLICY_UNSPECIFIED", - "ZI_REGION_POLICY_UNKNOWN", - "ZI_REGION_POLICY_NOT_SET", - "ZI_REGION_POLICY_FAIL_OPEN", - "ZI_REGION_POLICY_FAIL_CLOSED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "", - "" - ], - "type": "string" - }, - "ziRegionState": { - "enum": [ - "ZI_REGION_UNSPECIFIED", - "ZI_REGION_UNKNOWN", - "ZI_REGION_NOT_ENABLED", - "ZI_REGION_ENABLED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "" - ], - "type": "string" - }, - "zoneIsolation": { - "deprecated": true, - "description": "Deprecated: use zi_org_policy, zi_region_policy and zi_region_state instead for setting ZI expectations as per go/zicy-publish-physical-location.", - "enum": [ - "ZI_UNSPECIFIED", - "ZI_UNKNOWN", - "ZI_NOT_REQUIRED", - "ZI_PREFERRED", - "ZI_REQUIRED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "", - "" - ], - "type": "string" - }, - "zoneSeparation": { - "deprecated": true, - "description": "Deprecated: use zs_org_policy, and zs_region_stateinstead for setting Zs expectations as per go/zicy-publish-physical-location.", - "enum": [ - "ZS_UNSPECIFIED", - "ZS_UNKNOWN", - "ZS_NOT_REQUIRED", - "ZS_REQUIRED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "" - ], - "type": "string" - }, - "zsOrgPolicy": { - "enum": [ - "ZS_UNSPECIFIED", - "ZS_UNKNOWN", - "ZS_NOT_REQUIRED", - "ZS_REQUIRED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "" - ], - "type": "string" - }, - "zsRegionState": { - "enum": [ - "ZS_REGION_UNSPECIFIED", - "ZS_REGION_UNKNOWN", - "ZS_REGION_NOT_ENABLED", - "ZS_REGION_ENABLED" - ], - "enumDescriptions": [ - "", - "To be used if tracking of the asset ZS-bit is not available", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, "ListEvaluationsResponse": { "description": "Message for response to listing Evaluations", "id": "ListEvaluationsResponse", @@ -1513,64 +1300,18 @@ }, "type": "object" }, - "LocationAssignment": { - "id": "LocationAssignment", + "Notice": { + "description": "Message for additional information generated by the execution", + "id": "Notice", "properties": { - "location": { - "type": "string" - }, - "locationType": { - "enum": [ - "UNSPECIFIED", - "CLUSTER", - "POP", - "CLOUD_ZONE", - "CLOUD_REGION", - "MULTI_REGION_GEO", - "MULTI_REGION_JURISDICTION", - "GLOBAL", - "OTHER" - ], - "enumDescriptions": [ - "", - "1-10: Physical failure domains.", - "", - "11-20: Logical failure domains.", - "", - "", - "", - "", - "" - ], + "message": { + "description": "Output only. Message of the notice", + "readOnly": true, "type": "string" } }, "type": "object" }, - "LocationData": { - "id": "LocationData", - "properties": { - "blobstoreLocation": { - "$ref": "BlobstoreLocation" - }, - "childAssetLocation": { - "$ref": "CloudAssetComposition" - }, - "directLocation": { - "$ref": "DirectLocationAssignment" - }, - "gcpProjectProxy": { - "$ref": "TenantProjectProxy" - }, - "placerLocation": { - "$ref": "PlacerLocation" - }, - "spannerLocation": { - "$ref": "SpannerLocation" - } - }, - "type": "object" - }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -1650,74 +1391,6 @@ }, "type": "object" }, - "PlacerLocation": { - "description": "Message describing that the location of the customer resource is tied to placer allocations", - "id": "PlacerLocation", - "properties": { - "placerConfig": { - "description": "Directory with a config related to it in placer (e.g. \"/placer/prod/home/my-root/my-dir\")", - "type": "string" - } - }, - "type": "object" - }, - "RegionalMigDistributionPolicy": { - "description": "To be used for specifying the intended distribution of regional compute.googleapis.com/InstanceGroupManager instances", - "id": "RegionalMigDistributionPolicy", - "properties": { - "targetShape": { - "description": "The shape in which the group converges around distribution of resources. Instance of proto2 enum", - "format": "int32", - "type": "integer" - }, - "zones": { - "description": "Cloud zones used by regional MIG to create instances.", - "items": { - "$ref": "ZoneConfiguration" - }, - "type": "array" - } - }, - "type": "object" - }, - "RequirementOverride": { - "id": "RequirementOverride", - "properties": { - "ziOverride": { - "enum": [ - "ZI_UNSPECIFIED", - "ZI_UNKNOWN", - "ZI_NOT_REQUIRED", - "ZI_PREFERRED", - "ZI_REQUIRED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "", - "" - ], - "type": "string" - }, - "zsOverride": { - "enum": [ - "ZS_UNSPECIFIED", - "ZS_UNKNOWN", - "ZS_NOT_REQUIRED", - "ZS_REQUIRED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, "Resource": { "description": "Message represent resource in execution result", "id": "Resource", @@ -2452,26 +2125,6 @@ }, "type": "object" }, - "SpannerLocation": { - "id": "SpannerLocation", - "properties": { - "backupName": { - "description": "Set of backups used by the resource with name in the same format as what is available at http://table/spanner_automon.backup_metadata", - "items": { - "type": "string" - }, - "type": "array" - }, - "dbName": { - "description": "Set of databases used by the resource in format /span//", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "SqlserverValidation": { "description": "A presentation of SQLServer workload insight. The schema of SqlServer workloads validation related data.", "id": "SqlserverValidation", @@ -2587,18 +2240,6 @@ }, "type": "object" }, - "TenantProjectProxy": { - "id": "TenantProjectProxy", - "properties": { - "projectNumbers": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "ViolationDetails": { "description": "Message describing the violation in an evaluation result.", "id": "ViolationDetails", @@ -2645,15 +2286,6 @@ "id": "WriteInsightResponse", "properties": {}, "type": "object" - }, - "ZoneConfiguration": { - "id": "ZoneConfiguration", - "properties": { - "zone": { - "type": "string" - } - }, - "type": "object" } }, "servicePath": "", diff --git a/workloadmanager/v1/workloadmanager-gen.go b/workloadmanager/v1/workloadmanager-gen.go index 7d87e4d951..80f298b2da 100644 --- a/workloadmanager/v1/workloadmanager-gen.go +++ b/workloadmanager/v1/workloadmanager-gen.go @@ -286,41 +286,6 @@ func (s AgentCommand) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// AssetLocation: Provides the mapping of a cloud asset to a direct physical -// location or to a proxy that defines the location on its behalf. -type AssetLocation struct { - // CcfeRmsPath: Spanner path of the CCFE RMS database. It is only applicable - // for CCFE tenants that use CCFE RMS for storing resource metadata. - CcfeRmsPath string `json:"ccfeRmsPath,omitempty"` - // Expected: Defines the customer expectation around ZI/ZS for this asset and - // ZI/ZS state of the region at the time of asset creation. - Expected *IsolationExpectations `json:"expected,omitempty"` - // ExtraParameters: Defines extra parameters required for specific asset types. - ExtraParameters []*ExtraParameter `json:"extraParameters,omitempty"` - // LocationData: Contains all kinds of physical location definitions for this - // asset. - LocationData []*LocationData `json:"locationData,omitempty"` - // ParentAsset: Defines parents assets if any in order to allow later - // generation of child_asset_location data via child assets. - ParentAsset []*CloudAsset `json:"parentAsset,omitempty"` - // ForceSendFields is a list of field names (e.g. "CcfeRmsPath") 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. "CcfeRmsPath") 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 AssetLocation) MarshalJSON() ([]byte, error) { - type NoMethod AssetLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // BigQueryDestination: Message describing big query destination type BigQueryDestination struct { // CreateNewResultsTable: Optional. determine if results will be saved in a new @@ -346,73 +311,10 @@ func (s BigQueryDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// BlobstoreLocation: Policy ID that identified data placement in Blobstore as -// per go/blobstore-user-guide#data-metadata-placement-and-failure-domains -type BlobstoreLocation struct { - PolicyId []string `json:"policyId,omitempty"` - // ForceSendFields is a list of field names (e.g. "PolicyId") 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. "PolicyId") 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 BlobstoreLocation) MarshalJSON() ([]byte, error) { - type NoMethod BlobstoreLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // CancelOperationRequest: The request message for Operations.CancelOperation. type CancelOperationRequest struct { } -type CloudAsset struct { - AssetName string `json:"assetName,omitempty"` - AssetType string `json:"assetType,omitempty"` - // ForceSendFields is a list of field names (e.g. "AssetName") 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. "AssetName") 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 CloudAsset) MarshalJSON() ([]byte, error) { - type NoMethod CloudAsset - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CloudAssetComposition struct { - ChildAsset []*CloudAsset `json:"childAsset,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChildAsset") 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. "ChildAsset") 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 CloudAssetComposition) MarshalJSON() ([]byte, error) { - type NoMethod CloudAssetComposition - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // Command: * Command specifies the type of command to execute. type Command struct { // AgentCommand: AgentCommand specifies a one-time executable program for the @@ -438,26 +340,6 @@ func (s Command) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type DirectLocationAssignment struct { - Location []*LocationAssignment `json:"location,omitempty"` - // ForceSendFields is a list of field names (e.g. "Location") 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. "Location") 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 DirectLocationAssignment) MarshalJSON() ([]byte, error) { - type NoMethod DirectLocationAssignment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use it as // the request or the response type of an API method. For instance: service Foo @@ -533,6 +415,8 @@ type Execution struct { // projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{ // execution} Name string `json:"name,omitempty"` + // Notices: Output only. Additional information generated by the execution + Notices []*Notice `json:"notices,omitempty"` // RuleResults: Output only. execution result summary per rule RuleResults []*RuleExecutionResult `json:"ruleResults,omitempty"` // RunType: type represent whether the execution executed directly by user or @@ -652,30 +536,6 @@ func (s ExternalDataSources) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ExtraParameter: Defines parameters that should only be used for specific -// asset types. -type ExtraParameter struct { - // RegionalMigDistributionPolicy: Details about zones used by regional - // compute.googleapis.com/InstanceGroupManager to create instances. - RegionalMigDistributionPolicy *RegionalMigDistributionPolicy `json:"regionalMigDistributionPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "RegionalMigDistributionPolicy") 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. "RegionalMigDistributionPolicy") - // 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 ExtraParameter) MarshalJSON() ([]byte, error) { - type NoMethod ExtraParameter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GceInstanceFilter: Message describing compute engine instance filter type GceInstanceFilter struct { // ServiceAccounts: Service account of compute engine @@ -730,81 +590,6 @@ func (s Insight) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type IsolationExpectations struct { - // RequirementOverride: Explicit overrides for ZI and ZS requirements to be - // used for resources that should be excluded from ZI/ZS verification logic. - RequirementOverride *RequirementOverride `json:"requirementOverride,omitempty"` - // Possible values: - // "ZI_UNSPECIFIED" - // "ZI_UNKNOWN" - To be used if tracking is not available - // "ZI_NOT_REQUIRED" - // "ZI_PREFERRED" - // "ZI_REQUIRED" - ZiOrgPolicy string `json:"ziOrgPolicy,omitempty"` - // Possible values: - // "ZI_REGION_POLICY_UNSPECIFIED" - // "ZI_REGION_POLICY_UNKNOWN" - To be used if tracking is not available - // "ZI_REGION_POLICY_NOT_SET" - // "ZI_REGION_POLICY_FAIL_OPEN" - // "ZI_REGION_POLICY_FAIL_CLOSED" - ZiRegionPolicy string `json:"ziRegionPolicy,omitempty"` - // Possible values: - // "ZI_REGION_UNSPECIFIED" - // "ZI_REGION_UNKNOWN" - To be used if tracking is not available - // "ZI_REGION_NOT_ENABLED" - // "ZI_REGION_ENABLED" - ZiRegionState string `json:"ziRegionState,omitempty"` - // ZoneIsolation: Deprecated: use zi_org_policy, zi_region_policy and - // zi_region_state instead for setting ZI expectations as per - // go/zicy-publish-physical-location. - // - // Possible values: - // "ZI_UNSPECIFIED" - // "ZI_UNKNOWN" - To be used if tracking is not available - // "ZI_NOT_REQUIRED" - // "ZI_PREFERRED" - // "ZI_REQUIRED" - ZoneIsolation string `json:"zoneIsolation,omitempty"` - // ZoneSeparation: Deprecated: use zs_org_policy, and zs_region_stateinstead - // for setting Zs expectations as per go/zicy-publish-physical-location. - // - // Possible values: - // "ZS_UNSPECIFIED" - // "ZS_UNKNOWN" - To be used if tracking is not available - // "ZS_NOT_REQUIRED" - // "ZS_REQUIRED" - ZoneSeparation string `json:"zoneSeparation,omitempty"` - // Possible values: - // "ZS_UNSPECIFIED" - // "ZS_UNKNOWN" - To be used if tracking is not available - // "ZS_NOT_REQUIRED" - // "ZS_REQUIRED" - ZsOrgPolicy string `json:"zsOrgPolicy,omitempty"` - // Possible values: - // "ZS_REGION_UNSPECIFIED" - // "ZS_REGION_UNKNOWN" - To be used if tracking of the asset ZS-bit is not - // available - // "ZS_REGION_NOT_ENABLED" - // "ZS_REGION_ENABLED" - ZsRegionState string `json:"zsRegionState,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequirementOverride") 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. "RequirementOverride") 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 IsolationExpectations) MarshalJSON() ([]byte, error) { - type NoMethod IsolationExpectations - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // ListEvaluationsResponse: Message for response to listing Evaluations type ListEvaluationsResponse struct { // Evaluations: The list of Evaluation @@ -1043,59 +828,25 @@ func (s Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type LocationAssignment struct { - Location string `json:"location,omitempty"` - // Possible values: - // "UNSPECIFIED" - // "CLUSTER" - 1-10: Physical failure domains. - // "POP" - // "CLOUD_ZONE" - 11-20: Logical failure domains. - // "CLOUD_REGION" - // "MULTI_REGION_GEO" - // "MULTI_REGION_JURISDICTION" - // "GLOBAL" - // "OTHER" - LocationType string `json:"locationType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Location") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// Notice: Message for additional information generated by the execution +type Notice struct { + // Message: Output only. Message of the notice + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Message") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. 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. "Location") to include in API + // NullFields is a list of field names (e.g. "Message") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s LocationAssignment) MarshalJSON() ([]byte, error) { - type NoMethod LocationAssignment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type LocationData struct { - BlobstoreLocation *BlobstoreLocation `json:"blobstoreLocation,omitempty"` - ChildAssetLocation *CloudAssetComposition `json:"childAssetLocation,omitempty"` - DirectLocation *DirectLocationAssignment `json:"directLocation,omitempty"` - GcpProjectProxy *TenantProjectProxy `json:"gcpProjectProxy,omitempty"` - PlacerLocation *PlacerLocation `json:"placerLocation,omitempty"` - SpannerLocation *SpannerLocation `json:"spannerLocation,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlobstoreLocation") 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. "BlobstoreLocation") 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 LocationData) MarshalJSON() ([]byte, error) { - type NoMethod LocationData +func (s Notice) MarshalJSON() ([]byte, error) { + type NoMethod Notice return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } @@ -1184,89 +935,6 @@ func (s OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// PlacerLocation: Message describing that the location of the customer -// resource is tied to placer allocations -type PlacerLocation struct { - // PlacerConfig: Directory with a config related to it in placer (e.g. - // "/placer/prod/home/my-root/my-dir") - PlacerConfig string `json:"placerConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "PlacerConfig") 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. "PlacerConfig") 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 PlacerLocation) MarshalJSON() ([]byte, error) { - type NoMethod PlacerLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionalMigDistributionPolicy: To be used for specifying the intended -// distribution of regional compute.googleapis.com/InstanceGroupManager -// instances -type RegionalMigDistributionPolicy struct { - // TargetShape: The shape in which the group converges around distribution of - // resources. Instance of proto2 enum - TargetShape int64 `json:"targetShape,omitempty"` - // Zones: Cloud zones used by regional MIG to create instances. - Zones []*ZoneConfiguration `json:"zones,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetShape") 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. "TargetShape") 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 RegionalMigDistributionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RegionalMigDistributionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RequirementOverride struct { - // Possible values: - // "ZI_UNSPECIFIED" - // "ZI_UNKNOWN" - To be used if tracking is not available - // "ZI_NOT_REQUIRED" - // "ZI_PREFERRED" - // "ZI_REQUIRED" - ZiOverride string `json:"ziOverride,omitempty"` - // Possible values: - // "ZS_UNSPECIFIED" - // "ZS_UNKNOWN" - To be used if tracking is not available - // "ZS_NOT_REQUIRED" - // "ZS_REQUIRED" - ZsOverride string `json:"zsOverride,omitempty"` - // ForceSendFields is a list of field names (e.g. "ZiOverride") 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. "ZiOverride") 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 RequirementOverride) MarshalJSON() ([]byte, error) { - type NoMethod RequirementOverride - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // Resource: Message represent resource in execution result type Resource struct { // Name: The name of the resource. @@ -2021,30 +1689,6 @@ func (s ShellCommand) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type SpannerLocation struct { - // BackupName: Set of backups used by the resource with name in the same format - // as what is available at http://table/spanner_automon.backup_metadata - BackupName []string `json:"backupName,omitempty"` - // DbName: Set of databases used by the resource in format /span// - DbName []string `json:"dbName,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupName") 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. "BackupName") 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 SpannerLocation) MarshalJSON() ([]byte, error) { - type NoMethod SpannerLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // SqlserverValidation: A presentation of SQLServer workload insight. The // schema of SqlServer workloads validation related data. type SqlserverValidation struct { @@ -2176,26 +1820,6 @@ func (s Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type TenantProjectProxy struct { - ProjectNumbers []string `json:"projectNumbers,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProjectNumbers") 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. "ProjectNumbers") 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 TenantProjectProxy) MarshalJSON() ([]byte, error) { - type NoMethod TenantProjectProxy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // ViolationDetails: Message describing the violation in an evaluation result. type ViolationDetails struct { // Asset: The name of the asset. @@ -2264,26 +1888,6 @@ type WriteInsightResponse struct { googleapi.ServerResponse `json:"-"` } -type ZoneConfiguration struct { - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Zone") 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. "Zone") 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 ZoneConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod ZoneConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - type ProjectsLocationsGetCall struct { s *Service name string