From 265dd10a6f6682b1f413a74ab9057df61ef54f47 Mon Sep 17 00:00:00 2001 From: Divyansh Vijayvergia Date: Thu, 9 Oct 2025 12:01:59 +0000 Subject: [PATCH 1/3] Update SDK with latest Spec --- .codegen/_openapi_sha | 2 +- NEXT_CHANGELOG.md | 12 +- internal/testspecs/service/lrotesting/api.go | 2 +- internal/testspecs/service/lrotesting/impl.go | 2 +- service/catalog/api.go | 180 ++++++++++++++++++ service/catalog/impl.go | 162 ++++++++++++++++ service/catalog/interface.go | 81 ++++++++ service/catalog/model.go | 7 +- service/compute/model.go | 12 +- service/dataquality/model.go | 48 ++--- service/jobs/model.go | 4 +- service/pkg.go | 2 +- service/provisioning/model.go | 12 ++ service/settings/model.go | 7 +- service/sharing/model.go | 3 + service/workspace/model.go | 75 ++++++-- 16 files changed, 555 insertions(+), 56 deletions(-) diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 4367e53bc..b3c04c8c9 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -6c7149172e35bcee9935503a1ec3f1a8fdffa686 \ No newline at end of file +2fa40d5ca4a9883216731c4e2c398c94bb3e0556 \ No newline at end of file diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 06827361e..911a8cb3e 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -94,4 +94,14 @@ * Add `IncludeUnbound` field for [catalog.ListCredentialsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListCredentialsRequest). * Add `IncludeUnbound` field for [catalog.ListExternalLocationsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListExternalLocationsRequest). * Add `IncludeUnbound` field for [catalog.ListStorageCredentialsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ListStorageCredentialsRequest). -* Add `AssetTypeMcp` enum value for [marketplace.AssetType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#AssetType). \ No newline at end of file +* Add `AssetTypeMcp` enum value for [marketplace.AssetType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/marketplace#AssetType). +* Add `ComputeMode` field for [provisioning.CreateWorkspaceRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/provisioning#CreateWorkspaceRequest). +* Add `ExpectedWorkspaceStatus` field for [provisioning.Workspace](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/provisioning#Workspace). +* Add `DependencyStorageLocations` field for [sharing.TableInternalAttributes](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sharing#TableInternalAttributes). +* Add `GitEmail` field for [workspace.CreateCredentialsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/workspace#CreateCredentialsRequest). +* Add `GitEmail` field for [workspace.CreateCredentialsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/workspace#CreateCredentialsResponse). +* Add `GitEmail` field for [workspace.CredentialInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/workspace#CredentialInfo). +* Add `GitEmail` field for [workspace.GetCredentialsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/workspace#GetCredentialsResponse). +* Add `GitEmail` field for [workspace.UpdateCredentialsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/workspace#UpdateCredentialsRequest). +* Add `GermanyTisax` enum value for [settings.ComplianceStandard](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#ComplianceStandard). +* [Breaking] Remove `PredictionProbabilityColumn` field for [dataquality.InferenceLogConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dataquality#InferenceLogConfig). \ No newline at end of file diff --git a/internal/testspecs/service/lrotesting/api.go b/internal/testspecs/service/lrotesting/api.go index c2bf712a0..4fbcc6e13 100755 --- a/internal/testspecs/service/lrotesting/api.go +++ b/internal/testspecs/service/lrotesting/api.go @@ -10,8 +10,8 @@ import ( "time" "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/internal/testspecs/service/common" "github.com/databricks/databricks-sdk-go/retries" + "github.com/databricks/databricks-sdk-go/service/common" "github.com/databricks/databricks-sdk-go/service/common/lro" "github.com/databricks/databricks-sdk-go/useragent" ) diff --git a/internal/testspecs/service/lrotesting/impl.go b/internal/testspecs/service/lrotesting/impl.go index c975fa3b6..36386b225 100755 --- a/internal/testspecs/service/lrotesting/impl.go +++ b/internal/testspecs/service/lrotesting/impl.go @@ -8,7 +8,7 @@ import ( "net/http" "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/internal/testspecs/service/common" + "github.com/databricks/databricks-sdk-go/service/common" ) // unexported type that holds implementations of just LroTesting API methods diff --git a/service/catalog/api.go b/service/catalog/api.go index 4f7d941bb..46334bf27 100755 --- a/service/catalog/api.go +++ b/service/catalog/api.go @@ -318,6 +318,15 @@ type CatalogsInterface interface { // retrieved. There is no guarantee of a specific ordering of the elements in // the array. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. List(ctx context.Context, request ListCatalogsRequest) listing.Iterator[CatalogInfo] @@ -327,6 +336,15 @@ type CatalogsInterface interface { // retrieved. There is no guarantee of a specific ordering of the elements in // the array. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. ListAll(ctx context.Context, request ListCatalogsRequest) ([]CatalogInfo, error) @@ -396,11 +414,29 @@ type ConnectionsInterface interface { // List all connections. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. List(ctx context.Context, request ListConnectionsRequest) listing.Iterator[ConnectionInfo] // List all connections. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. ListAll(ctx context.Context, request ListConnectionsRequest) ([]ConnectionInfo, error) @@ -743,6 +779,15 @@ type ExternalLocationsInterface interface { // location. There is no guarantee of a specific ordering of the elements in the // array. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. List(ctx context.Context, request ListExternalLocationsRequest) listing.Iterator[ExternalLocationInfo] @@ -752,6 +797,15 @@ type ExternalLocationsInterface interface { // location. There is no guarantee of a specific ordering of the elements in the // array. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. ListAll(ctx context.Context, request ListExternalLocationsRequest) ([]ExternalLocationInfo, error) @@ -948,6 +1002,15 @@ type FunctionsInterface interface { // is the owner. There is no guarantee of a specific ordering of the elements in // the array. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. List(ctx context.Context, request ListFunctionsRequest) listing.Iterator[FunctionInfo] @@ -959,6 +1022,15 @@ type FunctionsInterface interface { // is the owner. There is no guarantee of a specific ordering of the elements in // the array. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. ListAll(ctx context.Context, request ListFunctionsRequest) ([]FunctionInfo, error) @@ -1146,6 +1218,15 @@ type MetastoresInterface interface { // caller must be an admin to retrieve this info. There is no guarantee of a // specific ordering of the elements in the array. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. List(ctx context.Context, request ListMetastoresRequest) listing.Iterator[MetastoreInfo] @@ -1153,6 +1234,15 @@ type MetastoresInterface interface { // caller must be an admin to retrieve this info. There is no guarantee of a // specific ordering of the elements in the array. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. ListAll(ctx context.Context, request ListMetastoresRequest) ([]MetastoreInfo, error) @@ -2160,6 +2250,15 @@ type SchemasInterface interface { // for which the caller has the **USE_SCHEMA** privilege) will be retrieved. // There is no guarantee of a specific ordering of the elements in the array. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. List(ctx context.Context, request ListSchemasRequest) listing.Iterator[SchemaInfo] @@ -2169,6 +2268,15 @@ type SchemasInterface interface { // for which the caller has the **USE_SCHEMA** privilege) will be retrieved. // There is no guarantee of a specific ordering of the elements in the array. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. ListAll(ctx context.Context, request ListSchemasRequest) ([]SchemaInfo, error) @@ -2246,6 +2354,15 @@ type StorageCredentialsInterface interface { // credentials is unrestricted. There is no guarantee of a specific ordering of // the elements in the array. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. List(ctx context.Context, request ListStorageCredentialsRequest) listing.Iterator[StorageCredentialInfo] @@ -2255,6 +2372,15 @@ type StorageCredentialsInterface interface { // credentials is unrestricted. There is no guarantee of a specific ordering of // the elements in the array. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. ListAll(ctx context.Context, request ListStorageCredentialsRequest) ([]StorageCredentialInfo, error) @@ -2338,17 +2464,44 @@ type SystemSchemasInterface interface { // Gets an array of system schemas for a metastore. The caller must be an // account admin or a metastore admin. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. List(ctx context.Context, request ListSystemSchemasRequest) listing.Iterator[SystemSchemaInfo] // Gets an array of system schemas for a metastore. The caller must be an // account admin or a metastore admin. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. ListAll(ctx context.Context, request ListSystemSchemasRequest) ([]SystemSchemaInfo, error) // Gets an array of system schemas for a metastore. The caller must be an // account admin or a metastore admin. + // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. ListByMetastoreId(ctx context.Context, metastoreId string) (*ListSystemSchemasResponse, error) } @@ -2378,6 +2531,15 @@ func (a *SystemSchemasAPI) DisableByMetastoreIdAndSchemaName(ctx context.Context // Gets an array of system schemas for a metastore. The caller must be an // account admin or a metastore admin. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *SystemSchemasAPI) ListByMetastoreId(ctx context.Context, metastoreId string) (*ListSystemSchemasResponse, error) { return a.systemSchemasImpl.internalList(ctx, ListSystemSchemasRequest{ MetastoreId: metastoreId, @@ -2548,6 +2710,15 @@ type TablesInterface interface { // catalog and the **USE_SCHEMA** privilege on the parent schema. There is no // guarantee of a specific ordering of the elements in the array. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. List(ctx context.Context, request ListTablesRequest) listing.Iterator[TableInfo] @@ -2558,6 +2729,15 @@ type TablesInterface interface { // catalog and the **USE_SCHEMA** privilege on the parent schema. There is no // guarantee of a specific ordering of the elements in the array. // + // NOTE: we recommend using max_results=0 to use the paginated version of this + // API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients must + // continue reading pages until next_page_token is absent, which is the only + // indication that the end of results has been reached. This behavior follows + // Google AIP-158 guidelines. + // // This method is generated by Databricks SDK Code Generator. ListAll(ctx context.Context, request ListTablesRequest) ([]TableInfo, error) diff --git a/service/catalog/impl.go b/service/catalog/impl.go index 461595fdd..ad298d0f2 100755 --- a/service/catalog/impl.go +++ b/service/catalog/impl.go @@ -330,6 +330,15 @@ func (a *catalogsImpl) Get(ctx context.Context, request GetCatalogRequest) (*Cat // caller (or for which the caller has the **USE_CATALOG** privilege) will be // retrieved. There is no guarantee of a specific ordering of the elements in // the array. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *catalogsImpl) List(ctx context.Context, request ListCatalogsRequest) listing.Iterator[CatalogInfo] { getNextPage := func(ctx context.Context, req ListCatalogsRequest) (*ListCatalogsResponse, error) { @@ -359,6 +368,15 @@ func (a *catalogsImpl) List(ctx context.Context, request ListCatalogsRequest) li // caller (or for which the caller has the **USE_CATALOG** privilege) will be // retrieved. There is no guarantee of a specific ordering of the elements in // the array. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *catalogsImpl) ListAll(ctx context.Context, request ListCatalogsRequest) ([]CatalogInfo, error) { iterator := a.List(ctx, request) return listing.ToSlice[CatalogInfo](ctx, iterator) @@ -421,6 +439,15 @@ func (a *connectionsImpl) Get(ctx context.Context, request GetConnectionRequest) } // List all connections. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *connectionsImpl) List(ctx context.Context, request ListConnectionsRequest) listing.Iterator[ConnectionInfo] { getNextPage := func(ctx context.Context, req ListConnectionsRequest) (*ListConnectionsResponse, error) { @@ -446,6 +473,15 @@ func (a *connectionsImpl) List(ctx context.Context, request ListConnectionsReque } // List all connections. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *connectionsImpl) ListAll(ctx context.Context, request ListConnectionsRequest) ([]ConnectionInfo, error) { iterator := a.List(ctx, request) return listing.ToSlice[ConnectionInfo](ctx, iterator) @@ -805,6 +841,15 @@ func (a *externalLocationsImpl) Get(ctx context.Context, request GetExternalLoca // external location, or a user that has some privilege on the external // location. There is no guarantee of a specific ordering of the elements in the // array. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *externalLocationsImpl) List(ctx context.Context, request ListExternalLocationsRequest) listing.Iterator[ExternalLocationInfo] { getNextPage := func(ctx context.Context, req ListExternalLocationsRequest) (*ListExternalLocationsResponse, error) { @@ -834,6 +879,15 @@ func (a *externalLocationsImpl) List(ctx context.Context, request ListExternalLo // external location, or a user that has some privilege on the external // location. There is no guarantee of a specific ordering of the elements in the // array. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *externalLocationsImpl) ListAll(ctx context.Context, request ListExternalLocationsRequest) ([]ExternalLocationInfo, error) { iterator := a.List(ctx, request) return listing.ToSlice[ExternalLocationInfo](ctx, iterator) @@ -1000,6 +1054,15 @@ func (a *functionsImpl) Get(ctx context.Context, request GetFunctionRequest) (*F // functions for which either the user has the **EXECUTE** privilege or the user // is the owner. There is no guarantee of a specific ordering of the elements in // the array. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *functionsImpl) List(ctx context.Context, request ListFunctionsRequest) listing.Iterator[FunctionInfo] { getNextPage := func(ctx context.Context, req ListFunctionsRequest) (*ListFunctionsResponse, error) { @@ -1031,6 +1094,15 @@ func (a *functionsImpl) List(ctx context.Context, request ListFunctionsRequest) // functions for which either the user has the **EXECUTE** privilege or the user // is the owner. There is no guarantee of a specific ordering of the elements in // the array. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *functionsImpl) ListAll(ctx context.Context, request ListFunctionsRequest) ([]FunctionInfo, error) { iterator := a.List(ctx, request) return listing.ToSlice[FunctionInfo](ctx, iterator) @@ -1151,6 +1223,15 @@ func (a *metastoresImpl) Get(ctx context.Context, request GetMetastoreRequest) ( // Gets an array of the available metastores (as __MetastoreInfo__ objects). The // caller must be an admin to retrieve this info. There is no guarantee of a // specific ordering of the elements in the array. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *metastoresImpl) List(ctx context.Context, request ListMetastoresRequest) listing.Iterator[MetastoreInfo] { getNextPage := func(ctx context.Context, req ListMetastoresRequest) (*ListMetastoresResponse, error) { @@ -1178,6 +1259,15 @@ func (a *metastoresImpl) List(ctx context.Context, request ListMetastoresRequest // Gets an array of the available metastores (as __MetastoreInfo__ objects). The // caller must be an admin to retrieve this info. There is no guarantee of a // specific ordering of the elements in the array. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *metastoresImpl) ListAll(ctx context.Context, request ListMetastoresRequest) ([]MetastoreInfo, error) { iterator := a.List(ctx, request) return listing.ToSlice[MetastoreInfo](ctx, iterator) @@ -1836,6 +1926,15 @@ func (a *schemasImpl) Get(ctx context.Context, request GetSchemaRequest) (*Schem // catalog will be retrieved. Otherwise, only schemas owned by the caller (or // for which the caller has the **USE_SCHEMA** privilege) will be retrieved. // There is no guarantee of a specific ordering of the elements in the array. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *schemasImpl) List(ctx context.Context, request ListSchemasRequest) listing.Iterator[SchemaInfo] { getNextPage := func(ctx context.Context, req ListSchemasRequest) (*ListSchemasResponse, error) { @@ -1865,6 +1964,15 @@ func (a *schemasImpl) List(ctx context.Context, request ListSchemasRequest) list // catalog will be retrieved. Otherwise, only schemas owned by the caller (or // for which the caller has the **USE_SCHEMA** privilege) will be retrieved. // There is no guarantee of a specific ordering of the elements in the array. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *schemasImpl) ListAll(ctx context.Context, request ListSchemasRequest) ([]SchemaInfo, error) { iterator := a.List(ctx, request) return listing.ToSlice[SchemaInfo](ctx, iterator) @@ -1931,6 +2039,15 @@ func (a *storageCredentialsImpl) Get(ctx context.Context, request GetStorageCred // permission to access. If the caller is a metastore admin, retrieval of // credentials is unrestricted. There is no guarantee of a specific ordering of // the elements in the array. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *storageCredentialsImpl) List(ctx context.Context, request ListStorageCredentialsRequest) listing.Iterator[StorageCredentialInfo] { getNextPage := func(ctx context.Context, req ListStorageCredentialsRequest) (*ListStorageCredentialsResponse, error) { @@ -1960,6 +2077,15 @@ func (a *storageCredentialsImpl) List(ctx context.Context, request ListStorageCr // permission to access. If the caller is a metastore admin, retrieval of // credentials is unrestricted. There is no guarantee of a specific ordering of // the elements in the array. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *storageCredentialsImpl) ListAll(ctx context.Context, request ListStorageCredentialsRequest) ([]StorageCredentialInfo, error) { iterator := a.List(ctx, request) return listing.ToSlice[StorageCredentialInfo](ctx, iterator) @@ -2023,6 +2149,15 @@ func (a *systemSchemasImpl) Enable(ctx context.Context, request EnableRequest) e // Gets an array of system schemas for a metastore. The caller must be an // account admin or a metastore admin. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *systemSchemasImpl) List(ctx context.Context, request ListSystemSchemasRequest) listing.Iterator[SystemSchemaInfo] { getNextPage := func(ctx context.Context, req ListSystemSchemasRequest) (*ListSystemSchemasResponse, error) { @@ -2049,6 +2184,15 @@ func (a *systemSchemasImpl) List(ctx context.Context, request ListSystemSchemasR // Gets an array of system schemas for a metastore. The caller must be an // account admin or a metastore admin. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *systemSchemasImpl) ListAll(ctx context.Context, request ListSystemSchemasRequest) ([]SystemSchemaInfo, error) { iterator := a.List(ctx, request) return listing.ToSlice[SystemSchemaInfo](ctx, iterator) @@ -2140,6 +2284,15 @@ func (a *tablesImpl) Get(ctx context.Context, request GetTableRequest) (*TableIn // must also be the owner or have the **USE_CATALOG** privilege on the parent // catalog and the **USE_SCHEMA** privilege on the parent schema. There is no // guarantee of a specific ordering of the elements in the array. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *tablesImpl) List(ctx context.Context, request ListTablesRequest) listing.Iterator[TableInfo] { getNextPage := func(ctx context.Context, req ListTablesRequest) (*ListTablesResponse, error) { @@ -2170,6 +2323,15 @@ func (a *tablesImpl) List(ctx context.Context, request ListTablesRequest) listin // must also be the owner or have the **USE_CATALOG** privilege on the parent // catalog and the **USE_SCHEMA** privilege on the parent schema. There is no // guarantee of a specific ordering of the elements in the array. +// +// NOTE: we recommend using max_results=0 to use the paginated version of this +// API. Unpaginated calls will be deprecated soon. +// +// PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may +// contain zero results while still providing a next_page_token. Clients must +// continue reading pages until next_page_token is absent, which is the only +// indication that the end of results has been reached. This behavior follows +// Google AIP-158 guidelines. func (a *tablesImpl) ListAll(ctx context.Context, request ListTablesRequest) ([]TableInfo, error) { iterator := a.List(ctx, request) return listing.ToSlice[TableInfo](ctx, iterator) diff --git a/service/catalog/interface.go b/service/catalog/interface.go index 83df5b7a3..6c4d1c28b 100755 --- a/service/catalog/interface.go +++ b/service/catalog/interface.go @@ -137,6 +137,15 @@ type CatalogsService interface { // owned by the caller (or for which the caller has the **USE_CATALOG** // privilege) will be retrieved. There is no guarantee of a specific // ordering of the elements in the array. + // + // NOTE: we recommend using max_results=0 to use the paginated version of + // this API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients + // must continue reading pages until next_page_token is absent, which is the + // only indication that the end of results has been reached. This behavior + // follows Google AIP-158 guidelines. List(ctx context.Context, request ListCatalogsRequest) (*ListCatalogsResponse, error) // Updates the catalog that matches the supplied name. The caller must be @@ -174,6 +183,15 @@ type ConnectionsService interface { Get(ctx context.Context, request GetConnectionRequest) (*ConnectionInfo, error) // List all connections. + // + // NOTE: we recommend using max_results=0 to use the paginated version of + // this API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients + // must continue reading pages until next_page_token is absent, which is the + // only indication that the end of results has been reached. This behavior + // follows Google AIP-158 guidelines. List(ctx context.Context, request ListConnectionsRequest) (*ListConnectionsResponse, error) // Updates the connection that matches the supplied name. @@ -371,6 +389,15 @@ type ExternalLocationsService interface { // the external location, or a user that has some privilege on the external // location. There is no guarantee of a specific ordering of the elements in // the array. + // + // NOTE: we recommend using max_results=0 to use the paginated version of + // this API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients + // must continue reading pages until next_page_token is absent, which is the + // only indication that the end of results has been reached. This behavior + // follows Google AIP-158 guidelines. List(ctx context.Context, request ListExternalLocationsRequest) (*ListExternalLocationsResponse, error) // Updates an external location in the metastore. The caller must be the @@ -466,6 +493,15 @@ type FunctionsService interface { // list contains only functions for which either the user has the // **EXECUTE** privilege or the user is the owner. There is no guarantee of // a specific ordering of the elements in the array. + // + // NOTE: we recommend using max_results=0 to use the paginated version of + // this API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients + // must continue reading pages until next_page_token is absent, which is the + // only indication that the end of results has been reached. This behavior + // follows Google AIP-158 guidelines. List(ctx context.Context, request ListFunctionsRequest) (*ListFunctionsResponse, error) // Updates the function that matches the supplied name. Only the owner of @@ -550,6 +586,15 @@ type MetastoresService interface { // Gets an array of the available metastores (as __MetastoreInfo__ objects). // The caller must be an admin to retrieve this info. There is no guarantee // of a specific ordering of the elements in the array. + // + // NOTE: we recommend using max_results=0 to use the paginated version of + // this API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients + // must continue reading pages until next_page_token is absent, which is the + // only indication that the end of results has been reached. This behavior + // follows Google AIP-158 guidelines. List(ctx context.Context, request ListMetastoresRequest) (*ListMetastoresResponse, error) // Gets information about a metastore. This summary includes the storage @@ -1018,6 +1063,15 @@ type SchemasService interface { // caller (or for which the caller has the **USE_SCHEMA** privilege) will be // retrieved. There is no guarantee of a specific ordering of the elements // in the array. + // + // NOTE: we recommend using max_results=0 to use the paginated version of + // this API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients + // must continue reading pages until next_page_token is absent, which is the + // only indication that the end of results has been reached. This behavior + // follows Google AIP-158 guidelines. List(ctx context.Context, request ListSchemasRequest) (*ListSchemasResponse, error) // Updates a schema for a catalog. The caller must be the owner of the @@ -1065,6 +1119,15 @@ type StorageCredentialsService interface { // caller has permission to access. If the caller is a metastore admin, // retrieval of credentials is unrestricted. There is no guarantee of a // specific ordering of the elements in the array. + // + // NOTE: we recommend using max_results=0 to use the paginated version of + // this API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients + // must continue reading pages until next_page_token is absent, which is the + // only indication that the end of results has been reached. This behavior + // follows Google AIP-158 guidelines. List(ctx context.Context, request ListStorageCredentialsRequest) (*ListStorageCredentialsResponse, error) // Updates a storage credential on the metastore. @@ -1107,6 +1170,15 @@ type SystemSchemasService interface { // Gets an array of system schemas for a metastore. The caller must be an // account admin or a metastore admin. + // + // NOTE: we recommend using max_results=0 to use the paginated version of + // this API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients + // must continue reading pages until next_page_token is absent, which is the + // only indication that the end of results has been reached. This behavior + // follows Google AIP-158 guidelines. List(ctx context.Context, request ListSystemSchemasRequest) (*ListSystemSchemasResponse, error) } @@ -1227,6 +1299,15 @@ type TablesService interface { // the parent catalog and the **USE_SCHEMA** privilege on the parent schema. // There is no guarantee of a specific ordering of the elements in the // array. + // + // NOTE: we recommend using max_results=0 to use the paginated version of + // this API. Unpaginated calls will be deprecated soon. + // + // PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may + // contain zero results while still providing a next_page_token. Clients + // must continue reading pages until next_page_token is absent, which is the + // only indication that the end of results has been reached. This behavior + // follows Google AIP-158 guidelines. List(ctx context.Context, request ListTablesRequest) (*ListTablesResponse, error) // Gets an array of summaries for tables for a schema and catalog within the diff --git a/service/catalog/model.go b/service/catalog/model.go index 2c3e67236..a5468c58a 100755 --- a/service/catalog/model.go +++ b/service/catalog/model.go @@ -8546,9 +8546,12 @@ type UpdateWorkspaceBindings struct { } type UpdateWorkspaceBindingsParameters struct { - // List of workspace bindings. + // List of workspace bindings to add. If a binding for the workspace already + // exists with a different binding_type, adding it again with a new + // binding_type will update the existing binding (e.g., from READ_WRITE to + // READ_ONLY). Add []WorkspaceBinding `json:"add,omitempty"` - // List of workspace bindings. + // List of workspace bindings to remove. Remove []WorkspaceBinding `json:"remove,omitempty"` // The name of the securable. SecurableName string `json:"-" url:"-"` diff --git a/service/compute/model.go b/service/compute/model.go index 505ba835c..2dbf4d5ed 100755 --- a/service/compute/model.go +++ b/service/compute/model.go @@ -5144,9 +5144,17 @@ type Results struct { Cause string `json:"cause,omitempty"` Data any `json:"data,omitempty"` - // The image filename + // The image data in one of the following formats: + // + // 1. A Data URL with base64-encoded image data: + // `data:image/{type};base64,{base64-data}`. Example: + // `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...` + // + // 2. A FileStore file path for large images: `/plots/{filename}.png`. + // Example: `/plots/b6a7ad70-fb2c-4353-8aed-3f1e015174a4.png` FileName string `json:"fileName,omitempty"` - + // List of image data for multiple images. Each element follows the same + // format as file_name. FileNames []string `json:"fileNames,omitempty"` // true if a JSON schema is returned instead of a string representation of // the Hive type. diff --git a/service/dataquality/model.go b/service/dataquality/model.go index e9eaf201f..b4bac2ecb 100755 --- a/service/dataquality/model.go +++ b/service/dataquality/model.go @@ -79,8 +79,8 @@ type AnomalyDetectionConfig struct { type CancelRefreshRequest struct { // The UUID of the request object. For example, schema id. ObjectId string `json:"-" url:"-"` - // The type of the monitored object. Can be one of the following: schema or - // table. + // The type of the monitored object. Can be one of the following: `schema` + // or `table`. ObjectType string `json:"-" url:"-"` // Unique id of the refresh operation. RefreshId int64 `json:"-" url:"-"` @@ -100,7 +100,8 @@ type CreateMonitorRequest struct { type CreateRefreshRequest struct { // The UUID of the request object. For example, table id. ObjectId string `json:"-" url:"-"` - // The type of the monitored object. Can be one of the following: table. + // The type of the monitored object. Can be one of the following: `schema`or + // `table`. ObjectType string `json:"-" url:"-"` // The refresh to create Refresh Refresh `json:"refresh"` @@ -342,16 +343,16 @@ func (f *DataProfilingStatus) Type() string { type DeleteMonitorRequest struct { // The UUID of the request object. For example, schema id. ObjectId string `json:"-" url:"-"` - // The type of the monitored object. Can be one of the following: schema or - // table. + // The type of the monitored object. Can be one of the following: `schema` + // or `table`. ObjectType string `json:"-" url:"-"` } type DeleteRefreshRequest struct { // The UUID of the request object. For example, schema id. ObjectId string `json:"-" url:"-"` - // The type of the monitored object. Can be one of the following: schema or - // table. + // The type of the monitored object. Can be one of the following: `schema` + // or `table`. ObjectType string `json:"-" url:"-"` // Unique id of the refresh operation. RefreshId int64 `json:"-" url:"-"` @@ -360,16 +361,16 @@ type DeleteRefreshRequest struct { type GetMonitorRequest struct { // The UUID of the request object. For example, schema id. ObjectId string `json:"-" url:"-"` - // The type of the monitored object. Can be one of the following: schema or - // table. + // The type of the monitored object. Can be one of the following: `schema` + // or `table`. ObjectType string `json:"-" url:"-"` } type GetRefreshRequest struct { // The UUID of the request object. For example, schema id. ObjectId string `json:"-" url:"-"` - // The type of the monitored object. Can be one of the following: schema or - // table. + // The type of the monitored object. Can be one of the following: `schema` + // or `table`. ObjectType string `json:"-" url:"-"` // Unique id of the refresh operation. RefreshId int64 `json:"-" url:"-"` @@ -386,8 +387,6 @@ type InferenceLogConfig struct { ModelIdColumn string `json:"model_id_column"` // Column for the prediction. PredictionColumn string `json:"prediction_column"` - // Column for prediction probabilities - PredictionProbabilityColumn string `json:"prediction_probability_column,omitempty"` // Problem type the model aims to solve. ProblemType InferenceProblemType `json:"problem_type"` // Column for the timestamp. @@ -478,8 +477,8 @@ func (s ListMonitorResponse) MarshalJSON() ([]byte, error) { type ListRefreshRequest struct { // The UUID of the request object. For example, schema id. ObjectId string `json:"-" url:"-"` - // The type of the monitored object. Can be one of the following: schema or - // table. + // The type of the monitored object. Can be one of the following: `schema` + // or `table`. ObjectType string `json:"-" url:"-"` PageSize int `json:"-" url:"page_size,omitempty"` @@ -523,8 +522,8 @@ type Monitor struct { DataProfilingConfig *DataProfilingConfig `json:"data_profiling_config,omitempty"` // The UUID of the request object. For example, schema id. ObjectId string `json:"object_id"` - // The type of the monitored object. Can be one of the following: schema or - // table. + // The type of the monitored object. Can be one of the following: `schema` + // or `table`. ObjectType string `json:"object_type"` } @@ -551,7 +550,8 @@ type Refresh struct { Message string `json:"message,omitempty"` // The UUID of the request object. For example, table id. ObjectId string `json:"object_id"` - // The type of the monitored object. Can be one of the following: table. + // The type of the monitored object. Can be one of the following: `schema`or + // `table`. ObjectType string `json:"object_type"` // Unique id of the refresh operation. RefreshId int64 `json:"refresh_id,omitempty"` @@ -685,18 +685,20 @@ type UpdateMonitorRequest struct { Monitor Monitor `json:"monitor"` // The UUID of the request object. For example, schema id. ObjectId string `json:"-" url:"-"` - // The type of the monitored object. Can be one of the following: schema or - // table. + // The type of the monitored object. Can be one of the following: `schema` + // or `table`. ObjectType string `json:"-" url:"-"` - // The field mask to specify which fields to update. + // The field mask to specify which fields to update as a comma-separated + // list. Example value: + // `data_profiling_config.custom_metrics,data_profiling_config.schedule.quartz_cron_expression` UpdateMask string `json:"-" url:"update_mask"` } type UpdateRefreshRequest struct { // The UUID of the request object. For example, schema id. ObjectId string `json:"-" url:"-"` - // The type of the monitored object. Can be one of the following: schema or - // table. + // The type of the monitored object. Can be one of the following: `schema` + // or `table`. ObjectType string `json:"-" url:"-"` // The refresh to update. Refresh Refresh `json:"refresh"` diff --git a/service/jobs/model.go b/service/jobs/model.go index a627fa7ab..64f3e7591 100755 --- a/service/jobs/model.go +++ b/service/jobs/model.go @@ -5178,8 +5178,8 @@ type TableUpdateTriggerConfiguration struct { // has passed since the last time the trigger fired. The minimum allowed // value is 60 seconds. MinTimeBetweenTriggersSeconds int `json:"min_time_between_triggers_seconds,omitempty"` - // A list of Delta tables to monitor for changes. The table name must be in - // the format `catalog_name.schema_name.table_name`. + // A list of tables to monitor for changes. The table name must be in the + // format `catalog_name.schema_name.table_name`. TableNames []string `json:"table_names,omitempty"` // If set, the trigger starts a run only after no table updates have // occurred for the specified time and can be used to wait for a series of diff --git a/service/pkg.go b/service/pkg.go index 96e82b61c..9b190ca93 100644 --- a/service/pkg.go +++ b/service/pkg.go @@ -420,8 +420,8 @@ var ( _ *marketplace.ConsumerListingsAPI = nil _ *marketplace.ConsumerPersonalizationRequestsAPI = nil _ *marketplace.ConsumerProvidersAPI = nil - _ *catalog.CredentialsAPI = nil _ *provisioning.CredentialsAPI = nil + _ *catalog.CredentialsAPI = nil _ *settings.CredentialsManagerAPI = nil _ *settings.CspEnablementAccountAPI = nil _ *iam.CurrentUserAPI = nil diff --git a/service/provisioning/model.go b/service/provisioning/model.go index 22fd88570..3acbbb0d1 100755 --- a/service/provisioning/model.go +++ b/service/provisioning/model.go @@ -266,6 +266,14 @@ type CreateWorkspaceRequest struct { Cloud string `json:"cloud,omitempty"` CloudResourceContainer *CloudResourceContainer `json:"cloud_resource_container,omitempty"` + // If the compute mode is `SERVERLESS`, a serverless workspace is created + // that comes pre-configured with serverless compute and default storage, + // providing a fully-managed, enterprise-ready SaaS experience. This means + // you don't need to provide any resources managed by you, such as + // credentials, storage, or network. If the compute mode is `HYBRID` (which + // is the default option), a classic workspace is created that uses + // customer-managed resources. + ComputeMode CustomerFacingComputeMode `json:"compute_mode,omitempty"` // ID of the workspace's credential configuration object. CredentialsId string `json:"credentials_id,omitempty"` // The custom tags key-value pairing that is attached to this workspace. The @@ -1310,6 +1318,10 @@ type Workspace struct { CustomTags map[string]string `json:"custom_tags,omitempty"` DeploymentName string `json:"deployment_name,omitempty"` + // A client owned field used to indicate the workspace status that the + // client expects to be in. For now this is only used to unblock Temporal + // workflow for GCP least privileged workspace. + ExpectedWorkspaceStatus WorkspaceStatus `json:"expected_workspace_status,omitempty"` GcpManagedNetworkConfig *GcpManagedNetworkConfig `json:"gcp_managed_network_config,omitempty"` diff --git a/service/settings/model.go b/service/settings/model.go index bce586b03..1f32318a8 100755 --- a/service/settings/model.go +++ b/service/settings/model.go @@ -442,6 +442,8 @@ const ComplianceStandardFedrampModerate ComplianceStandard = `FEDRAMP_MODERATE` const ComplianceStandardGermanyC5 ComplianceStandard = `GERMANY_C5` +const ComplianceStandardGermanyTisax ComplianceStandard = `GERMANY_TISAX` + const ComplianceStandardHipaa ComplianceStandard = `HIPAA` const ComplianceStandardHitrust ComplianceStandard = `HITRUST` @@ -466,11 +468,11 @@ func (f *ComplianceStandard) String() string { // Set raw string value and validate it against allowed values func (f *ComplianceStandard) Set(v string) error { switch v { - case `CANADA_PROTECTED_B`, `CYBER_ESSENTIAL_PLUS`, `FEDRAMP_HIGH`, `FEDRAMP_IL5`, `FEDRAMP_MODERATE`, `GERMANY_C5`, `HIPAA`, `HITRUST`, `IRAP_PROTECTED`, `ISMAP`, `ITAR_EAR`, `K_FSI`, `NONE`, `PCI_DSS`: + case `CANADA_PROTECTED_B`, `CYBER_ESSENTIAL_PLUS`, `FEDRAMP_HIGH`, `FEDRAMP_IL5`, `FEDRAMP_MODERATE`, `GERMANY_C5`, `GERMANY_TISAX`, `HIPAA`, `HITRUST`, `IRAP_PROTECTED`, `ISMAP`, `ITAR_EAR`, `K_FSI`, `NONE`, `PCI_DSS`: *f = ComplianceStandard(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "CANADA_PROTECTED_B", "CYBER_ESSENTIAL_PLUS", "FEDRAMP_HIGH", "FEDRAMP_IL5", "FEDRAMP_MODERATE", "GERMANY_C5", "HIPAA", "HITRUST", "IRAP_PROTECTED", "ISMAP", "ITAR_EAR", "K_FSI", "NONE", "PCI_DSS"`, v) + return fmt.Errorf(`value "%s" is not one of "CANADA_PROTECTED_B", "CYBER_ESSENTIAL_PLUS", "FEDRAMP_HIGH", "FEDRAMP_IL5", "FEDRAMP_MODERATE", "GERMANY_C5", "GERMANY_TISAX", "HIPAA", "HITRUST", "IRAP_PROTECTED", "ISMAP", "ITAR_EAR", "K_FSI", "NONE", "PCI_DSS"`, v) } } @@ -485,6 +487,7 @@ func (f *ComplianceStandard) Values() []ComplianceStandard { ComplianceStandardFedrampIl5, ComplianceStandardFedrampModerate, ComplianceStandardGermanyC5, + ComplianceStandardGermanyTisax, ComplianceStandardHipaa, ComplianceStandardHitrust, ComplianceStandardIrapProtected, diff --git a/service/sharing/model.go b/service/sharing/model.go index 9d3b9d1f9..cf3023ab2 100755 --- a/service/sharing/model.go +++ b/service/sharing/model.go @@ -1816,6 +1816,9 @@ func (s Table) MarshalJSON() ([]byte, error) { type TableInternalAttributes struct { // Managed Delta Metadata location for foreign iceberg tables. AuxiliaryManagedLocation string `json:"auxiliary_managed_location,omitempty"` + // Storage locations of all table dependencies for shared views. Used on the + // recipient side for SEG (Secure Egress Gateway) whitelisting. + DependencyStorageLocations []string `json:"dependency_storage_locations,omitempty"` // Will be populated in the reconciliation response for VIEW and // FOREIGN_TABLE, with the value of the parent UC entity's storage_location, // following the same logic as getManagedEntityPath in diff --git a/service/workspace/model.go b/service/workspace/model.go index e5f15db8d..e31212d0a 100755 --- a/service/workspace/model.go +++ b/service/workspace/model.go @@ -69,18 +69,22 @@ type AzureKeyVaultSecretScopeMetadata struct { } type CreateCredentialsRequest struct { + // The authenticating email associated with your Git provider user account. + // Used for authentication with the remote repository and also sets the + // author & committer identity for commits. Required for most Git providers + // except AWS CodeCommit. Learn more at + // https://docs.databricks.com/aws/en/repos/get-access-tokens-from-git-provider + GitEmail string `json:"git_email,omitempty"` // Git provider. This field is case-insensitive. The available Git providers // are `gitHub`, `bitbucketCloud`, `gitLab`, `azureDevOpsServices`, // `gitHubEnterprise`, `bitbucketServer`, `gitLabEnterpriseEdition` and // `awsCodeCommit`. GitProvider string `json:"git_provider"` - // The username or email provided with your Git provider account, depending - // on which provider you are using. For GitHub, GitHub Enterprise Server, or - // Azure DevOps Services, either email or username may be used. For GitLab, - // GitLab Enterprise Edition, email must be used. For AWS CodeCommit, - // BitBucket or BitBucket Server, username must be used. For all other - // providers please see your provider's Personal Access Token authentication - // documentation to see what is supported. + // The username provided with your Git provider account and associated with + // the credential. For most Git providers it is only used to set the Git + // committer & author names for commits, however it may be required for + // authentication depending on your Git provider / token requirements. + // Required for AWS CodeCommit. GitUsername string `json:"git_username,omitempty"` // if the credential is the default for the given provider IsDefaultForProvider bool `json:"is_default_for_provider,omitempty"` @@ -108,10 +112,19 @@ func (s CreateCredentialsRequest) MarshalJSON() ([]byte, error) { type CreateCredentialsResponse struct { // ID of the credential object in the workspace. CredentialId int64 `json:"credential_id"` + // The authenticating email associated with your Git provider user account. + // Used for authentication with the remote repository and also sets the + // author & committer identity for commits. Required for most Git providers + // except AWS CodeCommit. Learn more at + // https://docs.databricks.com/aws/en/repos/get-access-tokens-from-git-provider + GitEmail string `json:"git_email,omitempty"` // The Git provider associated with the credential. GitProvider string `json:"git_provider"` - // The username or email provided with your Git provider account and - // associated with the credential. + // The username provided with your Git provider account and associated with + // the credential. For most Git providers it is only used to set the Git + // committer & author names for commits, however it may be required for + // authentication depending on your Git provider / token requirements. + // Required for AWS CodeCommit. GitUsername string `json:"git_username,omitempty"` // if the credential is the default for the given provider IsDefaultForProvider bool `json:"is_default_for_provider,omitempty"` @@ -211,10 +224,19 @@ func (s CreateScope) MarshalJSON() ([]byte, error) { type CredentialInfo struct { // ID of the credential object in the workspace. CredentialId int64 `json:"credential_id"` + // The authenticating email associated with your Git provider user account. + // Used for authentication with the remote repository and also sets the + // author & committer identity for commits. Required for most Git providers + // except AWS CodeCommit. Learn more at + // https://docs.databricks.com/aws/en/repos/get-access-tokens-from-git-provider + GitEmail string `json:"git_email,omitempty"` // The Git provider associated with the credential. GitProvider string `json:"git_provider,omitempty"` - // The username or email provided with your Git provider account and - // associated with the credential. + // The username provided with your Git provider account and associated with + // the credential. For most Git providers it is only used to set the Git + // committer & author names for commits, however it may be required for + // authentication depending on your Git provider / token requirements. + // Required for AWS CodeCommit. GitUsername string `json:"git_username,omitempty"` // if the credential is the default for the given provider IsDefaultForProvider bool `json:"is_default_for_provider,omitempty"` @@ -391,10 +413,19 @@ type GetCredentialsRequest struct { type GetCredentialsResponse struct { // ID of the credential object in the workspace. CredentialId int64 `json:"credential_id"` + // The authenticating email associated with your Git provider user account. + // Used for authentication with the remote repository and also sets the + // author & committer identity for commits. Required for most Git providers + // except AWS CodeCommit. Learn more at + // https://docs.databricks.com/aws/en/repos/get-access-tokens-from-git-provider + GitEmail string `json:"git_email,omitempty"` // The Git provider associated with the credential. GitProvider string `json:"git_provider,omitempty"` - // The username or email provided with your Git provider account and - // associated with the credential. + // The username provided with your Git provider account and associated with + // the credential. For most Git providers it is only used to set the Git + // committer & author names for commits, however it may be required for + // authentication depending on your Git provider / token requirements. + // Required for AWS CodeCommit. GitUsername string `json:"git_username,omitempty"` // if the credential is the default for the given provider IsDefaultForProvider bool `json:"is_default_for_provider,omitempty"` @@ -1138,18 +1169,22 @@ type SparseCheckoutUpdate struct { type UpdateCredentialsRequest struct { // The ID for the corresponding credential to access. CredentialId int64 `json:"-" url:"-"` + // The authenticating email associated with your Git provider user account. + // Used for authentication with the remote repository and also sets the + // author & committer identity for commits. Required for most Git providers + // except AWS CodeCommit. Learn more at + // https://docs.databricks.com/aws/en/repos/get-access-tokens-from-git-provider + GitEmail string `json:"git_email,omitempty"` // Git provider. This field is case-insensitive. The available Git providers // are `gitHub`, `bitbucketCloud`, `gitLab`, `azureDevOpsServices`, // `gitHubEnterprise`, `bitbucketServer`, `gitLabEnterpriseEdition` and // `awsCodeCommit`. GitProvider string `json:"git_provider"` - // The username or email provided with your Git provider account, depending - // on which provider you are using. For GitHub, GitHub Enterprise Server, or - // Azure DevOps Services, either email or username may be used. For GitLab, - // GitLab Enterprise Edition, email must be used. For AWS CodeCommit, - // BitBucket or BitBucket Server, username must be used. For all other - // providers please see your provider's Personal Access Token authentication - // documentation to see what is supported. + // The username provided with your Git provider account and associated with + // the credential. For most Git providers it is only used to set the Git + // committer & author names for commits, however it may be required for + // authentication depending on your Git provider / token requirements. + // Required for AWS CodeCommit. GitUsername string `json:"git_username,omitempty"` // if the credential is the default for the given provider IsDefaultForProvider bool `json:"is_default_for_provider,omitempty"` From b88ecb4937954ee8919ccee46a112a3268737d08 Mon Sep 17 00:00:00 2001 From: Divyansh Vijayvergia Date: Fri, 10 Oct 2025 09:40:10 +0000 Subject: [PATCH 2/3] updates --- .codegen/_openapi_sha | 2 +- NEXT_CHANGELOG.md | 2 +- service/pkg.go | 2 +- service/settings/model.go | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index b3c04c8c9..20842dced 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -2fa40d5ca4a9883216731c4e2c398c94bb3e0556 \ No newline at end of file +c4784cea599325a13472b1455e7434d639362d8b \ No newline at end of file diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 911a8cb3e..c8edcb697 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -104,4 +104,4 @@ * Add `GitEmail` field for [workspace.GetCredentialsResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/workspace#GetCredentialsResponse). * Add `GitEmail` field for [workspace.UpdateCredentialsRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/workspace#UpdateCredentialsRequest). * Add `GermanyTisax` enum value for [settings.ComplianceStandard](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#ComplianceStandard). -* [Breaking] Remove `PredictionProbabilityColumn` field for [dataquality.InferenceLogConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dataquality#InferenceLogConfig). \ No newline at end of file +* [Breaking] Remove `PredictionProbabilityColumn` field for [dataquality.InferenceLogConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dataquality#InferenceLogConfig). diff --git a/service/pkg.go b/service/pkg.go index 9b190ca93..96e82b61c 100644 --- a/service/pkg.go +++ b/service/pkg.go @@ -420,8 +420,8 @@ var ( _ *marketplace.ConsumerListingsAPI = nil _ *marketplace.ConsumerPersonalizationRequestsAPI = nil _ *marketplace.ConsumerProvidersAPI = nil - _ *provisioning.CredentialsAPI = nil _ *catalog.CredentialsAPI = nil + _ *provisioning.CredentialsAPI = nil _ *settings.CredentialsManagerAPI = nil _ *settings.CspEnablementAccountAPI = nil _ *iam.CurrentUserAPI = nil diff --git a/service/settings/model.go b/service/settings/model.go index 1f32318a8..e4693938b 100755 --- a/service/settings/model.go +++ b/service/settings/model.go @@ -427,7 +427,8 @@ func (s ComplianceSecurityProfileSetting) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -// Compliance stardard for SHIELD customers +// Compliance standard for SHIELD customers. See README.md for how instructions +// of how to add new standards. type ComplianceStandard string const ComplianceStandardCanadaProtectedB ComplianceStandard = `CANADA_PROTECTED_B` From 6219e2011b4d72c554eb5076e151fb7ae08b0e5c Mon Sep 17 00:00:00 2001 From: Divyansh Vijayvergia Date: Fri, 10 Oct 2025 09:49:45 +0000 Subject: [PATCH 3/3] updates --- .gitattributes | 3 - internal/generatedtests/lro_call_test.go | 31 +- internal/testspecs/service/lrotesting/api.go | 5 +- internal/testspecs/service/lrotesting/impl.go | 9 +- .../testspecs/service/lrotesting/model.go | 350 ++++++++++++++++++ service/pkg.go | 4 +- 6 files changed, 373 insertions(+), 29 deletions(-) diff --git a/.gitattributes b/.gitattributes index b232fc9ec..3f53f15f5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -189,9 +189,6 @@ experimental/mocks/service/workspace/mock_workspace_interface.go linguist-genera internal/generatedtests/http_call_test.go linguist-generated=true internal/generatedtests/json_marshall_test.go linguist-generated=true internal/generatedtests/lro_call_test.go linguist-generated=true -internal/testspecs/service/common/api.go linguist-generated=true -internal/testspecs/service/common/impl.go linguist-generated=true -internal/testspecs/service/common/model.go linguist-generated=true internal/testspecs/service/httpcallv2/api.go linguist-generated=true internal/testspecs/service/httpcallv2/impl.go linguist-generated=true internal/testspecs/service/httpcallv2/model.go linguist-generated=true diff --git a/internal/generatedtests/lro_call_test.go b/internal/generatedtests/lro_call_test.go index dfa757db9..1d5e0d9ea 100755 --- a/internal/generatedtests/lro_call_test.go +++ b/internal/generatedtests/lro_call_test.go @@ -8,7 +8,6 @@ import ( "time" "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/internal/testspecs/service/common" "github.com/databricks/databricks-sdk-go/internal/testspecs/service/lrotesting" "github.com/databricks/databricks-sdk-go/qa" "github.com/databricks/databricks-sdk-go/service/common/lro" @@ -29,7 +28,7 @@ func TestLRO_CreateTestResource_Wait(t *testing.T) { fixtures: qa.HTTPFixtures{{ Method: "POST", Resource: "/api/2.0/lro-testing/resources", - Response: common.Operation{ + Response: lrotesting.Operation{ Done: false, Metadata: json.RawMessage("{\n\t\t\t\t\t\"resource_id\": \"test-resource-123\",\n\t\t\t\t\t\"progress_percent\": 5\n\t\t\t\t}"), Name: "operations/test-resource-create-12345", @@ -37,7 +36,7 @@ func TestLRO_CreateTestResource_Wait(t *testing.T) { }, { Method: "GET", Resource: "/api/2.0/lro-testing/operations/operations/test-resource-create-12345?", - Response: common.Operation{ + Response: lrotesting.Operation{ Done: false, Metadata: json.RawMessage("{\n\t\t\t\t\t\"resource_id\": \"test-resource-123\",\n\t\t\t\t\t\"progress_percent\": 75\n\t\t\t\t}"), Name: "operations/test-resource-create-12345", @@ -45,7 +44,7 @@ func TestLRO_CreateTestResource_Wait(t *testing.T) { }, { Method: "GET", Resource: "/api/2.0/lro-testing/operations/operations/test-resource-create-12345?", - Response: common.Operation{ + Response: lrotesting.Operation{ Done: true, Metadata: json.RawMessage("{\n\t\t\t\t\t\"resource_id\": \"test-resource-123\",\n\t\t\t\t\t\"progress_percent\": 100\n\t\t\t\t}"), Name: "operations/test-resource-create-12345", @@ -64,7 +63,7 @@ func TestLRO_CreateTestResource_Wait(t *testing.T) { fixtures: qa.HTTPFixtures{{ Method: "POST", Resource: "/api/2.0/lro-testing/resources", - Response: common.Operation{ + Response: lrotesting.Operation{ Done: false, Metadata: json.RawMessage("{\n\t\t\t\t\t\"resource_id\": \"test-resource-123\",\n\t\t\t\t\t\"progress_percent\": 5\n\t\t\t\t}"), Name: "operations/test-resource-create-12345", @@ -72,10 +71,10 @@ func TestLRO_CreateTestResource_Wait(t *testing.T) { }, { Method: "GET", Resource: "/api/2.0/lro-testing/operations/operations/test-resource-create-12345?", - Response: common.Operation{ + Response: lrotesting.Operation{ Done: true, - Error: &common.DatabricksServiceExceptionWithDetailsProto{ - ErrorCode: common.ErrorCodeInternalError, + Error: &lrotesting.DatabricksServiceExceptionWithDetailsProto{ + ErrorCode: lrotesting.ErrorCodeInternalError, Message: "Test error message", }, Name: "operations/test-resource-create-12345", @@ -122,7 +121,7 @@ func TestLRO_CancelTestResource_Cancel(t *testing.T) { fixtures: qa.HTTPFixtures{{ Method: "POST", Resource: "/api/2.0/lro-testing/resources", - Response: common.Operation{ + Response: lrotesting.Operation{ Done: false, Metadata: json.RawMessage("{\n\t\t\t\t\t\"resource_id\": \"test-resource-123\",\n\t\t\t\t\t\"progress_percent\": 5\n\t\t\t\t}"), Name: "operations/test-resource-create-12345", @@ -130,7 +129,7 @@ func TestLRO_CancelTestResource_Cancel(t *testing.T) { }, { Method: "POST", Resource: "/api/2.0/lro-testing/operations/operations/test-resource-create-12345/cancel", - Response: common.Operation{ + Response: lrotesting.Operation{ Done: true, Name: "operations/test-resource-create-12345", }, @@ -171,7 +170,7 @@ func TestLRO_CreateTestResource_Name(t *testing.T) { fixtures: qa.HTTPFixtures{{ Method: "POST", Resource: "/api/2.0/lro-testing/resources", - Response: common.Operation{ + Response: lrotesting.Operation{ Done: false, Metadata: json.RawMessage("{\n\t\t\t\t\t\"resource_id\": \"test-resource-123\",\n\t\t\t\t\t\"progress_percent\": 5\n\t\t\t\t}"), Name: "operations/test-resource-create-12345", @@ -211,7 +210,7 @@ func TestLRO_CreateTestResource_Metadata(t *testing.T) { fixtures: qa.HTTPFixtures{{ Method: "POST", Resource: "/api/2.0/lro-testing/resources", - Response: common.Operation{ + Response: lrotesting.Operation{ Done: false, Metadata: json.RawMessage("{\n\t\t\t\t\t\"resource_id\": \"test-resource-123\",\n\t\t\t\t\t\"progress_percent\": 5\n\t\t\t\t}"), Name: "operations/test-resource-create-12345", @@ -261,7 +260,7 @@ func TestLRO_CreateTestResource_Done(t *testing.T) { fixtures: qa.HTTPFixtures{{ Method: "POST", Resource: "/api/2.0/lro-testing/resources", - Response: common.Operation{ + Response: lrotesting.Operation{ Done: false, Metadata: json.RawMessage("{\n\t\t\t\t\t\"resource_id\": \"test-resource-123\",\n\t\t\t\t\t\"progress_percent\": 5\n\t\t\t\t}"), Name: "operations/test-resource-create-12345", @@ -269,7 +268,7 @@ func TestLRO_CreateTestResource_Done(t *testing.T) { }, { Method: "GET", Resource: "/api/2.0/lro-testing/operations/operations/test-resource-create-12345?", - Response: common.Operation{ + Response: lrotesting.Operation{ Done: true, Metadata: json.RawMessage("{\n\t\t\t\t\t\"resource_id\": \"test-resource-123\",\n\t\t\t\t\t\"progress_percent\": 100\n\t\t\t\t}"), Name: "operations/test-resource-create-12345", @@ -285,7 +284,7 @@ func TestLRO_CreateTestResource_Done(t *testing.T) { fixtures: qa.HTTPFixtures{{ Method: "POST", Resource: "/api/2.0/lro-testing/resources", - Response: common.Operation{ + Response: lrotesting.Operation{ Done: false, Metadata: json.RawMessage("{\n\t\t\t\t\t\"resource_id\": \"test-resource-123\",\n\t\t\t\t\t\"progress_percent\": 5\n\t\t\t\t}"), Name: "operations/test-resource-create-12345", @@ -293,7 +292,7 @@ func TestLRO_CreateTestResource_Done(t *testing.T) { }, { Method: "GET", Resource: "/api/2.0/lro-testing/operations/operations/test-resource-create-12345?", - Response: common.Operation{ + Response: lrotesting.Operation{ Done: false, Metadata: json.RawMessage("{\n\t\t\t\t\t\"resource_id\": \"test-resource-123\",\n\t\t\t\t\t\"progress_percent\": 75\n\t\t\t\t}"), Name: "operations/test-resource-create-12345", diff --git a/internal/testspecs/service/lrotesting/api.go b/internal/testspecs/service/lrotesting/api.go index 4fbcc6e13..4b6fb3839 100755 --- a/internal/testspecs/service/lrotesting/api.go +++ b/internal/testspecs/service/lrotesting/api.go @@ -11,7 +11,6 @@ import ( "github.com/databricks/databricks-sdk-go/client" "github.com/databricks/databricks-sdk-go/retries" - "github.com/databricks/databricks-sdk-go/service/common" "github.com/databricks/databricks-sdk-go/service/common/lro" "github.com/databricks/databricks-sdk-go/useragent" ) @@ -21,7 +20,7 @@ type LroTestingInterface interface { CreateTestResource(ctx context.Context, request CreateTestResourceRequest) (*CreateTestResourceOperation, error) - GetOperation(ctx context.Context, request GetOperationRequest) (*common.Operation, error) + GetOperation(ctx context.Context, request GetOperationRequest) (*Operation, error) // Simple method to get test resource GetTestResource(ctx context.Context, request GetTestResourceRequest) (*TestResource, error) @@ -53,7 +52,7 @@ func (a *LroTestingAPI) CreateTestResource(ctx context.Context, request CreateTe type CreateTestResourceOperation struct { impl *lroTestingImpl - operation *common.Operation + operation *Operation } // Wait blocks until the long-running operation is completed with default 20 min diff --git a/internal/testspecs/service/lrotesting/impl.go b/internal/testspecs/service/lrotesting/impl.go index 36386b225..28ca322d2 100755 --- a/internal/testspecs/service/lrotesting/impl.go +++ b/internal/testspecs/service/lrotesting/impl.go @@ -8,7 +8,6 @@ import ( "net/http" "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/service/common" ) // unexported type that holds implementations of just LroTesting API methods @@ -25,8 +24,8 @@ func (a *lroTestingImpl) CancelOperation(ctx context.Context, request CancelOper return err } -func (a *lroTestingImpl) CreateTestResource(ctx context.Context, request CreateTestResourceRequest) (*common.Operation, error) { - var operation common.Operation +func (a *lroTestingImpl) CreateTestResource(ctx context.Context, request CreateTestResourceRequest) (*Operation, error) { + var operation Operation path := "/api/2.0/lro-testing/resources" queryParams := make(map[string]any) headers := make(map[string]string) @@ -36,8 +35,8 @@ func (a *lroTestingImpl) CreateTestResource(ctx context.Context, request CreateT return &operation, err } -func (a *lroTestingImpl) GetOperation(ctx context.Context, request GetOperationRequest) (*common.Operation, error) { - var operation common.Operation +func (a *lroTestingImpl) GetOperation(ctx context.Context, request GetOperationRequest) (*Operation, error) { + var operation Operation path := fmt.Sprintf("/api/2.0/lro-testing/operations/%v", request.Name) queryParams := make(map[string]any) headers := make(map[string]string) diff --git a/internal/testspecs/service/lrotesting/model.go b/internal/testspecs/service/lrotesting/model.go index f111e7c3c..2f8fdba19 100755 --- a/internal/testspecs/service/lrotesting/model.go +++ b/internal/testspecs/service/lrotesting/model.go @@ -3,6 +3,9 @@ package lrotesting import ( + "encoding/json" + "fmt" + "github.com/databricks/databricks-sdk-go/marshal" ) @@ -16,6 +19,311 @@ type CreateTestResourceRequest struct { Resource TestResource `json:"resource"` } +// Serialization format for DatabricksServiceException with error details. This +// message doesn't work for ScalaPB-04 as google.protobuf.Any is only available +// to ScalaPB-09. Note the definition of this message should be in sync with +// DatabricksServiceExceptionProto defined in +// /api-base/proto/legacy/databricks.proto except the later one doesn't have the +// error details field defined. +type DatabricksServiceExceptionWithDetailsProto struct { + // @pbjson-skip + Details []json.RawMessage `json:"details,omitempty"` + + ErrorCode ErrorCode `json:"error_code,omitempty"` + + Message string `json:"message,omitempty"` + + StackTrace string `json:"stack_trace,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *DatabricksServiceExceptionWithDetailsProto) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s DatabricksServiceExceptionWithDetailsProto) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +// Legacy definition of the ErrorCode enum. Please keep in sync with +// api-base/proto/error_code.proto (except status code mapping annotations as +// this file doesn't have them). Will be removed eventually, pending the ScalaPB +// 0.4 cleanup. +type ErrorCode string + +const ErrorCodeAborted ErrorCode = `ABORTED` + +const ErrorCodeAlreadyExists ErrorCode = `ALREADY_EXISTS` + +const ErrorCodeBadRequest ErrorCode = `BAD_REQUEST` + +const ErrorCodeCancelled ErrorCode = `CANCELLED` + +const ErrorCodeCatalogAlreadyExists ErrorCode = `CATALOG_ALREADY_EXISTS` + +const ErrorCodeCatalogDoesNotExist ErrorCode = `CATALOG_DOES_NOT_EXIST` + +const ErrorCodeCatalogNotEmpty ErrorCode = `CATALOG_NOT_EMPTY` + +const ErrorCodeCouldNotAcquireLock ErrorCode = `COULD_NOT_ACQUIRE_LOCK` + +const ErrorCodeCustomerUnauthorized ErrorCode = `CUSTOMER_UNAUTHORIZED` + +const ErrorCodeDacAlreadyExists ErrorCode = `DAC_ALREADY_EXISTS` + +const ErrorCodeDacDoesNotExist ErrorCode = `DAC_DOES_NOT_EXIST` + +const ErrorCodeDataLoss ErrorCode = `DATA_LOSS` + +const ErrorCodeDeadlineExceeded ErrorCode = `DEADLINE_EXCEEDED` + +const ErrorCodeDeploymentTimeout ErrorCode = `DEPLOYMENT_TIMEOUT` + +const ErrorCodeDirectoryNotEmpty ErrorCode = `DIRECTORY_NOT_EMPTY` + +const ErrorCodeDirectoryProtected ErrorCode = `DIRECTORY_PROTECTED` + +const ErrorCodeDryRunFailed ErrorCode = `DRY_RUN_FAILED` + +const ErrorCodeEndpointNotFound ErrorCode = `ENDPOINT_NOT_FOUND` + +const ErrorCodeExternalLocationAlreadyExists ErrorCode = `EXTERNAL_LOCATION_ALREADY_EXISTS` + +const ErrorCodeExternalLocationDoesNotExist ErrorCode = `EXTERNAL_LOCATION_DOES_NOT_EXIST` + +const ErrorCodeFeatureDisabled ErrorCode = `FEATURE_DISABLED` + +const ErrorCodeGitConflict ErrorCode = `GIT_CONFLICT` + +const ErrorCodeGitRemoteError ErrorCode = `GIT_REMOTE_ERROR` + +const ErrorCodeGitSensitiveTokenDetected ErrorCode = `GIT_SENSITIVE_TOKEN_DETECTED` + +const ErrorCodeGitUnknownRef ErrorCode = `GIT_UNKNOWN_REF` + +const ErrorCodeGitUrlNotOnAllowList ErrorCode = `GIT_URL_NOT_ON_ALLOW_LIST` + +const ErrorCodeInsecurePartnerResponse ErrorCode = `INSECURE_PARTNER_RESPONSE` + +const ErrorCodeInternalError ErrorCode = `INTERNAL_ERROR` + +const ErrorCodeInvalidParameterValue ErrorCode = `INVALID_PARAMETER_VALUE` + +const ErrorCodeInvalidState ErrorCode = `INVALID_STATE` + +const ErrorCodeInvalidStateTransition ErrorCode = `INVALID_STATE_TRANSITION` + +const ErrorCodeIoError ErrorCode = `IO_ERROR` + +const ErrorCodeIpynbFileInRepo ErrorCode = `IPYNB_FILE_IN_REPO` + +const ErrorCodeMalformedPartnerResponse ErrorCode = `MALFORMED_PARTNER_RESPONSE` + +const ErrorCodeMalformedRequest ErrorCode = `MALFORMED_REQUEST` + +const ErrorCodeManagedResourceGroupDoesNotExist ErrorCode = `MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST` + +const ErrorCodeMaxBlockSizeExceeded ErrorCode = `MAX_BLOCK_SIZE_EXCEEDED` + +const ErrorCodeMaxChildNodeSizeExceeded ErrorCode = `MAX_CHILD_NODE_SIZE_EXCEEDED` + +const ErrorCodeMaxListSizeExceeded ErrorCode = `MAX_LIST_SIZE_EXCEEDED` + +const ErrorCodeMaxNotebookSizeExceeded ErrorCode = `MAX_NOTEBOOK_SIZE_EXCEEDED` + +const ErrorCodeMaxReadSizeExceeded ErrorCode = `MAX_READ_SIZE_EXCEEDED` + +const ErrorCodeMetastoreAlreadyExists ErrorCode = `METASTORE_ALREADY_EXISTS` + +const ErrorCodeMetastoreDoesNotExist ErrorCode = `METASTORE_DOES_NOT_EXIST` + +const ErrorCodeMetastoreNotEmpty ErrorCode = `METASTORE_NOT_EMPTY` + +const ErrorCodeNotFound ErrorCode = `NOT_FOUND` + +const ErrorCodeNotImplemented ErrorCode = `NOT_IMPLEMENTED` + +const ErrorCodePartialDelete ErrorCode = `PARTIAL_DELETE` + +const ErrorCodePermissionDenied ErrorCode = `PERMISSION_DENIED` + +const ErrorCodePermissionNotPropagated ErrorCode = `PERMISSION_NOT_PROPAGATED` + +const ErrorCodePrincipalDoesNotExist ErrorCode = `PRINCIPAL_DOES_NOT_EXIST` + +const ErrorCodeProjectsOperationTimeout ErrorCode = `PROJECTS_OPERATION_TIMEOUT` + +const ErrorCodeProviderAlreadyExists ErrorCode = `PROVIDER_ALREADY_EXISTS` + +const ErrorCodeProviderDoesNotExist ErrorCode = `PROVIDER_DOES_NOT_EXIST` + +const ErrorCodeProviderShareNotAccessible ErrorCode = `PROVIDER_SHARE_NOT_ACCESSIBLE` + +const ErrorCodeQuotaExceeded ErrorCode = `QUOTA_EXCEEDED` + +const ErrorCodeRecipientAlreadyExists ErrorCode = `RECIPIENT_ALREADY_EXISTS` + +const ErrorCodeRecipientDoesNotExist ErrorCode = `RECIPIENT_DOES_NOT_EXIST` + +const ErrorCodeRequestLimitExceeded ErrorCode = `REQUEST_LIMIT_EXCEEDED` + +const ErrorCodeResourceAlreadyExists ErrorCode = `RESOURCE_ALREADY_EXISTS` + +const ErrorCodeResourceConflict ErrorCode = `RESOURCE_CONFLICT` + +const ErrorCodeResourceDoesNotExist ErrorCode = `RESOURCE_DOES_NOT_EXIST` + +const ErrorCodeResourceExhausted ErrorCode = `RESOURCE_EXHAUSTED` + +const ErrorCodeResourceLimitExceeded ErrorCode = `RESOURCE_LIMIT_EXCEEDED` + +const ErrorCodeSchemaAlreadyExists ErrorCode = `SCHEMA_ALREADY_EXISTS` + +const ErrorCodeSchemaDoesNotExist ErrorCode = `SCHEMA_DOES_NOT_EXIST` + +const ErrorCodeSchemaNotEmpty ErrorCode = `SCHEMA_NOT_EMPTY` + +const ErrorCodeSearchQueryTooLong ErrorCode = `SEARCH_QUERY_TOO_LONG` + +const ErrorCodeSearchQueryTooShort ErrorCode = `SEARCH_QUERY_TOO_SHORT` + +const ErrorCodeServiceUnderMaintenance ErrorCode = `SERVICE_UNDER_MAINTENANCE` + +const ErrorCodeShareAlreadyExists ErrorCode = `SHARE_ALREADY_EXISTS` + +const ErrorCodeShareDoesNotExist ErrorCode = `SHARE_DOES_NOT_EXIST` + +const ErrorCodeStorageCredentialAlreadyExists ErrorCode = `STORAGE_CREDENTIAL_ALREADY_EXISTS` + +const ErrorCodeStorageCredentialDoesNotExist ErrorCode = `STORAGE_CREDENTIAL_DOES_NOT_EXIST` + +const ErrorCodeTableAlreadyExists ErrorCode = `TABLE_ALREADY_EXISTS` + +const ErrorCodeTableDoesNotExist ErrorCode = `TABLE_DOES_NOT_EXIST` + +const ErrorCodeTemporarilyUnavailable ErrorCode = `TEMPORARILY_UNAVAILABLE` + +const ErrorCodeUnauthenticated ErrorCode = `UNAUTHENTICATED` + +const ErrorCodeUnavailable ErrorCode = `UNAVAILABLE` + +const ErrorCodeUnknown ErrorCode = `UNKNOWN` + +const ErrorCodeUnparseableHttpError ErrorCode = `UNPARSEABLE_HTTP_ERROR` + +const ErrorCodeWorkspaceTemporarilyUnavailable ErrorCode = `WORKSPACE_TEMPORARILY_UNAVAILABLE` + +// String representation for [fmt.Print] +func (f *ErrorCode) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *ErrorCode) Set(v string) error { + switch v { + case `ABORTED`, `ALREADY_EXISTS`, `BAD_REQUEST`, `CANCELLED`, `CATALOG_ALREADY_EXISTS`, `CATALOG_DOES_NOT_EXIST`, `CATALOG_NOT_EMPTY`, `COULD_NOT_ACQUIRE_LOCK`, `CUSTOMER_UNAUTHORIZED`, `DAC_ALREADY_EXISTS`, `DAC_DOES_NOT_EXIST`, `DATA_LOSS`, `DEADLINE_EXCEEDED`, `DEPLOYMENT_TIMEOUT`, `DIRECTORY_NOT_EMPTY`, `DIRECTORY_PROTECTED`, `DRY_RUN_FAILED`, `ENDPOINT_NOT_FOUND`, `EXTERNAL_LOCATION_ALREADY_EXISTS`, `EXTERNAL_LOCATION_DOES_NOT_EXIST`, `FEATURE_DISABLED`, `GIT_CONFLICT`, `GIT_REMOTE_ERROR`, `GIT_SENSITIVE_TOKEN_DETECTED`, `GIT_UNKNOWN_REF`, `GIT_URL_NOT_ON_ALLOW_LIST`, `INSECURE_PARTNER_RESPONSE`, `INTERNAL_ERROR`, `INVALID_PARAMETER_VALUE`, `INVALID_STATE`, `INVALID_STATE_TRANSITION`, `IO_ERROR`, `IPYNB_FILE_IN_REPO`, `MALFORMED_PARTNER_RESPONSE`, `MALFORMED_REQUEST`, `MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST`, `MAX_BLOCK_SIZE_EXCEEDED`, `MAX_CHILD_NODE_SIZE_EXCEEDED`, `MAX_LIST_SIZE_EXCEEDED`, `MAX_NOTEBOOK_SIZE_EXCEEDED`, `MAX_READ_SIZE_EXCEEDED`, `METASTORE_ALREADY_EXISTS`, `METASTORE_DOES_NOT_EXIST`, `METASTORE_NOT_EMPTY`, `NOT_FOUND`, `NOT_IMPLEMENTED`, `PARTIAL_DELETE`, `PERMISSION_DENIED`, `PERMISSION_NOT_PROPAGATED`, `PRINCIPAL_DOES_NOT_EXIST`, `PROJECTS_OPERATION_TIMEOUT`, `PROVIDER_ALREADY_EXISTS`, `PROVIDER_DOES_NOT_EXIST`, `PROVIDER_SHARE_NOT_ACCESSIBLE`, `QUOTA_EXCEEDED`, `RECIPIENT_ALREADY_EXISTS`, `RECIPIENT_DOES_NOT_EXIST`, `REQUEST_LIMIT_EXCEEDED`, `RESOURCE_ALREADY_EXISTS`, `RESOURCE_CONFLICT`, `RESOURCE_DOES_NOT_EXIST`, `RESOURCE_EXHAUSTED`, `RESOURCE_LIMIT_EXCEEDED`, `SCHEMA_ALREADY_EXISTS`, `SCHEMA_DOES_NOT_EXIST`, `SCHEMA_NOT_EMPTY`, `SEARCH_QUERY_TOO_LONG`, `SEARCH_QUERY_TOO_SHORT`, `SERVICE_UNDER_MAINTENANCE`, `SHARE_ALREADY_EXISTS`, `SHARE_DOES_NOT_EXIST`, `STORAGE_CREDENTIAL_ALREADY_EXISTS`, `STORAGE_CREDENTIAL_DOES_NOT_EXIST`, `TABLE_ALREADY_EXISTS`, `TABLE_DOES_NOT_EXIST`, `TEMPORARILY_UNAVAILABLE`, `UNAUTHENTICATED`, `UNAVAILABLE`, `UNKNOWN`, `UNPARSEABLE_HTTP_ERROR`, `WORKSPACE_TEMPORARILY_UNAVAILABLE`: + *f = ErrorCode(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "ABORTED", "ALREADY_EXISTS", "BAD_REQUEST", "CANCELLED", "CATALOG_ALREADY_EXISTS", "CATALOG_DOES_NOT_EXIST", "CATALOG_NOT_EMPTY", "COULD_NOT_ACQUIRE_LOCK", "CUSTOMER_UNAUTHORIZED", "DAC_ALREADY_EXISTS", "DAC_DOES_NOT_EXIST", "DATA_LOSS", "DEADLINE_EXCEEDED", "DEPLOYMENT_TIMEOUT", "DIRECTORY_NOT_EMPTY", "DIRECTORY_PROTECTED", "DRY_RUN_FAILED", "ENDPOINT_NOT_FOUND", "EXTERNAL_LOCATION_ALREADY_EXISTS", "EXTERNAL_LOCATION_DOES_NOT_EXIST", "FEATURE_DISABLED", "GIT_CONFLICT", "GIT_REMOTE_ERROR", "GIT_SENSITIVE_TOKEN_DETECTED", "GIT_UNKNOWN_REF", "GIT_URL_NOT_ON_ALLOW_LIST", "INSECURE_PARTNER_RESPONSE", "INTERNAL_ERROR", "INVALID_PARAMETER_VALUE", "INVALID_STATE", "INVALID_STATE_TRANSITION", "IO_ERROR", "IPYNB_FILE_IN_REPO", "MALFORMED_PARTNER_RESPONSE", "MALFORMED_REQUEST", "MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST", "MAX_BLOCK_SIZE_EXCEEDED", "MAX_CHILD_NODE_SIZE_EXCEEDED", "MAX_LIST_SIZE_EXCEEDED", "MAX_NOTEBOOK_SIZE_EXCEEDED", "MAX_READ_SIZE_EXCEEDED", "METASTORE_ALREADY_EXISTS", "METASTORE_DOES_NOT_EXIST", "METASTORE_NOT_EMPTY", "NOT_FOUND", "NOT_IMPLEMENTED", "PARTIAL_DELETE", "PERMISSION_DENIED", "PERMISSION_NOT_PROPAGATED", "PRINCIPAL_DOES_NOT_EXIST", "PROJECTS_OPERATION_TIMEOUT", "PROVIDER_ALREADY_EXISTS", "PROVIDER_DOES_NOT_EXIST", "PROVIDER_SHARE_NOT_ACCESSIBLE", "QUOTA_EXCEEDED", "RECIPIENT_ALREADY_EXISTS", "RECIPIENT_DOES_NOT_EXIST", "REQUEST_LIMIT_EXCEEDED", "RESOURCE_ALREADY_EXISTS", "RESOURCE_CONFLICT", "RESOURCE_DOES_NOT_EXIST", "RESOURCE_EXHAUSTED", "RESOURCE_LIMIT_EXCEEDED", "SCHEMA_ALREADY_EXISTS", "SCHEMA_DOES_NOT_EXIST", "SCHEMA_NOT_EMPTY", "SEARCH_QUERY_TOO_LONG", "SEARCH_QUERY_TOO_SHORT", "SERVICE_UNDER_MAINTENANCE", "SHARE_ALREADY_EXISTS", "SHARE_DOES_NOT_EXIST", "STORAGE_CREDENTIAL_ALREADY_EXISTS", "STORAGE_CREDENTIAL_DOES_NOT_EXIST", "TABLE_ALREADY_EXISTS", "TABLE_DOES_NOT_EXIST", "TEMPORARILY_UNAVAILABLE", "UNAUTHENTICATED", "UNAVAILABLE", "UNKNOWN", "UNPARSEABLE_HTTP_ERROR", "WORKSPACE_TEMPORARILY_UNAVAILABLE"`, v) + } +} + +// Values returns all possible values for ErrorCode. +// +// There is no guarantee on the order of the values in the slice. +func (f *ErrorCode) Values() []ErrorCode { + return []ErrorCode{ + ErrorCodeAborted, + ErrorCodeAlreadyExists, + ErrorCodeBadRequest, + ErrorCodeCancelled, + ErrorCodeCatalogAlreadyExists, + ErrorCodeCatalogDoesNotExist, + ErrorCodeCatalogNotEmpty, + ErrorCodeCouldNotAcquireLock, + ErrorCodeCustomerUnauthorized, + ErrorCodeDacAlreadyExists, + ErrorCodeDacDoesNotExist, + ErrorCodeDataLoss, + ErrorCodeDeadlineExceeded, + ErrorCodeDeploymentTimeout, + ErrorCodeDirectoryNotEmpty, + ErrorCodeDirectoryProtected, + ErrorCodeDryRunFailed, + ErrorCodeEndpointNotFound, + ErrorCodeExternalLocationAlreadyExists, + ErrorCodeExternalLocationDoesNotExist, + ErrorCodeFeatureDisabled, + ErrorCodeGitConflict, + ErrorCodeGitRemoteError, + ErrorCodeGitSensitiveTokenDetected, + ErrorCodeGitUnknownRef, + ErrorCodeGitUrlNotOnAllowList, + ErrorCodeInsecurePartnerResponse, + ErrorCodeInternalError, + ErrorCodeInvalidParameterValue, + ErrorCodeInvalidState, + ErrorCodeInvalidStateTransition, + ErrorCodeIoError, + ErrorCodeIpynbFileInRepo, + ErrorCodeMalformedPartnerResponse, + ErrorCodeMalformedRequest, + ErrorCodeManagedResourceGroupDoesNotExist, + ErrorCodeMaxBlockSizeExceeded, + ErrorCodeMaxChildNodeSizeExceeded, + ErrorCodeMaxListSizeExceeded, + ErrorCodeMaxNotebookSizeExceeded, + ErrorCodeMaxReadSizeExceeded, + ErrorCodeMetastoreAlreadyExists, + ErrorCodeMetastoreDoesNotExist, + ErrorCodeMetastoreNotEmpty, + ErrorCodeNotFound, + ErrorCodeNotImplemented, + ErrorCodePartialDelete, + ErrorCodePermissionDenied, + ErrorCodePermissionNotPropagated, + ErrorCodePrincipalDoesNotExist, + ErrorCodeProjectsOperationTimeout, + ErrorCodeProviderAlreadyExists, + ErrorCodeProviderDoesNotExist, + ErrorCodeProviderShareNotAccessible, + ErrorCodeQuotaExceeded, + ErrorCodeRecipientAlreadyExists, + ErrorCodeRecipientDoesNotExist, + ErrorCodeRequestLimitExceeded, + ErrorCodeResourceAlreadyExists, + ErrorCodeResourceConflict, + ErrorCodeResourceDoesNotExist, + ErrorCodeResourceExhausted, + ErrorCodeResourceLimitExceeded, + ErrorCodeSchemaAlreadyExists, + ErrorCodeSchemaDoesNotExist, + ErrorCodeSchemaNotEmpty, + ErrorCodeSearchQueryTooLong, + ErrorCodeSearchQueryTooShort, + ErrorCodeServiceUnderMaintenance, + ErrorCodeShareAlreadyExists, + ErrorCodeShareDoesNotExist, + ErrorCodeStorageCredentialAlreadyExists, + ErrorCodeStorageCredentialDoesNotExist, + ErrorCodeTableAlreadyExists, + ErrorCodeTableDoesNotExist, + ErrorCodeTemporarilyUnavailable, + ErrorCodeUnauthenticated, + ErrorCodeUnavailable, + ErrorCodeUnknown, + ErrorCodeUnparseableHttpError, + ErrorCodeWorkspaceTemporarilyUnavailable, + } +} + +// Type always returns ErrorCode to satisfy [pflag.Value] interface +func (f *ErrorCode) Type() string { + return "ErrorCode" +} + type GetOperationRequest struct { // The name of the operation resource. Name string `json:"-" url:"-"` @@ -26,6 +334,48 @@ type GetTestResourceRequest struct { ResourceId string `json:"-" url:"-"` } +// This resource represents a long-running operation that is the result of a +// network API call. +type Operation struct { + // If the value is `false`, it means the operation is still in progress. If + // `true`, the operation is completed, and either `error` or `response` is + // available. + Done bool `json:"done,omitempty"` + // The error result of the operation in case of failure or cancellation. + Error *DatabricksServiceExceptionWithDetailsProto `json:"error,omitempty"` + // Service-specific metadata associated with the operation. It typically + // contains progress information and common metadata such as create time. + // Some services might not provide such metadata. Any method that returns a + // long-running operation should document the metadata type, if any. + Metadata json.RawMessage `json:"metadata,omitempty"` + // The server-assigned name, which is only unique within the same service + // that originally returns it. If you use the default HTTP mapping, the + // `name` should be a resource name ending with `operations/{unique_id}`. + // + // Note: multi-segment resource names are not yet supported in the RPC + // framework and SDK/TF. Until that support is added, `name` must be string + // without internal `/` separators. + Name string `json:"name,omitempty"` + // The normal, successful response of the operation. If the original method + // returns no data on success, such as `Delete`, the response is + // `google.protobuf.Empty`. If the original method is standard + // `Get`/`Create`/`Update`, the response should be the resource. For other + // methods, the response should have the type `XxxResponse`, where `Xxx` is + // the original method name. For example, if the original method name is + // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + Response json.RawMessage `json:"response,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *Operation) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s Operation) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + // Test resource for LRO operations type TestResource struct { // Unique identifier for the resource diff --git a/service/pkg.go b/service/pkg.go index 96e82b61c..15d3ed210 100644 --- a/service/pkg.go +++ b/service/pkg.go @@ -64,10 +64,10 @@ // // - [marketplace.ConsumerProvidersAPI]: Providers are the entities that publish listings to the Marketplace. // -// - [catalog.CredentialsAPI]: A credential represents an authentication and authorization mechanism for accessing services on your cloud tenant. -// // - [provisioning.CredentialsAPI]: These APIs manage credential configurations for this workspace. // +// - [catalog.CredentialsAPI]: A credential represents an authentication and authorization mechanism for accessing services on your cloud tenant. +// // - [settings.CredentialsManagerAPI]: Credentials manager interacts with with Identity Providers to to perform token exchanges using stored credentials and refresh tokens. // // - [settings.CspEnablementAccountAPI]: The compliance security profile settings at the account level control whether to enable it for new workspaces.