From cb258779d57d852f279fd4f02e2b78b6fd96087c Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 3 Jun 2025 14:44:03 +0000 Subject: [PATCH 1/2] Add enum.Values --- .github/workflows/tagging.yml | 3 +- service/apps/interface.go | 6 +- service/apps/model.go | 123 ++++++ service/billing/interface.go | 16 +- service/billing/model.go | 107 +++++ service/catalog/interface.go | 90 +++-- service/catalog/model.go | 617 ++++++++++++++++++++++++++++ service/cleanrooms/interface.go | 12 +- service/cleanrooms/model.go | 78 ++++ service/compute/interface.go | 38 +- service/compute/model.go | 583 +++++++++++++++++++++++++++ service/dashboards/interface.go | 14 +- service/dashboards/model.go | 108 +++++ service/files/interface.go | 8 +- service/iam/impl.go | 12 +- service/iam/interface.go | 40 +- service/iam/model.go | 134 ++++++ service/jobs/interface.go | 10 +- service/jobs/model.go | 414 +++++++++++++++++++ service/marketplace/interface.go | 56 ++- service/marketplace/model.go | 209 ++++++++++ service/ml/interface.go | 28 +- service/ml/model.go | 223 ++++++++++ service/oauth2/interface.go | 24 +- service/pipelines/interface.go | 6 +- service/pipelines/model.go | 204 ++++++++++ service/pkg.go | 6 +- service/provisioning/interface.go | 14 + service/provisioning/model.go | 103 +++++ service/serving/interface.go | 6 +- service/serving/model.go | 204 ++++++++++ service/settings/interface.go | 80 +++- service/settings/model.go | 261 ++++++++++++ service/sharing/interface.go | 20 +- service/sharing/model.go | 198 +++++++++ service/sql/interface.go | 44 +- service/sql/model.go | 649 ++++++++++++++++++++++++++++++ service/vectorsearch/interface.go | 8 +- service/vectorsearch/model.go | 62 +++ service/workspace/interface.go | 20 +- service/workspace/model.go | 101 +++++ 41 files changed, 4694 insertions(+), 245 deletions(-) diff --git a/.github/workflows/tagging.yml b/.github/workflows/tagging.yml index 558f2993a..d4486fb51 100644 --- a/.github/workflows/tagging.yml +++ b/.github/workflows/tagging.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Generate GitHub App Token id: generate-token - uses: actions/create-github-app-token@v1 + uses: actions/create-github-app-token@v2 with: app-id: ${{ secrets.DECO_SDK_TAGGING_APP_ID }} private-key: ${{ secrets.DECO_SDK_TAGGING_PRIVATE_KEY }} @@ -49,4 +49,3 @@ jobs: GITHUB_REPOSITORY: ${{ github.repository }} run: | python tagging.py - diff --git a/service/apps/interface.go b/service/apps/interface.go index 154a65620..7aaa340cc 100755 --- a/service/apps/interface.go +++ b/service/apps/interface.go @@ -9,6 +9,8 @@ import ( // Apps run directly on a customer’s Databricks instance, integrate with their // data, use and extend Databricks services, and enable users to interact // through single sign-on. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AppsService interface { // Create an app. @@ -51,15 +53,11 @@ type AppsService interface { // List apps. // // Lists all apps in the workspace. - // - // Use ListAll() to get all App instances, which will iterate over every result page. List(ctx context.Context, request ListAppsRequest) (*ListAppsResponse, error) // List app deployments. // // Lists all app deployments for the app with the supplied name. - // - // Use ListDeploymentsAll() to get all AppDeployment instances, which will iterate over every result page. ListDeployments(ctx context.Context, request ListAppDeploymentsRequest) (*ListAppDeploymentsResponse, error) // Set app permissions. diff --git a/service/apps/model.go b/service/apps/model.go index a6a9bfe27..a4790a540 100755 --- a/service/apps/model.go +++ b/service/apps/model.go @@ -189,6 +189,16 @@ func (f *AppDeploymentMode) Set(v string) error { } } +// Values returns all possible values of AppDeploymentMode. +// +// There is no guarantee on the order of the values in the slice. +func (f *AppDeploymentMode) Values() []AppDeploymentMode { + return []AppDeploymentMode{ + AppDeploymentModeAutoSync, + AppDeploymentModeSnapshot, + } +} + // Type always returns AppDeploymentMode to satisfy [pflag.Value] interface func (f *AppDeploymentMode) Type() string { return "AppDeploymentMode" @@ -220,6 +230,18 @@ func (f *AppDeploymentState) Set(v string) error { } } +// Values returns all possible values of AppDeploymentState. +// +// There is no guarantee on the order of the values in the slice. +func (f *AppDeploymentState) Values() []AppDeploymentState { + return []AppDeploymentState{ + AppDeploymentStateCancelled, + AppDeploymentStateFailed, + AppDeploymentStateInProgress, + AppDeploymentStateSucceeded, + } +} + // Type always returns AppDeploymentState to satisfy [pflag.Value] interface func (f *AppDeploymentState) Type() string { return "AppDeploymentState" @@ -283,6 +305,16 @@ func (f *AppPermissionLevel) Set(v string) error { } } +// Values returns all possible values of AppPermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *AppPermissionLevel) Values() []AppPermissionLevel { + return []AppPermissionLevel{ + AppPermissionLevelCanManage, + AppPermissionLevelCanUse, + } +} + // Type always returns AppPermissionLevel to satisfy [pflag.Value] interface func (f *AppPermissionLevel) Type() string { return "AppPermissionLevel" @@ -389,6 +421,18 @@ func (f *AppResourceJobJobPermission) Set(v string) error { } } +// Values returns all possible values of AppResourceJobJobPermission. +// +// There is no guarantee on the order of the values in the slice. +func (f *AppResourceJobJobPermission) Values() []AppResourceJobJobPermission { + return []AppResourceJobJobPermission{ + AppResourceJobJobPermissionCanManage, + AppResourceJobJobPermissionCanManageRun, + AppResourceJobJobPermissionCanView, + AppResourceJobJobPermissionIsOwner, + } +} + // Type always returns AppResourceJobJobPermission to satisfy [pflag.Value] interface func (f *AppResourceJobJobPermission) Type() string { return "AppResourceJobJobPermission" @@ -430,6 +474,17 @@ func (f *AppResourceSecretSecretPermission) Set(v string) error { } } +// Values returns all possible values of AppResourceSecretSecretPermission. +// +// There is no guarantee on the order of the values in the slice. +func (f *AppResourceSecretSecretPermission) Values() []AppResourceSecretSecretPermission { + return []AppResourceSecretSecretPermission{ + AppResourceSecretSecretPermissionManage, + AppResourceSecretSecretPermissionRead, + AppResourceSecretSecretPermissionWrite, + } +} + // Type always returns AppResourceSecretSecretPermission to satisfy [pflag.Value] interface func (f *AppResourceSecretSecretPermission) Type() string { return "AppResourceSecretSecretPermission" @@ -467,6 +522,17 @@ func (f *AppResourceServingEndpointServingEndpointPermission) Set(v string) erro } } +// Values returns all possible values of AppResourceServingEndpointServingEndpointPermission. +// +// There is no guarantee on the order of the values in the slice. +func (f *AppResourceServingEndpointServingEndpointPermission) Values() []AppResourceServingEndpointServingEndpointPermission { + return []AppResourceServingEndpointServingEndpointPermission{ + AppResourceServingEndpointServingEndpointPermissionCanManage, + AppResourceServingEndpointServingEndpointPermissionCanQuery, + AppResourceServingEndpointServingEndpointPermissionCanView, + } +} + // Type always returns AppResourceServingEndpointServingEndpointPermission to satisfy [pflag.Value] interface func (f *AppResourceServingEndpointServingEndpointPermission) Type() string { return "AppResourceServingEndpointServingEndpointPermission" @@ -504,6 +570,17 @@ func (f *AppResourceSqlWarehouseSqlWarehousePermission) Set(v string) error { } } +// Values returns all possible values of AppResourceSqlWarehouseSqlWarehousePermission. +// +// There is no guarantee on the order of the values in the slice. +func (f *AppResourceSqlWarehouseSqlWarehousePermission) Values() []AppResourceSqlWarehouseSqlWarehousePermission { + return []AppResourceSqlWarehouseSqlWarehousePermission{ + AppResourceSqlWarehouseSqlWarehousePermissionCanManage, + AppResourceSqlWarehouseSqlWarehousePermissionCanUse, + AppResourceSqlWarehouseSqlWarehousePermissionIsOwner, + } +} + // Type always returns AppResourceSqlWarehouseSqlWarehousePermission to satisfy [pflag.Value] interface func (f *AppResourceSqlWarehouseSqlWarehousePermission) Type() string { return "AppResourceSqlWarehouseSqlWarehousePermission" @@ -539,6 +616,16 @@ func (f *AppResourceUcSecurableUcSecurablePermission) Set(v string) error { } } +// Values returns all possible values of AppResourceUcSecurableUcSecurablePermission. +// +// There is no guarantee on the order of the values in the slice. +func (f *AppResourceUcSecurableUcSecurablePermission) Values() []AppResourceUcSecurableUcSecurablePermission { + return []AppResourceUcSecurableUcSecurablePermission{ + AppResourceUcSecurableUcSecurablePermissionReadVolume, + AppResourceUcSecurableUcSecurablePermissionWriteVolume, + } +} + // Type always returns AppResourceUcSecurableUcSecurablePermission to satisfy [pflag.Value] interface func (f *AppResourceUcSecurableUcSecurablePermission) Type() string { return "AppResourceUcSecurableUcSecurablePermission" @@ -564,6 +651,15 @@ func (f *AppResourceUcSecurableUcSecurableType) Set(v string) error { } } +// Values returns all possible values of AppResourceUcSecurableUcSecurableType. +// +// There is no guarantee on the order of the values in the slice. +func (f *AppResourceUcSecurableUcSecurableType) Values() []AppResourceUcSecurableUcSecurableType { + return []AppResourceUcSecurableUcSecurableType{ + AppResourceUcSecurableUcSecurableTypeVolume, + } +} + // Type always returns AppResourceUcSecurableUcSecurableType to satisfy [pflag.Value] interface func (f *AppResourceUcSecurableUcSecurableType) Type() string { return "AppResourceUcSecurableUcSecurableType" @@ -595,6 +691,18 @@ func (f *ApplicationState) Set(v string) error { } } +// Values returns all possible values of ApplicationState. +// +// There is no guarantee on the order of the values in the slice. +func (f *ApplicationState) Values() []ApplicationState { + return []ApplicationState{ + ApplicationStateCrashed, + ApplicationStateDeploying, + ApplicationStateRunning, + ApplicationStateUnavailable, + } +} + // Type always returns ApplicationState to satisfy [pflag.Value] interface func (f *ApplicationState) Type() string { return "ApplicationState" @@ -649,6 +757,21 @@ func (f *ComputeState) Set(v string) error { } } +// Values returns all possible values of ComputeState. +// +// There is no guarantee on the order of the values in the slice. +func (f *ComputeState) Values() []ComputeState { + return []ComputeState{ + ComputeStateActive, + ComputeStateDeleting, + ComputeStateError, + ComputeStateStarting, + ComputeStateStopped, + ComputeStateStopping, + ComputeStateUpdating, + } +} + // Type always returns ComputeState to satisfy [pflag.Value] interface func (f *ComputeState) Type() string { return "ComputeState" diff --git a/service/billing/interface.go b/service/billing/interface.go index b5d50594c..7ddf07dc6 100755 --- a/service/billing/interface.go +++ b/service/billing/interface.go @@ -8,6 +8,8 @@ import ( // This API allows you to download billable usage logs for the specified account // and date range. This feature works with all account types. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type BillableUsageService interface { // Return billable usage logs. @@ -27,6 +29,8 @@ type BillableUsageService interface { } // A service serves REST API about Budget policies +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type BudgetPolicyService interface { // Create a budget policy. @@ -48,8 +52,6 @@ type BudgetPolicyService interface { // // Lists all policies. Policies are returned in the alphabetically ascending // order of their names. - // - // Use ListAll() to get all BudgetPolicy instances, which will iterate over every result page. List(ctx context.Context, request ListBudgetPoliciesRequest) (*ListBudgetPoliciesResponse, error) // Update a budget policy. @@ -62,6 +64,8 @@ type BudgetPolicyService interface { // to monitor usage across your account. You can set up budgets to either track // account-wide spending, or apply filters to track the spending of specific // teams, projects, or workspaces. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type BudgetsService interface { // Create new budget. @@ -85,8 +89,6 @@ type BudgetsService interface { // Get all budgets. // // Gets all budgets associated with this account. - // - // Use ListAll() to get all BudgetConfiguration instances, which will iterate over every result page. List(ctx context.Context, request ListBudgetConfigurationsRequest) (*ListBudgetConfigurationsResponse, error) // Modify budget. @@ -153,6 +155,8 @@ type BudgetsService interface { // details. * Auditable events are typically available in logs within 15 // minutes. // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [Audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html // [Billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html // [Usage page]: https://docs.databricks.com/administration-guide/account-settings/usage.html @@ -199,8 +203,6 @@ type LogDeliveryService interface { // // Gets all Databricks log delivery configurations associated with an // account specified by ID. - // - // Use ListAll() to get all LogDeliveryConfiguration instances List(ctx context.Context, request ListLogDeliveryRequest) (*WrappedLogDeliveryConfigurations, error) // Enable or disable log delivery configuration. @@ -216,6 +218,8 @@ type LogDeliveryService interface { // These APIs manage usage dashboards for this account. Usage dashboards enable // you to gain insights into your usage with pre-built dashboards: visualize // breakdowns, analyze tag attributions, and identify cost drivers. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type UsageDashboardsService interface { // Create new usage dashboard. diff --git a/service/billing/model.go b/service/billing/model.go index 4f2106982..3a5730efa 100644 --- a/service/billing/model.go +++ b/service/billing/model.go @@ -49,6 +49,15 @@ func (f *ActionConfigurationType) Set(v string) error { } } +// Values returns all possible values of ActionConfigurationType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ActionConfigurationType) Values() []ActionConfigurationType { + return []ActionConfigurationType{ + ActionConfigurationTypeEmailNotification, + } +} + // Type always returns ActionConfigurationType to satisfy [pflag.Value] interface func (f *ActionConfigurationType) Type() string { return "ActionConfigurationType" @@ -103,6 +112,15 @@ func (f *AlertConfigurationQuantityType) Set(v string) error { } } +// Values returns all possible values of AlertConfigurationQuantityType. +// +// There is no guarantee on the order of the values in the slice. +func (f *AlertConfigurationQuantityType) Values() []AlertConfigurationQuantityType { + return []AlertConfigurationQuantityType{ + AlertConfigurationQuantityTypeListPriceDollarsUsd, + } +} + // Type always returns AlertConfigurationQuantityType to satisfy [pflag.Value] interface func (f *AlertConfigurationQuantityType) Type() string { return "AlertConfigurationQuantityType" @@ -128,6 +146,15 @@ func (f *AlertConfigurationTimePeriod) Set(v string) error { } } +// Values returns all possible values of AlertConfigurationTimePeriod. +// +// There is no guarantee on the order of the values in the slice. +func (f *AlertConfigurationTimePeriod) Values() []AlertConfigurationTimePeriod { + return []AlertConfigurationTimePeriod{ + AlertConfigurationTimePeriodMonth, + } +} + // Type always returns AlertConfigurationTimePeriod to satisfy [pflag.Value] interface func (f *AlertConfigurationTimePeriod) Type() string { return "AlertConfigurationTimePeriod" @@ -153,6 +180,15 @@ func (f *AlertConfigurationTriggerType) Set(v string) error { } } +// Values returns all possible values of AlertConfigurationTriggerType. +// +// There is no guarantee on the order of the values in the slice. +func (f *AlertConfigurationTriggerType) Values() []AlertConfigurationTriggerType { + return []AlertConfigurationTriggerType{ + AlertConfigurationTriggerTypeCumulativeSpendingExceeded, + } +} + // Type always returns AlertConfigurationTriggerType to satisfy [pflag.Value] interface func (f *AlertConfigurationTriggerType) Type() string { return "AlertConfigurationTriggerType" @@ -224,6 +260,15 @@ func (f *BudgetConfigurationFilterOperator) Set(v string) error { } } +// Values returns all possible values of BudgetConfigurationFilterOperator. +// +// There is no guarantee on the order of the values in the slice. +func (f *BudgetConfigurationFilterOperator) Values() []BudgetConfigurationFilterOperator { + return []BudgetConfigurationFilterOperator{ + BudgetConfigurationFilterOperatorIn, + } +} + // Type always returns BudgetConfigurationFilterOperator to satisfy [pflag.Value] interface func (f *BudgetConfigurationFilterOperator) Type() string { return "BudgetConfigurationFilterOperator" @@ -560,6 +605,19 @@ func (f *DeliveryStatus) Set(v string) error { } } +// Values returns all possible values of DeliveryStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *DeliveryStatus) Values() []DeliveryStatus { + return []DeliveryStatus{ + DeliveryStatusCreated, + DeliveryStatusNotFound, + DeliveryStatusSucceeded, + DeliveryStatusSystemFailure, + DeliveryStatusUserFailure, + } +} + // Type always returns DeliveryStatus to satisfy [pflag.Value] interface func (f *DeliveryStatus) Type() string { return "DeliveryStatus" @@ -816,6 +874,16 @@ func (f *LogDeliveryConfigStatus) Set(v string) error { } } +// Values returns all possible values of LogDeliveryConfigStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *LogDeliveryConfigStatus) Values() []LogDeliveryConfigStatus { + return []LogDeliveryConfigStatus{ + LogDeliveryConfigStatusDisabled, + LogDeliveryConfigStatusEnabled, + } +} + // Type always returns LogDeliveryConfigStatus to satisfy [pflag.Value] interface func (f *LogDeliveryConfigStatus) Type() string { return "LogDeliveryConfigStatus" @@ -982,6 +1050,16 @@ func (f *LogType) Set(v string) error { } } +// Values returns all possible values of LogType. +// +// There is no guarantee on the order of the values in the slice. +func (f *LogType) Values() []LogType { + return []LogType{ + LogTypeAuditLogs, + LogTypeBillableUsage, + } +} + // Type always returns LogType to satisfy [pflag.Value] interface func (f *LogType) Type() string { return "LogType" @@ -1019,6 +1097,16 @@ func (f *OutputFormat) Set(v string) error { } } +// Values returns all possible values of OutputFormat. +// +// There is no guarantee on the order of the values in the slice. +func (f *OutputFormat) Values() []OutputFormat { + return []OutputFormat{ + OutputFormatCsv, + OutputFormatJson, + } +} + // Type always returns OutputFormat to satisfy [pflag.Value] interface func (f *OutputFormat) Type() string { return "OutputFormat" @@ -1064,6 +1152,15 @@ func (f *SortSpecField) Set(v string) error { } } +// Values returns all possible values of SortSpecField. +// +// There is no guarantee on the order of the values in the slice. +func (f *SortSpecField) Values() []SortSpecField { + return []SortSpecField{ + SortSpecFieldPolicyName, + } +} + // Type always returns SortSpecField to satisfy [pflag.Value] interface func (f *SortSpecField) Type() string { return "SortSpecField" @@ -1154,6 +1251,16 @@ func (f *UsageDashboardType) Set(v string) error { } } +// Values returns all possible values of UsageDashboardType. +// +// There is no guarantee on the order of the values in the slice. +func (f *UsageDashboardType) Values() []UsageDashboardType { + return []UsageDashboardType{ + UsageDashboardTypeUsageDashboardTypeGlobal, + UsageDashboardTypeUsageDashboardTypeWorkspace, + } +} + // Type always returns UsageDashboardType to satisfy [pflag.Value] interface func (f *UsageDashboardType) Type() string { return "UsageDashboardType" diff --git a/service/catalog/interface.go b/service/catalog/interface.go index d0d1b0721..dd1b55596 100755 --- a/service/catalog/interface.go +++ b/service/catalog/interface.go @@ -7,6 +7,8 @@ import ( ) // These APIs manage metastore assignments to a workspace. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AccountMetastoreAssignmentsService interface { // Assigns a workspace to a metastore. @@ -32,8 +34,6 @@ type AccountMetastoreAssignmentsService interface { // // Gets a list of all Databricks workspace IDs that have been assigned to // given metastore. - // - // Use ListAll() to get all WorkspaceId instances List(ctx context.Context, request ListAccountMetastoreAssignmentsRequest) (*ListAccountMetastoreAssignmentsResponse, error) // Updates a metastore assignment to a workspaces. @@ -45,6 +45,8 @@ type AccountMetastoreAssignmentsService interface { // These APIs manage Unity Catalog metastores for an account. A metastore // contains catalogs that can be associated with workspaces +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AccountMetastoresService interface { // Create metastore. @@ -66,8 +68,6 @@ type AccountMetastoresService interface { // // Gets all Unity Catalog metastores associated with an account specified by // ID. - // - // Use ListAll() to get all MetastoreInfo instances List(ctx context.Context) (*ListMetastoresResponse, error) // Update a metastore. @@ -77,6 +77,8 @@ type AccountMetastoresService interface { } // These APIs manage storage credentials for a particular metastore. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AccountStorageCredentialsService interface { // Create a storage credential. @@ -108,8 +110,6 @@ type AccountStorageCredentialsService interface { // // Gets a list of all storage credentials that have been assigned to given // metastore. - // - // Use ListAll() to get all StorageCredentialInfo instances List(ctx context.Context, request ListAccountStorageCredentialsRequest) (*ListAccountStorageCredentialsResponse, error) // Updates a storage credential. @@ -123,6 +123,8 @@ type AccountStorageCredentialsService interface { // In Databricks Runtime 13.3 and above, you can add libraries and init scripts // to the `allowlist` in UC so that users can leverage these artifacts on // compute configured with shared access mode. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ArtifactAllowlistsService interface { // Get an artifact allowlist. @@ -149,6 +151,8 @@ type ArtifactAllowlistsService interface { // data centrally across all of the workspaces in a Databricks account. Users in // different workspaces can share access to the same data, depending on // privileges granted centrally in Unity Catalog. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type CatalogsService interface { // Create a catalog. @@ -177,8 +181,6 @@ 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. - // - // Use ListAll() to get all CatalogInfo instances, which will iterate over every result page. List(ctx context.Context, request ListCatalogsRequest) (*ListCatalogsResponse, error) // Update a catalog. @@ -200,6 +202,8 @@ type CatalogsService interface { // Users may create different types of connections with each connection having a // unique set of configuration options to support credential management and // other settings. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ConnectionsService interface { // Create a connection. @@ -224,8 +228,6 @@ type ConnectionsService interface { // List connections. // // List all connections. - // - // Use ListAll() to get all ConnectionInfo instances, which will iterate over every result page. List(ctx context.Context, request ListConnectionsRequest) (*ListConnectionsResponse, error) // Update a connection. @@ -242,6 +244,8 @@ type ConnectionsService interface { // To create credentials, you must be a Databricks account admin or have the // `CREATE SERVICE CREDENTIAL` privilege. The user who creates the credential // can delegate ownership to another user or group to manage permissions on it. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type CredentialsService interface { // Create a credential. @@ -283,8 +287,6 @@ type CredentialsService interface { // 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. - // - // Use ListCredentialsAll() to get all CredentialInfo instances, which will iterate over every result page. ListCredentials(ctx context.Context, request ListCredentialsRequest) (*ListCredentialsResponse, error) // Update a credential. @@ -318,6 +320,8 @@ type CredentialsService interface { } // Database Instances provide access to a database via REST API or direct SQL. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type DatabaseInstancesService interface { // Create a Database Catalog. @@ -351,8 +355,6 @@ type DatabaseInstancesService interface { GetSyncedDatabaseTable(ctx context.Context, request GetSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error) // List Database Instances. - // - // Use ListDatabaseInstancesAll() to get all DatabaseInstance instances, which will iterate over every result page. ListDatabaseInstances(ctx context.Context, request ListDatabaseInstancesRequest) (*ListDatabaseInstancesResponse, error) // Update a Database Instance. @@ -372,6 +374,8 @@ type DatabaseInstancesService interface { // // To create external locations, you must be a metastore admin or a user with // the **CREATE_EXTERNAL_LOCATION** privilege. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ExternalLocationsService interface { // Create an external location. @@ -401,8 +405,6 @@ 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. - // - // Use ListAll() to get all ExternalLocationInfo instances, which will iterate over every result page. List(ctx context.Context, request ListExternalLocationsRequest) (*ListExternalLocationsResponse, error) // Update an external location. @@ -419,6 +421,8 @@ type ExternalLocationsService interface { // invoked wherever a table reference is allowed in a query. In Unity Catalog, a // function resides at the same level as a table, so it can be referenced with // the form __catalog_name__.__schema_name__.__function_name__. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type FunctionsService interface { // Create a function. @@ -463,8 +467,6 @@ 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. - // - // Use ListAll() to get all FunctionInfo instances, which will iterate over every result page. List(ctx context.Context, request ListFunctionsRequest) (*ListFunctionsResponse, error) // Update a function. @@ -491,6 +493,8 @@ type FunctionsService interface { // automatically grants the privilege to all current and future objects within // the catalog. Similarly, privileges granted on a schema are inherited by all // current and future objects within that schema. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type GrantsService interface { // Get permissions. @@ -523,6 +527,8 @@ type GrantsService interface { // workspaces created before Unity Catalog was released. If your workspace // includes a legacy Hive metastore, the data in that metastore is available in // a catalog named hive_metastore. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type MetastoresService interface { // Create an assignment. @@ -563,8 +569,6 @@ 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. - // - // Use ListAll() to get all MetastoreInfo instances List(ctx context.Context) (*ListMetastoresResponse, error) // Get a metastore summary. @@ -604,6 +608,8 @@ type MetastoresService interface { // This API reference documents the REST endpoints for managing model versions // in Unity Catalog. For more details, see the [registered models API // docs](/api/workspace/registeredmodels). +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ModelVersionsService interface { // Delete a Model Version. @@ -654,8 +660,6 @@ type ModelVersionsService interface { // There is no guarantee of a specific ordering of the elements in the // response. The elements in the response will not contain any aliases or // tags. - // - // Use ListAll() to get all ModelVersionInfo instances, which will iterate over every result page. List(ctx context.Context, request ListModelVersionsRequest) (*ListModelVersionsResponse, error) // Update a Model Version. @@ -673,6 +677,8 @@ type ModelVersionsService interface { // Online tables provide lower latency and higher QPS access to data from Delta // tables. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type OnlineTablesService interface { // Create an Online Table. @@ -701,6 +707,8 @@ type OnlineTablesService interface { // parent schema or parent catalog). Viewing the dashboard, computed metrics, or // monitor configuration only requires the user to have **SELECT** privileges on // the table (along with **USE_SCHEMA** and **USE_CATALOG**). +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type QualityMonitorsService interface { // Cancel refresh. @@ -872,6 +880,8 @@ type QualityMonitorsService interface { // Note: The securable type for models is "FUNCTION". When using REST APIs (e.g. // tagging, grants) that specify a securable type, use "FUNCTION" as the // securable type. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type RegisteredModelsService interface { // Create a Registered Model. @@ -936,8 +946,6 @@ type RegisteredModelsService interface { // // There is no guarantee of a specific ordering of the elements in the // response. - // - // Use ListAll() to get all RegisteredModelInfo instances, which will iterate over every result page. List(ctx context.Context, request ListRegisteredModelsRequest) (*ListRegisteredModelsResponse, error) // Set a Registered Model Alias. @@ -971,6 +979,8 @@ type RegisteredModelsService interface { // usage and limits. For more information on resource quotas see the [Unity // Catalog documentation]. // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [Unity Catalog documentation]: https://docs.databricks.com/en/data-governance/unity-catalog/index.html#resource-quotas type ResourceQuotasService interface { @@ -987,8 +997,6 @@ type ResourceQuotasService interface { // ListQuotas returns all quota values under the metastore. There are no // SLAs on the freshness of the counts returned. This API does not trigger a // refresh of quota counts. - // - // Use ListQuotasAll() to get all QuotaInfo instances, which will iterate over every result page. ListQuotas(ctx context.Context, request ListQuotasRequest) (*ListQuotasResponse, error) } @@ -997,6 +1005,8 @@ type ResourceQuotasService interface { // access (or list) a table or view in a schema, users must have the USE_SCHEMA // data permission on the schema and its parent catalog, and they must have the // SELECT permission on the table or view. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type SchemasService interface { // Create a schema. @@ -1027,8 +1037,6 @@ 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. - // - // Use ListAll() to get all SchemaInfo instances, which will iterate over every result page. List(ctx context.Context, request ListSchemasRequest) (*ListSchemasResponse, error) // Update a schema. @@ -1054,6 +1062,8 @@ type SchemasService interface { // To create storage credentials, you must be a Databricks account admin. The // account admin who creates the storage credential can delegate ownership to // another user or group to manage permissions on it. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type StorageCredentialsService interface { // Create a storage credential. @@ -1081,8 +1091,6 @@ 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. - // - // Use ListAll() to get all StorageCredentialInfo instances, which will iterate over every result page. List(ctx context.Context, request ListStorageCredentialsRequest) (*ListStorageCredentialsResponse, error) // Update a credential. @@ -1111,6 +1119,8 @@ type StorageCredentialsService interface { // A system schema is a schema that lives within the system catalog. A system // schema may contain information about customer usage of Unity Catalog such as // audit-logs, billing-logs, lineage information, etc. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type SystemSchemasService interface { // Disable a system schema. @@ -1129,8 +1139,6 @@ type SystemSchemasService interface { // // Gets an array of system schemas for a metastore. The caller must be an // account admin or a metastore admin. - // - // Use ListAll() to get all SystemSchemaInfo instances, which will iterate over every result page. List(ctx context.Context, request ListSystemSchemasRequest) (*ListSystemSchemasResponse, error) } @@ -1147,6 +1155,8 @@ type SystemSchemasService interface { // You can declare primary keys and foreign keys as part of the table // specification during table creation. You can also add or drop constraints on // existing tables. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type TableConstraintsService interface { // Create a table constraint. @@ -1188,6 +1198,8 @@ type TableConstraintsService interface { // // A table can be managed or external. From an API perspective, a __VIEW__ is a // particular kind of table (rather than a managed or external table). +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type TablesService interface { // Delete a table. @@ -1232,8 +1244,6 @@ 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. - // - // Use ListAll() to get all TableInfo instances, which will iterate over every result page. List(ctx context.Context, request ListTablesRequest) (*ListTablesResponse, error) // List table summaries. @@ -1251,8 +1261,6 @@ type TablesService interface { // // There is no guarantee of a specific ordering of the elements in the // array. - // - // Use ListSummariesAll() to get all TableSummary instances, which will iterate over every result page. ListSummaries(ctx context.Context, request ListSummariesRequest) (*ListTableSummariesResponse, error) // Update a table owner. @@ -1281,6 +1289,8 @@ type TablesService interface { // SCHEMA is a schema level permission that can only be granted by catalog admin // explicitly and is not included in schema ownership or ALL PRIVILEGES on the // schema for security reason. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type TemporaryTableCredentialsService interface { // Generate a temporary table credential. @@ -1301,6 +1311,8 @@ type TemporaryTableCredentialsService interface { // cluster machines, storing library and config files of arbitrary formats such // as .whl or .txt centrally and providing secure access across workspaces to // it, or transforming and querying non-tabular data files in ETL. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type VolumesService interface { // Create a Volume. @@ -1350,8 +1362,6 @@ type VolumesService interface { // // There is no guarantee of a specific ordering of the elements in the // array. - // - // Use ListAll() to get all VolumeInfo instances, which will iterate over every result page. List(ctx context.Context, request ListVolumesRequest) (*ListVolumesResponseContent, error) // Get a Volume. @@ -1398,6 +1408,8 @@ type VolumesService interface { // // Securable types that support binding: - catalog - storage_credential - // credential - external_location +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type WorkspaceBindingsService interface { // Get catalog workspace bindings. @@ -1410,8 +1422,6 @@ type WorkspaceBindingsService interface { // // Gets workspace bindings of the securable. The caller must be a metastore // admin or an owner of the securable. - // - // Use GetBindingsAll() to get all WorkspaceBinding instances, which will iterate over every result page. GetBindings(ctx context.Context, request GetBindingsRequest) (*GetWorkspaceBindingsResponse, error) // Update catalog workspace bindings. diff --git a/service/catalog/model.go b/service/catalog/model.go index 726327ff9..892007629 100755 --- a/service/catalog/model.go +++ b/service/catalog/model.go @@ -114,6 +114,17 @@ func (f *ArtifactType) Set(v string) error { } } +// Values returns all possible values of ArtifactType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ArtifactType) Values() []ArtifactType { + return []ArtifactType{ + ArtifactTypeInitScript, + ArtifactTypeLibraryJar, + ArtifactTypeLibraryMaven, + } +} + // Type always returns ArtifactType to satisfy [pflag.Value] interface func (f *ArtifactType) Type() string { return "ArtifactType" @@ -471,6 +482,16 @@ func (f *CatalogIsolationMode) Set(v string) error { } } +// Values returns all possible values of CatalogIsolationMode. +// +// There is no guarantee on the order of the values in the slice. +func (f *CatalogIsolationMode) Values() []CatalogIsolationMode { + return []CatalogIsolationMode{ + CatalogIsolationModeIsolated, + CatalogIsolationModeOpen, + } +} + // Type always returns CatalogIsolationMode to satisfy [pflag.Value] interface func (f *CatalogIsolationMode) Type() string { return "CatalogIsolationMode" @@ -509,6 +530,21 @@ func (f *CatalogType) Set(v string) error { } } +// Values returns all possible values of CatalogType. +// +// There is no guarantee on the order of the values in the slice. +func (f *CatalogType) Values() []CatalogType { + return []CatalogType{ + CatalogTypeDeltasharingCatalog, + CatalogTypeForeignCatalog, + CatalogTypeInternalCatalog, + CatalogTypeManagedCatalog, + CatalogTypeManagedOnlineCatalog, + CatalogTypeSystemCatalog, + CatalogTypeUnknownCatalogType, + } +} + // Type always returns CatalogType to satisfy [pflag.Value] interface func (f *CatalogType) Type() string { return "CatalogType" @@ -646,6 +682,38 @@ func (f *ColumnTypeName) Set(v string) error { } } +// Values returns all possible values of ColumnTypeName. +// +// There is no guarantee on the order of the values in the slice. +func (f *ColumnTypeName) Values() []ColumnTypeName { + return []ColumnTypeName{ + ColumnTypeNameArray, + ColumnTypeNameBinary, + ColumnTypeNameBoolean, + ColumnTypeNameByte, + ColumnTypeNameChar, + ColumnTypeNameDate, + ColumnTypeNameDecimal, + ColumnTypeNameDouble, + ColumnTypeNameFloat, + ColumnTypeNameGeography, + ColumnTypeNameGeometry, + ColumnTypeNameInt, + ColumnTypeNameInterval, + ColumnTypeNameLong, + ColumnTypeNameMap, + ColumnTypeNameNull, + ColumnTypeNameShort, + ColumnTypeNameString, + ColumnTypeNameStruct, + ColumnTypeNameTableType, + ColumnTypeNameTimestamp, + ColumnTypeNameTimestampNtz, + ColumnTypeNameUserDefinedType, + ColumnTypeNameVariant, + } +} + // Type always returns ColumnTypeName to satisfy [pflag.Value] interface func (f *ColumnTypeName) Type() string { return "ColumnTypeName" @@ -746,6 +814,27 @@ func (f *ConnectionType) Set(v string) error { } } +// Values returns all possible values of ConnectionType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ConnectionType) Values() []ConnectionType { + return []ConnectionType{ + ConnectionTypeBigquery, + ConnectionTypeDatabricks, + ConnectionTypeGlue, + ConnectionTypeHiveMetastore, + ConnectionTypeHttp, + ConnectionTypeMysql, + ConnectionTypeOracle, + ConnectionTypePostgresql, + ConnectionTypeRedshift, + ConnectionTypeSnowflake, + ConnectionTypeSqldw, + ConnectionTypeSqlserver, + ConnectionTypeTeradata, + } +} + // Type always returns ConnectionType to satisfy [pflag.Value] interface func (f *ConnectionType) Type() string { return "ConnectionType" @@ -998,6 +1087,15 @@ func (f *CreateFunctionParameterStyle) Set(v string) error { } } +// Values returns all possible values of CreateFunctionParameterStyle. +// +// There is no guarantee on the order of the values in the slice. +func (f *CreateFunctionParameterStyle) Values() []CreateFunctionParameterStyle { + return []CreateFunctionParameterStyle{ + CreateFunctionParameterStyleS, + } +} + // Type always returns CreateFunctionParameterStyle to satisfy [pflag.Value] interface func (f *CreateFunctionParameterStyle) Type() string { return "CreateFunctionParameterStyle" @@ -1034,6 +1132,16 @@ func (f *CreateFunctionRoutineBody) Set(v string) error { } } +// Values returns all possible values of CreateFunctionRoutineBody. +// +// There is no guarantee on the order of the values in the slice. +func (f *CreateFunctionRoutineBody) Values() []CreateFunctionRoutineBody { + return []CreateFunctionRoutineBody{ + CreateFunctionRoutineBodyExternal, + CreateFunctionRoutineBodySql, + } +} + // Type always returns CreateFunctionRoutineBody to satisfy [pflag.Value] interface func (f *CreateFunctionRoutineBody) Type() string { return "CreateFunctionRoutineBody" @@ -1060,6 +1168,15 @@ func (f *CreateFunctionSecurityType) Set(v string) error { } } +// Values returns all possible values of CreateFunctionSecurityType. +// +// There is no guarantee on the order of the values in the slice. +func (f *CreateFunctionSecurityType) Values() []CreateFunctionSecurityType { + return []CreateFunctionSecurityType{ + CreateFunctionSecurityTypeDefiner, + } +} + // Type always returns CreateFunctionSecurityType to satisfy [pflag.Value] interface func (f *CreateFunctionSecurityType) Type() string { return "CreateFunctionSecurityType" @@ -1090,6 +1207,17 @@ func (f *CreateFunctionSqlDataAccess) Set(v string) error { } } +// Values returns all possible values of CreateFunctionSqlDataAccess. +// +// There is no guarantee on the order of the values in the slice. +func (f *CreateFunctionSqlDataAccess) Values() []CreateFunctionSqlDataAccess { + return []CreateFunctionSqlDataAccess{ + CreateFunctionSqlDataAccessContainsSql, + CreateFunctionSqlDataAccessNoSql, + CreateFunctionSqlDataAccessReadsSqlData, + } +} + // Type always returns CreateFunctionSqlDataAccess to satisfy [pflag.Value] interface func (f *CreateFunctionSqlDataAccess) Type() string { return "CreateFunctionSqlDataAccess" @@ -1389,6 +1517,16 @@ func (f *CredentialPurpose) Set(v string) error { } } +// Values returns all possible values of CredentialPurpose. +// +// There is no guarantee on the order of the values in the slice. +func (f *CredentialPurpose) Values() []CredentialPurpose { + return []CredentialPurpose{ + CredentialPurposeService, + CredentialPurposeStorage, + } +} + // Type always returns CredentialPurpose to satisfy [pflag.Value] interface func (f *CredentialPurpose) Type() string { return "CredentialPurpose" @@ -1417,6 +1555,16 @@ func (f *CredentialType) Set(v string) error { } } +// Values returns all possible values of CredentialType. +// +// There is no guarantee on the order of the values in the slice. +func (f *CredentialType) Values() []CredentialType { + return []CredentialType{ + CredentialTypeBearerToken, + CredentialTypeUsernamePassword, + } +} + // Type always returns CredentialType to satisfy [pflag.Value] interface func (f *CredentialType) Type() string { return "CredentialType" @@ -1504,6 +1652,37 @@ func (f *DataSourceFormat) Set(v string) error { } } +// Values returns all possible values of DataSourceFormat. +// +// There is no guarantee on the order of the values in the slice. +func (f *DataSourceFormat) Values() []DataSourceFormat { + return []DataSourceFormat{ + DataSourceFormatAvro, + DataSourceFormatBigqueryFormat, + DataSourceFormatCsv, + DataSourceFormatDatabricksFormat, + DataSourceFormatDelta, + DataSourceFormatDeltasharing, + DataSourceFormatHiveCustom, + DataSourceFormatHiveSerde, + DataSourceFormatJson, + DataSourceFormatMysqlFormat, + DataSourceFormatNetsuiteFormat, + DataSourceFormatOrc, + DataSourceFormatParquet, + DataSourceFormatPostgresqlFormat, + DataSourceFormatRedshiftFormat, + DataSourceFormatSalesforceFormat, + DataSourceFormatSnowflakeFormat, + DataSourceFormatSqldwFormat, + DataSourceFormatSqlserverFormat, + DataSourceFormatText, + DataSourceFormatUnityCatalog, + DataSourceFormatVectorIndexFormat, + DataSourceFormatWorkdayRaasFormat, + } +} + // Type always returns DataSourceFormat to satisfy [pflag.Value] interface func (f *DataSourceFormat) Type() string { return "DataSourceFormat" @@ -1600,6 +1779,20 @@ func (f *DatabaseInstanceState) Set(v string) error { } } +// Values returns all possible values of DatabaseInstanceState. +// +// There is no guarantee on the order of the values in the slice. +func (f *DatabaseInstanceState) Values() []DatabaseInstanceState { + return []DatabaseInstanceState{ + DatabaseInstanceStateAvailable, + DatabaseInstanceStateDeleting, + DatabaseInstanceStateFailingOver, + DatabaseInstanceStateStarting, + DatabaseInstanceStateStopped, + DatabaseInstanceStateUpdating, + } +} + // Type always returns DatabaseInstanceState to satisfy [pflag.Value] interface func (f *DatabaseInstanceState) Type() string { return "DatabaseInstanceState" @@ -2031,6 +2224,16 @@ func (f *EffectivePredictiveOptimizationFlagInheritedFromType) Set(v string) err } } +// Values returns all possible values of EffectivePredictiveOptimizationFlagInheritedFromType. +// +// There is no guarantee on the order of the values in the slice. +func (f *EffectivePredictiveOptimizationFlagInheritedFromType) Values() []EffectivePredictiveOptimizationFlagInheritedFromType { + return []EffectivePredictiveOptimizationFlagInheritedFromType{ + EffectivePredictiveOptimizationFlagInheritedFromTypeCatalog, + EffectivePredictiveOptimizationFlagInheritedFromTypeSchema, + } +} + // Type always returns EffectivePredictiveOptimizationFlagInheritedFromType to satisfy [pflag.Value] interface func (f *EffectivePredictiveOptimizationFlagInheritedFromType) Type() string { return "EffectivePredictiveOptimizationFlagInheritedFromType" @@ -2101,6 +2304,17 @@ func (f *EnablePredictiveOptimization) Set(v string) error { } } +// Values returns all possible values of EnablePredictiveOptimization. +// +// There is no guarantee on the order of the values in the slice. +func (f *EnablePredictiveOptimization) Values() []EnablePredictiveOptimization { + return []EnablePredictiveOptimization{ + EnablePredictiveOptimizationDisable, + EnablePredictiveOptimizationEnable, + EnablePredictiveOptimizationInherit, + } +} + // Type always returns EnablePredictiveOptimization to satisfy [pflag.Value] interface func (f *EnablePredictiveOptimization) Type() string { return "EnablePredictiveOptimization" @@ -2368,6 +2582,15 @@ func (f *FunctionInfoParameterStyle) Set(v string) error { } } +// Values returns all possible values of FunctionInfoParameterStyle. +// +// There is no guarantee on the order of the values in the slice. +func (f *FunctionInfoParameterStyle) Values() []FunctionInfoParameterStyle { + return []FunctionInfoParameterStyle{ + FunctionInfoParameterStyleS, + } +} + // Type always returns FunctionInfoParameterStyle to satisfy [pflag.Value] interface func (f *FunctionInfoParameterStyle) Type() string { return "FunctionInfoParameterStyle" @@ -2399,6 +2622,16 @@ func (f *FunctionInfoRoutineBody) Set(v string) error { } } +// Values returns all possible values of FunctionInfoRoutineBody. +// +// There is no guarantee on the order of the values in the slice. +func (f *FunctionInfoRoutineBody) Values() []FunctionInfoRoutineBody { + return []FunctionInfoRoutineBody{ + FunctionInfoRoutineBodyExternal, + FunctionInfoRoutineBodySql, + } +} + // Type always returns FunctionInfoRoutineBody to satisfy [pflag.Value] interface func (f *FunctionInfoRoutineBody) Type() string { return "FunctionInfoRoutineBody" @@ -2425,6 +2658,15 @@ func (f *FunctionInfoSecurityType) Set(v string) error { } } +// Values returns all possible values of FunctionInfoSecurityType. +// +// There is no guarantee on the order of the values in the slice. +func (f *FunctionInfoSecurityType) Values() []FunctionInfoSecurityType { + return []FunctionInfoSecurityType{ + FunctionInfoSecurityTypeDefiner, + } +} + // Type always returns FunctionInfoSecurityType to satisfy [pflag.Value] interface func (f *FunctionInfoSecurityType) Type() string { return "FunctionInfoSecurityType" @@ -2455,6 +2697,17 @@ func (f *FunctionInfoSqlDataAccess) Set(v string) error { } } +// Values returns all possible values of FunctionInfoSqlDataAccess. +// +// There is no guarantee on the order of the values in the slice. +func (f *FunctionInfoSqlDataAccess) Values() []FunctionInfoSqlDataAccess { + return []FunctionInfoSqlDataAccess{ + FunctionInfoSqlDataAccessContainsSql, + FunctionInfoSqlDataAccessNoSql, + FunctionInfoSqlDataAccessReadsSqlData, + } +} + // Type always returns FunctionInfoSqlDataAccess to satisfy [pflag.Value] interface func (f *FunctionInfoSqlDataAccess) Type() string { return "FunctionInfoSqlDataAccess" @@ -2524,6 +2777,15 @@ func (f *FunctionParameterMode) Set(v string) error { } } +// Values returns all possible values of FunctionParameterMode. +// +// There is no guarantee on the order of the values in the slice. +func (f *FunctionParameterMode) Values() []FunctionParameterMode { + return []FunctionParameterMode{ + FunctionParameterModeIn, + } +} + // Type always returns FunctionParameterMode to satisfy [pflag.Value] interface func (f *FunctionParameterMode) Type() string { return "FunctionParameterMode" @@ -2552,6 +2814,16 @@ func (f *FunctionParameterType) Set(v string) error { } } +// Values returns all possible values of FunctionParameterType. +// +// There is no guarantee on the order of the values in the slice. +func (f *FunctionParameterType) Values() []FunctionParameterType { + return []FunctionParameterType{ + FunctionParameterTypeColumn, + FunctionParameterTypeParam, + } +} + // Type always returns FunctionParameterType to satisfy [pflag.Value] interface func (f *FunctionParameterType) Type() string { return "FunctionParameterType" @@ -2959,6 +3231,16 @@ func (f *GetMetastoreSummaryResponseDeltaSharingScope) Set(v string) error { } } +// Values returns all possible values of GetMetastoreSummaryResponseDeltaSharingScope. +// +// There is no guarantee on the order of the values in the slice. +func (f *GetMetastoreSummaryResponseDeltaSharingScope) Values() []GetMetastoreSummaryResponseDeltaSharingScope { + return []GetMetastoreSummaryResponseDeltaSharingScope{ + GetMetastoreSummaryResponseDeltaSharingScopeInternal, + GetMetastoreSummaryResponseDeltaSharingScopeInternalAndExternal, + } +} + // Type always returns GetMetastoreSummaryResponseDeltaSharingScope to satisfy [pflag.Value] interface func (f *GetMetastoreSummaryResponseDeltaSharingScope) Type() string { return "GetMetastoreSummaryResponseDeltaSharingScope" @@ -3146,6 +3428,16 @@ func (f *IsolationMode) Set(v string) error { } } +// Values returns all possible values of IsolationMode. +// +// There is no guarantee on the order of the values in the slice. +func (f *IsolationMode) Values() []IsolationMode { + return []IsolationMode{ + IsolationModeIsolationModeIsolated, + IsolationModeIsolationModeOpen, + } +} + // Type always returns IsolationMode to satisfy [pflag.Value] interface func (f *IsolationMode) Type() string { return "IsolationMode" @@ -3915,6 +4207,15 @@ func (f *MatchType) Set(v string) error { } } +// Values returns all possible values of MatchType. +// +// There is no guarantee on the order of the values in the slice. +func (f *MatchType) Values() []MatchType { + return []MatchType{ + MatchTypePrefixMatch, + } +} + // Type always returns MatchType to satisfy [pflag.Value] interface func (f *MatchType) Type() string { return "MatchType" @@ -4017,6 +4318,16 @@ func (f *MetastoreInfoDeltaSharingScope) Set(v string) error { } } +// Values returns all possible values of MetastoreInfoDeltaSharingScope. +// +// There is no guarantee on the order of the values in the slice. +func (f *MetastoreInfoDeltaSharingScope) Values() []MetastoreInfoDeltaSharingScope { + return []MetastoreInfoDeltaSharingScope{ + MetastoreInfoDeltaSharingScopeInternal, + MetastoreInfoDeltaSharingScopeInternalAndExternal, + } +} + // Type always returns MetastoreInfoDeltaSharingScope to satisfy [pflag.Value] interface func (f *MetastoreInfoDeltaSharingScope) Type() string { return "MetastoreInfoDeltaSharingScope" @@ -4113,6 +4424,17 @@ func (f *ModelVersionInfoStatus) Set(v string) error { } } +// Values returns all possible values of ModelVersionInfoStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *ModelVersionInfoStatus) Values() []ModelVersionInfoStatus { + return []ModelVersionInfoStatus{ + ModelVersionInfoStatusFailedRegistration, + ModelVersionInfoStatusPendingRegistration, + ModelVersionInfoStatusReady, + } +} + // Type always returns ModelVersionInfoStatus to satisfy [pflag.Value] interface func (f *ModelVersionInfoStatus) Type() string { return "ModelVersionInfoStatus" @@ -4153,6 +4475,16 @@ func (f *MonitorCronSchedulePauseStatus) Set(v string) error { } } +// Values returns all possible values of MonitorCronSchedulePauseStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *MonitorCronSchedulePauseStatus) Values() []MonitorCronSchedulePauseStatus { + return []MonitorCronSchedulePauseStatus{ + MonitorCronSchedulePauseStatusPaused, + MonitorCronSchedulePauseStatusUnpaused, + } +} + // Type always returns MonitorCronSchedulePauseStatus to satisfy [pflag.Value] interface func (f *MonitorCronSchedulePauseStatus) Type() string { return "MonitorCronSchedulePauseStatus" @@ -4244,6 +4576,16 @@ func (f *MonitorInferenceLogProblemType) Set(v string) error { } } +// Values returns all possible values of MonitorInferenceLogProblemType. +// +// There is no guarantee on the order of the values in the slice. +func (f *MonitorInferenceLogProblemType) Values() []MonitorInferenceLogProblemType { + return []MonitorInferenceLogProblemType{ + MonitorInferenceLogProblemTypeProblemTypeClassification, + MonitorInferenceLogProblemTypeProblemTypeRegression, + } +} + // Type always returns MonitorInferenceLogProblemType to satisfy [pflag.Value] interface func (f *MonitorInferenceLogProblemType) Type() string { return "MonitorInferenceLogProblemType" @@ -4340,6 +4682,19 @@ func (f *MonitorInfoStatus) Set(v string) error { } } +// Values returns all possible values of MonitorInfoStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *MonitorInfoStatus) Values() []MonitorInfoStatus { + return []MonitorInfoStatus{ + MonitorInfoStatusMonitorStatusActive, + MonitorInfoStatusMonitorStatusDeletePending, + MonitorInfoStatusMonitorStatusError, + MonitorInfoStatusMonitorStatusFailed, + MonitorInfoStatusMonitorStatusPending, + } +} + // Type always returns MonitorInfoStatus to satisfy [pflag.Value] interface func (f *MonitorInfoStatus) Type() string { return "MonitorInfoStatus" @@ -4406,6 +4761,17 @@ func (f *MonitorMetricType) Set(v string) error { } } +// Values returns all possible values of MonitorMetricType. +// +// There is no guarantee on the order of the values in the slice. +func (f *MonitorMetricType) Values() []MonitorMetricType { + return []MonitorMetricType{ + MonitorMetricTypeCustomMetricTypeAggregate, + MonitorMetricTypeCustomMetricTypeDerived, + MonitorMetricTypeCustomMetricTypeDrift, + } +} + // Type always returns MonitorMetricType to satisfy [pflag.Value] interface func (f *MonitorMetricType) Type() string { return "MonitorMetricType" @@ -4476,6 +4842,19 @@ func (f *MonitorRefreshInfoState) Set(v string) error { } } +// Values returns all possible values of MonitorRefreshInfoState. +// +// There is no guarantee on the order of the values in the slice. +func (f *MonitorRefreshInfoState) Values() []MonitorRefreshInfoState { + return []MonitorRefreshInfoState{ + MonitorRefreshInfoStateCanceled, + MonitorRefreshInfoStateFailed, + MonitorRefreshInfoStatePending, + MonitorRefreshInfoStateRunning, + MonitorRefreshInfoStateSuccess, + } +} + // Type always returns MonitorRefreshInfoState to satisfy [pflag.Value] interface func (f *MonitorRefreshInfoState) Type() string { return "MonitorRefreshInfoState" @@ -4504,6 +4883,16 @@ func (f *MonitorRefreshInfoTrigger) Set(v string) error { } } +// Values returns all possible values of MonitorRefreshInfoTrigger. +// +// There is no guarantee on the order of the values in the slice. +func (f *MonitorRefreshInfoTrigger) Values() []MonitorRefreshInfoTrigger { + return []MonitorRefreshInfoTrigger{ + MonitorRefreshInfoTriggerManual, + MonitorRefreshInfoTriggerSchedule, + } +} + // Type always returns MonitorRefreshInfoTrigger to satisfy [pflag.Value] interface func (f *MonitorRefreshInfoTrigger) Type() string { return "MonitorRefreshInfoTrigger" @@ -4672,6 +5061,25 @@ func (f *OnlineTableState) Set(v string) error { } } +// Values returns all possible values of OnlineTableState. +// +// There is no guarantee on the order of the values in the slice. +func (f *OnlineTableState) Values() []OnlineTableState { + return []OnlineTableState{ + OnlineTableStateOffline, + OnlineTableStateOfflineFailed, + OnlineTableStateOnline, + OnlineTableStateOnlineContinuousUpdate, + OnlineTableStateOnlineNoPendingUpdate, + OnlineTableStateOnlinePipelineFailed, + OnlineTableStateOnlineTriggeredUpdate, + OnlineTableStateOnlineUpdatingPipelineResources, + OnlineTableStateProvisioning, + OnlineTableStateProvisioningInitialSnapshot, + OnlineTableStateProvisioningPipelineResources, + } +} + // Type always returns OnlineTableState to satisfy [pflag.Value] interface func (f *OnlineTableState) Type() string { return "OnlineTableState" @@ -4883,6 +5291,63 @@ func (f *Privilege) Set(v string) error { } } +// Values returns all possible values of Privilege. +// +// There is no guarantee on the order of the values in the slice. +func (f *Privilege) Values() []Privilege { + return []Privilege{ + PrivilegeAccess, + PrivilegeAllPrivileges, + PrivilegeApplyTag, + PrivilegeBrowse, + PrivilegeCreate, + PrivilegeCreateCatalog, + PrivilegeCreateCleanRoom, + PrivilegeCreateConnection, + PrivilegeCreateExternalLocation, + PrivilegeCreateExternalTable, + PrivilegeCreateExternalVolume, + PrivilegeCreateForeignCatalog, + PrivilegeCreateForeignSecurable, + PrivilegeCreateFunction, + PrivilegeCreateManagedStorage, + PrivilegeCreateMaterializedView, + PrivilegeCreateModel, + PrivilegeCreateProvider, + PrivilegeCreateRecipient, + PrivilegeCreateSchema, + PrivilegeCreateServiceCredential, + PrivilegeCreateShare, + PrivilegeCreateStorageCredential, + PrivilegeCreateTable, + PrivilegeCreateView, + PrivilegeCreateVolume, + PrivilegeExecute, + PrivilegeExecuteCleanRoomTask, + PrivilegeManage, + PrivilegeManageAllowlist, + PrivilegeModify, + PrivilegeModifyCleanRoom, + PrivilegeReadFiles, + PrivilegeReadPrivateFiles, + PrivilegeReadVolume, + PrivilegeRefresh, + PrivilegeSelect, + PrivilegeSetSharePermission, + PrivilegeUsage, + PrivilegeUseCatalog, + PrivilegeUseConnection, + PrivilegeUseMarketplaceAssets, + PrivilegeUseProvider, + PrivilegeUseRecipient, + PrivilegeUseSchema, + PrivilegeUseShare, + PrivilegeWriteFiles, + PrivilegeWritePrivateFiles, + PrivilegeWriteVolume, + } +} + // Type always returns Privilege to satisfy [pflag.Value] interface func (f *Privilege) Type() string { return "Privilege" @@ -4944,6 +5409,20 @@ func (f *ProvisioningInfoState) Set(v string) error { } } +// Values returns all possible values of ProvisioningInfoState. +// +// There is no guarantee on the order of the values in the slice. +func (f *ProvisioningInfoState) Values() []ProvisioningInfoState { + return []ProvisioningInfoState{ + ProvisioningInfoStateActive, + ProvisioningInfoStateDegraded, + ProvisioningInfoStateDeleting, + ProvisioningInfoStateFailed, + ProvisioningInfoStateProvisioning, + ProvisioningInfoStateUpdating, + } +} + // Type always returns ProvisioningInfoState to satisfy [pflag.Value] interface func (f *ProvisioningInfoState) Type() string { return "ProvisioningInfoState" @@ -5240,6 +5719,32 @@ func (f *SecurableType) Set(v string) error { } } +// Values returns all possible values of SecurableType. +// +// There is no guarantee on the order of the values in the slice. +func (f *SecurableType) Values() []SecurableType { + return []SecurableType{ + SecurableTypeCatalog, + SecurableTypeCleanRoom, + SecurableTypeConnection, + SecurableTypeCredential, + SecurableTypeExternalLocation, + SecurableTypeExternalMetadata, + SecurableTypeFunction, + SecurableTypeMetastore, + SecurableTypePipeline, + SecurableTypeProvider, + SecurableTypeRecipient, + SecurableTypeSchema, + SecurableTypeShare, + SecurableTypeStagingTable, + SecurableTypeStorageCredential, + SecurableTypeTable, + SecurableTypeUnknownSecurableType, + SecurableTypeVolume, + } +} + // Type always returns SecurableType to satisfy [pflag.Value] interface func (f *SecurableType) Type() string { return "SecurableType" @@ -5320,6 +5825,16 @@ func (f *SseEncryptionDetailsAlgorithm) Set(v string) error { } } +// Values returns all possible values of SseEncryptionDetailsAlgorithm. +// +// There is no guarantee on the order of the values in the slice. +func (f *SseEncryptionDetailsAlgorithm) Values() []SseEncryptionDetailsAlgorithm { + return []SseEncryptionDetailsAlgorithm{ + SseEncryptionDetailsAlgorithmAwsSseKms, + SseEncryptionDetailsAlgorithmAwsSseS3, + } +} + // Type always returns SseEncryptionDetailsAlgorithm to satisfy [pflag.Value] interface func (f *SseEncryptionDetailsAlgorithm) Type() string { return "SseEncryptionDetailsAlgorithm" @@ -5447,6 +5962,17 @@ func (f *SyncedTableSchedulingPolicy) Set(v string) error { } } +// Values returns all possible values of SyncedTableSchedulingPolicy. +// +// There is no guarantee on the order of the values in the slice. +func (f *SyncedTableSchedulingPolicy) Values() []SyncedTableSchedulingPolicy { + return []SyncedTableSchedulingPolicy{ + SyncedTableSchedulingPolicyContinuous, + SyncedTableSchedulingPolicySnapshot, + SyncedTableSchedulingPolicyTriggered, + } +} + // Type always returns SyncedTableSchedulingPolicy to satisfy [pflag.Value] interface func (f *SyncedTableSchedulingPolicy) Type() string { return "SyncedTableSchedulingPolicy" @@ -5637,6 +6163,16 @@ func (f *TableOperation) Set(v string) error { } } +// Values returns all possible values of TableOperation. +// +// There is no guarantee on the order of the values in the slice. +func (f *TableOperation) Values() []TableOperation { + return []TableOperation{ + TableOperationRead, + TableOperationReadWrite, + } +} + // Type always returns TableOperation to satisfy [pflag.Value] interface func (f *TableOperation) Type() string { return "TableOperation" @@ -5702,6 +6238,22 @@ func (f *TableType) Set(v string) error { } } +// Values returns all possible values of TableType. +// +// There is no guarantee on the order of the values in the slice. +func (f *TableType) Values() []TableType { + return []TableType{ + TableTypeExternal, + TableTypeExternalShallowClone, + TableTypeForeign, + TableTypeManaged, + TableTypeManagedShallowClone, + TableTypeMaterializedView, + TableTypeStreamingTable, + TableTypeView, + } +} + // Type always returns TableType to satisfy [pflag.Value] interface func (f *TableType) Type() string { return "TableType" @@ -6039,6 +6591,16 @@ func (f *UpdateMetastoreDeltaSharingScope) Set(v string) error { } } +// Values returns all possible values of UpdateMetastoreDeltaSharingScope. +// +// There is no guarantee on the order of the values in the slice. +func (f *UpdateMetastoreDeltaSharingScope) Values() []UpdateMetastoreDeltaSharingScope { + return []UpdateMetastoreDeltaSharingScope{ + UpdateMetastoreDeltaSharingScopeInternal, + UpdateMetastoreDeltaSharingScopeInternalAndExternal, + } +} + // Type always returns UpdateMetastoreDeltaSharingScope to satisfy [pflag.Value] interface func (f *UpdateMetastoreDeltaSharingScope) Type() string { return "UpdateMetastoreDeltaSharingScope" @@ -6353,6 +6915,17 @@ func (f *ValidateCredentialResult) Set(v string) error { } } +// Values returns all possible values of ValidateCredentialResult. +// +// There is no guarantee on the order of the values in the slice. +func (f *ValidateCredentialResult) Values() []ValidateCredentialResult { + return []ValidateCredentialResult{ + ValidateCredentialResultFail, + ValidateCredentialResultPass, + ValidateCredentialResultSkip, + } +} + // Type always returns ValidateCredentialResult to satisfy [pflag.Value] interface func (f *ValidateCredentialResult) Type() string { return "ValidateCredentialResult" @@ -6454,6 +7027,19 @@ func (f *ValidationResultOperation) Set(v string) error { } } +// Values returns all possible values of ValidationResultOperation. +// +// There is no guarantee on the order of the values in the slice. +func (f *ValidationResultOperation) Values() []ValidationResultOperation { + return []ValidationResultOperation{ + ValidationResultOperationDelete, + ValidationResultOperationList, + ValidationResultOperationPathExists, + ValidationResultOperationRead, + ValidationResultOperationWrite, + } +} + // Type always returns ValidationResultOperation to satisfy [pflag.Value] interface func (f *ValidationResultOperation) Type() string { return "ValidationResultOperation" @@ -6484,6 +7070,17 @@ func (f *ValidationResultResult) Set(v string) error { } } +// Values returns all possible values of ValidationResultResult. +// +// There is no guarantee on the order of the values in the slice. +func (f *ValidationResultResult) Values() []ValidationResultResult { + return []ValidationResultResult{ + ValidationResultResultFail, + ValidationResultResultPass, + ValidationResultResultSkip, + } +} + // Type always returns ValidationResultResult to satisfy [pflag.Value] interface func (f *ValidationResultResult) Type() string { return "ValidationResultResult" @@ -6571,6 +7168,16 @@ func (f *VolumeType) Set(v string) error { } } +// Values returns all possible values of VolumeType. +// +// There is no guarantee on the order of the values in the slice. +func (f *VolumeType) Values() []VolumeType { + return []VolumeType{ + VolumeTypeExternal, + VolumeTypeManaged, + } +} + // Type always returns VolumeType to satisfy [pflag.Value] interface func (f *VolumeType) Type() string { return "VolumeType" @@ -6607,6 +7214,16 @@ func (f *WorkspaceBindingBindingType) Set(v string) error { } } +// Values returns all possible values of WorkspaceBindingBindingType. +// +// There is no guarantee on the order of the values in the slice. +func (f *WorkspaceBindingBindingType) Values() []WorkspaceBindingBindingType { + return []WorkspaceBindingBindingType{ + WorkspaceBindingBindingTypeBindingTypeReadOnly, + WorkspaceBindingBindingTypeBindingTypeReadWrite, + } +} + // Type always returns WorkspaceBindingBindingType to satisfy [pflag.Value] interface func (f *WorkspaceBindingBindingType) Type() string { return "WorkspaceBindingBindingType" diff --git a/service/cleanrooms/interface.go b/service/cleanrooms/interface.go index 98262d34c..160862a43 100755 --- a/service/cleanrooms/interface.go +++ b/service/cleanrooms/interface.go @@ -8,6 +8,8 @@ import ( // Clean room assets are data and code objects — Tables, volumes, and // notebooks that are shared with the clean room. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type CleanRoomAssetsService interface { // Create an asset. @@ -31,8 +33,6 @@ type CleanRoomAssetsService interface { Get(ctx context.Context, request GetCleanRoomAssetRequest) (*CleanRoomAsset, error) // List assets. - // - // Use ListAll() to get all CleanRoomAsset instances, which will iterate over every result page. List(ctx context.Context, request ListCleanRoomAssetsRequest) (*ListCleanRoomAssetsResponse, error) // Update an asset. @@ -43,19 +43,21 @@ type CleanRoomAssetsService interface { } // Clean room task runs are the executions of notebooks in a clean room. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type CleanRoomTaskRunsService interface { // List notebook task runs. // // List all the historical notebook task runs in a clean room. - // - // Use ListAll() to get all CleanRoomNotebookTaskRun instances, which will iterate over every result page. List(ctx context.Context, request ListCleanRoomNotebookTaskRunsRequest) (*ListCleanRoomNotebookTaskRunsResponse, error) } // A clean room uses Delta Sharing and serverless compute to provide a secure // and privacy-protecting environment where multiple parties can work together // on sensitive enterprise data without direct access to each other’s data. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type CleanRoomsService interface { // Create a clean room. @@ -94,8 +96,6 @@ type CleanRoomsService interface { // // Get a list of all clean rooms of the metastore. Only clean rooms the // caller has access to are returned. - // - // Use ListAll() to get all CleanRoom instances, which will iterate over every result page. List(ctx context.Context, request ListCleanRoomsRequest) (*ListCleanRoomsResponse, error) // Update a clean room. diff --git a/service/cleanrooms/model.go b/service/cleanrooms/model.go index b51d9d7c8..a19d27ba9 100755 --- a/service/cleanrooms/model.go +++ b/service/cleanrooms/model.go @@ -77,6 +77,16 @@ func (f *CleanRoomAccessRestricted) Set(v string) error { } } +// Values returns all possible values of CleanRoomAccessRestricted. +// +// There is no guarantee on the order of the values in the slice. +func (f *CleanRoomAccessRestricted) Values() []CleanRoomAccessRestricted { + return []CleanRoomAccessRestricted{ + CleanRoomAccessRestrictedCspMismatch, + CleanRoomAccessRestrictedNoRestriction, + } +} + // Type always returns CleanRoomAccessRestricted to satisfy [pflag.Value] interface func (f *CleanRoomAccessRestricted) Type() string { return "CleanRoomAccessRestricted" @@ -164,6 +174,19 @@ func (f *CleanRoomAssetAssetType) Set(v string) error { } } +// Values returns all possible values of CleanRoomAssetAssetType. +// +// There is no guarantee on the order of the values in the slice. +func (f *CleanRoomAssetAssetType) Values() []CleanRoomAssetAssetType { + return []CleanRoomAssetAssetType{ + CleanRoomAssetAssetTypeForeignTable, + CleanRoomAssetAssetTypeNotebookFile, + CleanRoomAssetAssetTypeTable, + CleanRoomAssetAssetTypeView, + CleanRoomAssetAssetTypeVolume, + } +} + // Type always returns CleanRoomAssetAssetType to satisfy [pflag.Value] interface func (f *CleanRoomAssetAssetType) Type() string { return "CleanRoomAssetAssetType" @@ -238,6 +261,17 @@ func (f *CleanRoomAssetStatusEnum) Set(v string) error { } } +// Values returns all possible values of CleanRoomAssetStatusEnum. +// +// There is no guarantee on the order of the values in the slice. +func (f *CleanRoomAssetStatusEnum) Values() []CleanRoomAssetStatusEnum { + return []CleanRoomAssetStatusEnum{ + CleanRoomAssetStatusEnumActive, + CleanRoomAssetStatusEnumPending, + CleanRoomAssetStatusEnumPermissionDenied, + } +} + // Type always returns CleanRoomAssetStatusEnum to satisfy [pflag.Value] interface func (f *CleanRoomAssetStatusEnum) Type() string { return "CleanRoomAssetStatusEnum" @@ -393,6 +427,17 @@ func (f *CleanRoomNotebookReviewNotebookReviewState) Set(v string) error { } } +// Values returns all possible values of CleanRoomNotebookReviewNotebookReviewState. +// +// There is no guarantee on the order of the values in the slice. +func (f *CleanRoomNotebookReviewNotebookReviewState) Values() []CleanRoomNotebookReviewNotebookReviewState { + return []CleanRoomNotebookReviewNotebookReviewState{ + CleanRoomNotebookReviewNotebookReviewStateApproved, + CleanRoomNotebookReviewNotebookReviewStatePending, + CleanRoomNotebookReviewNotebookReviewStateRejected, + } +} + // Type always returns CleanRoomNotebookReviewNotebookReviewState to satisfy [pflag.Value] interface func (f *CleanRoomNotebookReviewNotebookReviewState) Type() string { return "CleanRoomNotebookReviewNotebookReviewState" @@ -420,6 +465,16 @@ func (f *CleanRoomNotebookReviewNotebookReviewSubReason) Set(v string) error { } } +// Values returns all possible values of CleanRoomNotebookReviewNotebookReviewSubReason. +// +// There is no guarantee on the order of the values in the slice. +func (f *CleanRoomNotebookReviewNotebookReviewSubReason) Values() []CleanRoomNotebookReviewNotebookReviewSubReason { + return []CleanRoomNotebookReviewNotebookReviewSubReason{ + CleanRoomNotebookReviewNotebookReviewSubReasonAutoApproved, + CleanRoomNotebookReviewNotebookReviewSubReasonBackfilled, + } +} + // Type always returns CleanRoomNotebookReviewNotebookReviewSubReason to satisfy [pflag.Value] interface func (f *CleanRoomNotebookReviewNotebookReviewSubReason) Type() string { return "CleanRoomNotebookReviewNotebookReviewSubReason" @@ -507,6 +562,17 @@ func (f *CleanRoomOutputCatalogOutputCatalogStatus) Set(v string) error { } } +// Values returns all possible values of CleanRoomOutputCatalogOutputCatalogStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *CleanRoomOutputCatalogOutputCatalogStatus) Values() []CleanRoomOutputCatalogOutputCatalogStatus { + return []CleanRoomOutputCatalogOutputCatalogStatus{ + CleanRoomOutputCatalogOutputCatalogStatusCreated, + CleanRoomOutputCatalogOutputCatalogStatusNotCreated, + CleanRoomOutputCatalogOutputCatalogStatusNotEligible, + } +} + // Type always returns CleanRoomOutputCatalogOutputCatalogStatus to satisfy [pflag.Value] interface func (f *CleanRoomOutputCatalogOutputCatalogStatus) Type() string { return "CleanRoomOutputCatalogOutputCatalogStatus" @@ -573,6 +639,18 @@ func (f *CleanRoomStatusEnum) Set(v string) error { } } +// Values returns all possible values of CleanRoomStatusEnum. +// +// There is no guarantee on the order of the values in the slice. +func (f *CleanRoomStatusEnum) Values() []CleanRoomStatusEnum { + return []CleanRoomStatusEnum{ + CleanRoomStatusEnumActive, + CleanRoomStatusEnumDeleted, + CleanRoomStatusEnumFailed, + CleanRoomStatusEnumProvisioning, + } +} + // Type always returns CleanRoomStatusEnum to satisfy [pflag.Value] interface func (f *CleanRoomStatusEnum) Type() string { return "CleanRoomStatusEnum" diff --git a/service/compute/interface.go b/service/compute/interface.go index 40c9b3d96..24a7d41e6 100755 --- a/service/compute/interface.go +++ b/service/compute/interface.go @@ -29,6 +29,8 @@ import ( // If no policies exist in the workspace, the Policy drop-down doesn't appear. // Only admin users can create, edit, and delete policies. Admin users also have // access to all policies. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ClusterPoliciesService interface { // Create a new policy. @@ -68,8 +70,6 @@ type ClusterPoliciesService interface { // List cluster policies. // // Returns a list of policies accessible by the requesting user. - // - // Use ListAll() to get all Policy instances List(ctx context.Context, request ListClusterPoliciesRequest) (*ListPoliciesResponse, error) // Set cluster policy permissions. @@ -112,6 +112,8 @@ type ClusterPoliciesService interface { // terminated clusters for 30 days. To keep an all-purpose cluster configuration // even after it has been terminated for more than 30 days, an administrator can // pin a cluster to the cluster list. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ClustersService interface { // Change cluster owner. @@ -173,8 +175,6 @@ type ClustersService interface { // Retrieves a list of events about the activity of a cluster. This API is // paginated. If there are more events to read, the response includes all // the parameters necessary to request the next page of events. - // - // Use EventsAll() to get all ClusterEvent instances, which will iterate over every result page. Events(ctx context.Context, request GetEvents) (*GetEventsResponse, error) // Get cluster info. @@ -200,8 +200,6 @@ type ClustersService interface { // Return information about all pinned and active clusters, and all clusters // terminated within the last 30 days. Clusters terminated prior to this // period are not included. - // - // Use ListAll() to get all ClusterDetails instances, which will iterate over every result page. List(ctx context.Context, request ListClustersRequest) (*ListClustersResponse, error) // List node types. @@ -301,6 +299,8 @@ type ClustersService interface { // This API allows execution of Python, Scala, SQL, or R commands on running // Databricks Clusters. This API only supports (classic) all-purpose clusters. // Serverless compute is not supported. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type CommandExecutionService interface { // Cancel a command. @@ -355,6 +355,8 @@ type CommandExecutionService interface { // launch and init scripts with later position are skipped. If enough containers // fail, the entire cluster fails with a `GLOBAL_INIT_SCRIPT_FAILURE` error // code. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type GlobalInitScriptsService interface { // Create init script. @@ -378,8 +380,6 @@ type GlobalInitScriptsService interface { // all properties for each script but **not** the script contents. To // retrieve the contents of a script, use the [get a global init // script](:method:globalinitscripts/get) operation. - // - // Use ListAll() to get all GlobalInitScriptDetails instances List(ctx context.Context) (*ListGlobalInitScriptsResponse, error) // Update init script. @@ -407,6 +407,8 @@ type GlobalInitScriptsService interface { // // Databricks does not charge DBUs while instances are idle in the pool. // Instance provider billing does apply. See pricing. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type InstancePoolsService interface { // Create a new instance pool. @@ -444,8 +446,6 @@ type InstancePoolsService interface { // List instance pool info. // // Gets a list of instance pools with their statistics. - // - // Use ListAll() to get all InstancePoolAndStats instances List(ctx context.Context) (*ListInstancePools, error) // Set instance pool permissions. @@ -467,6 +467,8 @@ type InstancePoolsService interface { // instance profiles available to them. See [Secure access to S3 buckets] using // instance profiles for more information. // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [Secure access to S3 buckets]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/instance-profiles.html type InstanceProfilesService interface { @@ -504,8 +506,6 @@ type InstanceProfilesService interface { // cluster. // // This API is available to all users. - // - // Use ListAll() to get all InstanceProfile instances List(ctx context.Context) (*ListInstanceProfilesResponse, error) // Remove the instance profile. @@ -533,14 +533,14 @@ type InstanceProfilesService interface { // When you uninstall a library from a cluster, the library is removed only when // you restart the cluster. Until you restart the cluster, the status of the // uninstalled library appears as Uninstall pending restart. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type LibrariesService interface { // Get all statuses. // // Get the status of all libraries on all clusters. A status is returned for // all libraries installed on this cluster via the API or the libraries UI. - // - // Use AllClusterStatusesAll() to get all ClusterLibraryStatuses instances AllClusterStatuses(ctx context.Context) (*ListAllClusterLibraryStatusesResponse, error) // Get status. @@ -552,8 +552,6 @@ type LibrariesService interface { // the cluster, are returned first. 2. Libraries that were previously // requested to be installed on this cluster or, but are now marked for // removal, in no particular order, are returned last. - // - // Use ClusterStatusAll() to get all LibraryFullStatus instances ClusterStatus(ctx context.Context, request ClusterStatus) (*ClusterLibraryStatuses, error) // Add a library. @@ -580,6 +578,8 @@ type LibrariesService interface { // The get and list compliance APIs allow you to view the policy compliance // status of a cluster. The enforce compliance API allows you to update a // cluster to be compliant with the current version of its policy. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type PolicyComplianceForClustersService interface { // Enforce cluster policy compliance. @@ -611,8 +611,6 @@ type PolicyComplianceForClustersService interface { // Returns the policy compliance status of all clusters that use a given // policy. Clusters could be out of compliance if their policy was updated // after the cluster was last edited. - // - // Use ListComplianceAll() to get all ClusterCompliance instances, which will iterate over every result page. ListCompliance(ctx context.Context, request ListClusterCompliancesRequest) (*ListClusterCompliancesResponse, error) } @@ -625,6 +623,8 @@ type PolicyComplianceForClustersService interface { // Policy families cannot be used directly to create clusters. Instead, you // create cluster policies using a policy family. Cluster policies created using // a policy family inherit the policy family's policy definition. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type PolicyFamiliesService interface { // Get policy family information. @@ -637,7 +637,5 @@ type PolicyFamiliesService interface { // // Returns the list of policy definition types available to use at their // latest version. This API is paginated. - // - // Use ListAll() to get all PolicyFamily instances, which will iterate over every result page. List(ctx context.Context, request ListPolicyFamiliesRequest) (*ListPolicyFamiliesResponse, error) } diff --git a/service/compute/model.go b/service/compute/model.go index 86cc5d944..a43c9925f 100755 --- a/service/compute/model.go +++ b/service/compute/model.go @@ -200,6 +200,17 @@ func (f *AwsAvailability) Set(v string) error { } } +// Values returns all possible values of AwsAvailability. +// +// There is no guarantee on the order of the values in the slice. +func (f *AwsAvailability) Values() []AwsAvailability { + return []AwsAvailability{ + AwsAvailabilityOnDemand, + AwsAvailabilitySpot, + AwsAvailabilitySpotWithFallback, + } +} + // Type always returns AwsAvailability to satisfy [pflag.Value] interface func (f *AwsAvailability) Type() string { return "AwsAvailability" @@ -268,6 +279,17 @@ func (f *AzureAvailability) Set(v string) error { } } +// Values returns all possible values of AzureAvailability. +// +// There is no guarantee on the order of the values in the slice. +func (f *AzureAvailability) Values() []AzureAvailability { + return []AzureAvailability{ + AzureAvailabilityOnDemandAzure, + AzureAvailabilitySpotAzure, + AzureAvailabilitySpotWithFallbackAzure, + } +} + // Type always returns AzureAvailability to satisfy [pflag.Value] interface func (f *AzureAvailability) Type() string { return "AzureAvailability" @@ -352,6 +374,16 @@ func (f *CloudProviderNodeStatus) Set(v string) error { } } +// Values returns all possible values of CloudProviderNodeStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *CloudProviderNodeStatus) Values() []CloudProviderNodeStatus { + return []CloudProviderNodeStatus{ + CloudProviderNodeStatusNotAvailableInRegion, + CloudProviderNodeStatusNotEnabledOnSubscription, + } +} + // Type always returns CloudProviderNodeStatus to satisfy [pflag.Value] interface func (f *CloudProviderNodeStatus) Type() string { return "CloudProviderNodeStatus" @@ -982,6 +1014,17 @@ func (f *ClusterPermissionLevel) Set(v string) error { } } +// Values returns all possible values of ClusterPermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *ClusterPermissionLevel) Values() []ClusterPermissionLevel { + return []ClusterPermissionLevel{ + ClusterPermissionLevelCanAttachTo, + ClusterPermissionLevelCanManage, + ClusterPermissionLevelCanRestart, + } +} + // Type always returns ClusterPermissionLevel to satisfy [pflag.Value] interface func (f *ClusterPermissionLevel) Type() string { return "ClusterPermissionLevel" @@ -1110,6 +1153,15 @@ func (f *ClusterPolicyPermissionLevel) Set(v string) error { } } +// Values returns all possible values of ClusterPolicyPermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *ClusterPolicyPermissionLevel) Values() []ClusterPolicyPermissionLevel { + return []ClusterPolicyPermissionLevel{ + ClusterPolicyPermissionLevelCanUse, + } +} + // Type always returns ClusterPolicyPermissionLevel to satisfy [pflag.Value] interface func (f *ClusterPolicyPermissionLevel) Type() string { return "ClusterPolicyPermissionLevel" @@ -1245,6 +1297,21 @@ func (f *ClusterSource) Set(v string) error { } } +// Values returns all possible values of ClusterSource. +// +// There is no guarantee on the order of the values in the slice. +func (f *ClusterSource) Values() []ClusterSource { + return []ClusterSource{ + ClusterSourceApi, + ClusterSourceJob, + ClusterSourceModels, + ClusterSourcePipeline, + ClusterSourcePipelineMaintenance, + ClusterSourceSql, + ClusterSourceUi, + } +} + // Type always returns ClusterSource to satisfy [pflag.Value] interface func (f *ClusterSource) Type() string { return "ClusterSource" @@ -1515,6 +1582,20 @@ func (f *CommandStatus) Set(v string) error { } } +// Values returns all possible values of CommandStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *CommandStatus) Values() []CommandStatus { + return []CommandStatus{ + CommandStatusCancelled, + CommandStatusCancelling, + CommandStatusError, + CommandStatusFinished, + CommandStatusQueued, + CommandStatusRunning, + } +} + // Type always returns CommandStatus to satisfy [pflag.Value] interface func (f *CommandStatus) Type() string { return "CommandStatus" @@ -1571,6 +1652,17 @@ func (f *ContextStatus) Set(v string) error { } } +// Values returns all possible values of ContextStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *ContextStatus) Values() []ContextStatus { + return []ContextStatus{ + ContextStatusError, + ContextStatusPending, + ContextStatusRunning, + } +} + // Type always returns ContextStatus to satisfy [pflag.Value] interface func (f *ContextStatus) Type() string { return "ContextStatus" @@ -2080,6 +2172,16 @@ func (f *DataPlaneEventDetailsEventType) Set(v string) error { } } +// Values returns all possible values of DataPlaneEventDetailsEventType. +// +// There is no guarantee on the order of the values in the slice. +func (f *DataPlaneEventDetailsEventType) Values() []DataPlaneEventDetailsEventType { + return []DataPlaneEventDetailsEventType{ + DataPlaneEventDetailsEventTypeNodeBlacklisted, + DataPlaneEventDetailsEventTypeNodeExcludedDecommissioned, + } +} + // Type always returns DataPlaneEventDetailsEventType to satisfy [pflag.Value] interface func (f *DataPlaneEventDetailsEventType) Type() string { return "DataPlaneEventDetailsEventType" @@ -2171,6 +2273,24 @@ func (f *DataSecurityMode) Set(v string) error { } } +// Values returns all possible values of DataSecurityMode. +// +// There is no guarantee on the order of the values in the slice. +func (f *DataSecurityMode) Values() []DataSecurityMode { + return []DataSecurityMode{ + DataSecurityModeDataSecurityModeAuto, + DataSecurityModeDataSecurityModeDedicated, + DataSecurityModeDataSecurityModeStandard, + DataSecurityModeLegacyPassthrough, + DataSecurityModeLegacySingleUser, + DataSecurityModeLegacySingleUserStandard, + DataSecurityModeLegacyTableAcl, + DataSecurityModeNone, + DataSecurityModeSingleUser, + DataSecurityModeUserIsolation, + } +} + // Type always returns DataSecurityMode to satisfy [pflag.Value] interface func (f *DataSecurityMode) Type() string { return "DataSecurityMode" @@ -2307,6 +2427,16 @@ func (f *DiskTypeAzureDiskVolumeType) Set(v string) error { } } +// Values returns all possible values of DiskTypeAzureDiskVolumeType. +// +// There is no guarantee on the order of the values in the slice. +func (f *DiskTypeAzureDiskVolumeType) Values() []DiskTypeAzureDiskVolumeType { + return []DiskTypeAzureDiskVolumeType{ + DiskTypeAzureDiskVolumeTypePremiumLrs, + DiskTypeAzureDiskVolumeTypeStandardLrs, + } +} + // Type always returns DiskTypeAzureDiskVolumeType to satisfy [pflag.Value] interface func (f *DiskTypeAzureDiskVolumeType) Type() string { return "DiskTypeAzureDiskVolumeType" @@ -2336,6 +2466,16 @@ func (f *DiskTypeEbsVolumeType) Set(v string) error { } } +// Values returns all possible values of DiskTypeEbsVolumeType. +// +// There is no guarantee on the order of the values in the slice. +func (f *DiskTypeEbsVolumeType) Values() []DiskTypeEbsVolumeType { + return []DiskTypeEbsVolumeType{ + DiskTypeEbsVolumeTypeGeneralPurposeSsd, + DiskTypeEbsVolumeTypeThroughputOptimizedHdd, + } +} + // Type always returns DiskTypeEbsVolumeType to satisfy [pflag.Value] interface func (f *DiskTypeEbsVolumeType) Type() string { return "DiskTypeEbsVolumeType" @@ -2399,6 +2539,16 @@ func (f *EbsVolumeType) Set(v string) error { } } +// Values returns all possible values of EbsVolumeType. +// +// There is no guarantee on the order of the values in the slice. +func (f *EbsVolumeType) Values() []EbsVolumeType { + return []EbsVolumeType{ + EbsVolumeTypeGeneralPurposeSsd, + EbsVolumeTypeThroughputOptimizedHdd, + } +} + // Type always returns EbsVolumeType to satisfy [pflag.Value] interface func (f *EbsVolumeType) Type() string { return "EbsVolumeType" @@ -2881,6 +3031,18 @@ func (f *EventDetailsCause) Set(v string) error { } } +// Values returns all possible values of EventDetailsCause. +// +// There is no guarantee on the order of the values in the slice. +func (f *EventDetailsCause) Values() []EventDetailsCause { + return []EventDetailsCause{ + EventDetailsCauseAutorecovery, + EventDetailsCauseAutoscale, + EventDetailsCauseReplaceBadNodes, + EventDetailsCauseUserRequest, + } +} + // Type always returns EventDetailsCause to satisfy [pflag.Value] interface func (f *EventDetailsCause) Type() string { return "EventDetailsCause" @@ -2962,6 +3124,43 @@ func (f *EventType) Set(v string) error { } } +// Values returns all possible values of EventType. +// +// There is no guarantee on the order of the values in the slice. +func (f *EventType) Values() []EventType { + return []EventType{ + EventTypeAddNodesFailed, + EventTypeAutomaticClusterUpdate, + EventTypeAutoscalingBackoff, + EventTypeAutoscalingFailed, + EventTypeAutoscalingStatsReport, + EventTypeCreating, + EventTypeDbfsDown, + EventTypeDidNotExpandDisk, + EventTypeDriverHealthy, + EventTypeDriverNotResponding, + EventTypeDriverUnavailable, + EventTypeEdited, + EventTypeExpandedDisk, + EventTypeFailedToExpandDisk, + EventTypeInitScriptsFinished, + EventTypeInitScriptsStarted, + EventTypeMetastoreDown, + EventTypeNodesLost, + EventTypeNodeBlacklisted, + EventTypeNodeExcludedDecommissioned, + EventTypePinned, + EventTypeResizing, + EventTypeRestarting, + EventTypeRunning, + EventTypeSparkException, + EventTypeStarting, + EventTypeTerminating, + EventTypeUnpinned, + EventTypeUpsizeCompleted, + } +} + // Type always returns EventType to satisfy [pflag.Value] interface func (f *EventType) Type() string { return "EventType" @@ -3039,6 +3238,17 @@ func (f *GcpAvailability) Set(v string) error { } } +// Values returns all possible values of GcpAvailability. +// +// There is no guarantee on the order of the values in the slice. +func (f *GcpAvailability) Values() []GcpAvailability { + return []GcpAvailability{ + GcpAvailabilityOnDemandGcp, + GcpAvailabilityPreemptibleGcp, + GcpAvailabilityPreemptibleWithFallbackGcp, + } +} + // Type always returns GcpAvailability to satisfy [pflag.Value] interface func (f *GcpAvailability) Type() string { return "GcpAvailability" @@ -3193,6 +3403,16 @@ func (f *GetEventsOrder) Set(v string) error { } } +// Values returns all possible values of GetEventsOrder. +// +// There is no guarantee on the order of the values in the slice. +func (f *GetEventsOrder) Values() []GetEventsOrder { + return []GetEventsOrder{ + GetEventsOrderAsc, + GetEventsOrderDesc, + } +} + // Type always returns GetEventsOrder to satisfy [pflag.Value] interface func (f *GetEventsOrder) Type() string { return "GetEventsOrder" @@ -3557,6 +3777,21 @@ func (f *InitScriptExecutionDetailsInitScriptExecutionStatus) Set(v string) erro } } +// Values returns all possible values of InitScriptExecutionDetailsInitScriptExecutionStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *InitScriptExecutionDetailsInitScriptExecutionStatus) Values() []InitScriptExecutionDetailsInitScriptExecutionStatus { + return []InitScriptExecutionDetailsInitScriptExecutionStatus{ + InitScriptExecutionDetailsInitScriptExecutionStatusFailedExecution, + InitScriptExecutionDetailsInitScriptExecutionStatusFailedFetch, + InitScriptExecutionDetailsInitScriptExecutionStatusFuseMountFailed, + InitScriptExecutionDetailsInitScriptExecutionStatusNotExecuted, + InitScriptExecutionDetailsInitScriptExecutionStatusSkipped, + InitScriptExecutionDetailsInitScriptExecutionStatusSucceeded, + InitScriptExecutionDetailsInitScriptExecutionStatusUnknown, + } +} + // Type always returns InitScriptExecutionDetailsInitScriptExecutionStatus to satisfy [pflag.Value] interface func (f *InitScriptExecutionDetailsInitScriptExecutionStatus) Type() string { return "InitScriptExecutionDetailsInitScriptExecutionStatus" @@ -3836,6 +4071,16 @@ func (f *InstancePoolAwsAttributesAvailability) Set(v string) error { } } +// Values returns all possible values of InstancePoolAwsAttributesAvailability. +// +// There is no guarantee on the order of the values in the slice. +func (f *InstancePoolAwsAttributesAvailability) Values() []InstancePoolAwsAttributesAvailability { + return []InstancePoolAwsAttributesAvailability{ + InstancePoolAwsAttributesAvailabilityOnDemand, + InstancePoolAwsAttributesAvailabilitySpot, + } +} + // Type always returns InstancePoolAwsAttributesAvailability to satisfy [pflag.Value] interface func (f *InstancePoolAwsAttributesAvailability) Type() string { return "InstancePoolAwsAttributesAvailability" @@ -3888,6 +4133,16 @@ func (f *InstancePoolAzureAttributesAvailability) Set(v string) error { } } +// Values returns all possible values of InstancePoolAzureAttributesAvailability. +// +// There is no guarantee on the order of the values in the slice. +func (f *InstancePoolAzureAttributesAvailability) Values() []InstancePoolAzureAttributesAvailability { + return []InstancePoolAzureAttributesAvailability{ + InstancePoolAzureAttributesAvailabilityOnDemandAzure, + InstancePoolAzureAttributesAvailabilitySpotAzure, + } +} + // Type always returns InstancePoolAzureAttributesAvailability to satisfy [pflag.Value] interface func (f *InstancePoolAzureAttributesAvailability) Type() string { return "InstancePoolAzureAttributesAvailability" @@ -3976,6 +4231,16 @@ func (f *InstancePoolPermissionLevel) Set(v string) error { } } +// Values returns all possible values of InstancePoolPermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *InstancePoolPermissionLevel) Values() []InstancePoolPermissionLevel { + return []InstancePoolPermissionLevel{ + InstancePoolPermissionLevelCanAttachTo, + InstancePoolPermissionLevelCanManage, + } +} + // Type always returns InstancePoolPermissionLevel to satisfy [pflag.Value] interface func (f *InstancePoolPermissionLevel) Type() string { return "InstancePoolPermissionLevel" @@ -4050,6 +4315,17 @@ func (f *InstancePoolState) Set(v string) error { } } +// Values returns all possible values of InstancePoolState. +// +// There is no guarantee on the order of the values in the slice. +func (f *InstancePoolState) Values() []InstancePoolState { + return []InstancePoolState{ + InstancePoolStateActive, + InstancePoolStateDeleted, + InstancePoolStateStopped, + } +} + // Type always returns InstancePoolState to satisfy [pflag.Value] interface func (f *InstancePoolState) Type() string { return "InstancePoolState" @@ -4152,6 +4428,15 @@ func (f *Kind) Set(v string) error { } } +// Values returns all possible values of Kind. +// +// There is no guarantee on the order of the values in the slice. +func (f *Kind) Values() []Kind { + return []Kind{ + KindClassicPreview, + } +} + // Type always returns Kind to satisfy [pflag.Value] interface func (f *Kind) Type() string { return "Kind" @@ -4181,6 +4466,17 @@ func (f *Language) Set(v string) error { } } +// Values returns all possible values of Language. +// +// There is no guarantee on the order of the values in the slice. +func (f *Language) Values() []Language { + return []Language{ + LanguagePython, + LanguageScala, + LanguageSql, + } +} + // Type always returns Language to satisfy [pflag.Value] interface func (f *Language) Type() string { return "Language" @@ -4291,6 +4587,22 @@ func (f *LibraryInstallStatus) Set(v string) error { } } +// Values returns all possible values of LibraryInstallStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *LibraryInstallStatus) Values() []LibraryInstallStatus { + return []LibraryInstallStatus{ + LibraryInstallStatusFailed, + LibraryInstallStatusInstalled, + LibraryInstallStatusInstalling, + LibraryInstallStatusPending, + LibraryInstallStatusResolving, + LibraryInstallStatusRestored, + LibraryInstallStatusSkipped, + LibraryInstallStatusUninstallOnRestart, + } +} + // Type always returns LibraryInstallStatus to satisfy [pflag.Value] interface func (f *LibraryInstallStatus) Type() string { return "LibraryInstallStatus" @@ -4473,6 +4785,16 @@ func (f *ListClustersSortByDirection) Set(v string) error { } } +// Values returns all possible values of ListClustersSortByDirection. +// +// There is no guarantee on the order of the values in the slice. +func (f *ListClustersSortByDirection) Values() []ListClustersSortByDirection { + return []ListClustersSortByDirection{ + ListClustersSortByDirectionAsc, + ListClustersSortByDirectionDesc, + } +} + // Type always returns ListClustersSortByDirection to satisfy [pflag.Value] interface func (f *ListClustersSortByDirection) Type() string { return "ListClustersSortByDirection" @@ -4500,6 +4822,16 @@ func (f *ListClustersSortByField) Set(v string) error { } } +// Values returns all possible values of ListClustersSortByField. +// +// There is no guarantee on the order of the values in the slice. +func (f *ListClustersSortByField) Values() []ListClustersSortByField { + return []ListClustersSortByField{ + ListClustersSortByFieldClusterName, + ListClustersSortByFieldDefault, + } +} + // Type always returns ListClustersSortByField to satisfy [pflag.Value] interface func (f *ListClustersSortByField) Type() string { return "ListClustersSortByField" @@ -4586,6 +4918,16 @@ func (f *ListSortColumn) Set(v string) error { } } +// Values returns all possible values of ListSortColumn. +// +// There is no guarantee on the order of the values in the slice. +func (f *ListSortColumn) Values() []ListSortColumn { + return []ListSortColumn{ + ListSortColumnPolicyCreationTime, + ListSortColumnPolicyName, + } +} + // Type always returns ListSortColumn to satisfy [pflag.Value] interface func (f *ListSortColumn) Type() string { return "ListSortColumn" @@ -4613,6 +4955,16 @@ func (f *ListSortOrder) Set(v string) error { } } +// Values returns all possible values of ListSortOrder. +// +// There is no guarantee on the order of the values in the slice. +func (f *ListSortOrder) Values() []ListSortOrder { + return []ListSortOrder{ + ListSortOrderAsc, + ListSortOrderDesc, + } +} + // Type always returns ListSortOrder to satisfy [pflag.Value] interface func (f *ListSortOrder) Type() string { return "ListSortOrder" @@ -5019,6 +5371,19 @@ func (f *ResultType) Set(v string) error { } } +// Values returns all possible values of ResultType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ResultType) Values() []ResultType { + return []ResultType{ + ResultTypeError, + ResultTypeImage, + ResultTypeImages, + ResultTypeTable, + ResultTypeText, + } +} + // Type always returns ResultType to satisfy [pflag.Value] interface func (f *ResultType) Type() string { return "ResultType" @@ -5082,6 +5447,17 @@ func (f *RuntimeEngine) Set(v string) error { } } +// Values returns all possible values of RuntimeEngine. +// +// There is no guarantee on the order of the values in the slice. +func (f *RuntimeEngine) Values() []RuntimeEngine { + return []RuntimeEngine{ + RuntimeEngineNull, + RuntimeEnginePhoton, + RuntimeEngineStandard, + } +} + // Type always returns RuntimeEngine to satisfy [pflag.Value] interface func (f *RuntimeEngine) Type() string { return "RuntimeEngine" @@ -5249,6 +5625,22 @@ func (f *State) Set(v string) error { } } +// Values returns all possible values of State. +// +// There is no guarantee on the order of the values in the slice. +func (f *State) Values() []State { + return []State{ + StateError, + StatePending, + StateResizing, + StateRestarting, + StateRunning, + StateTerminated, + StateTerminating, + StateUnknown, + } +} + // Type always returns State to satisfy [pflag.Value] interface func (f *State) Type() string { return "State" @@ -5625,6 +6017,185 @@ func (f *TerminationReasonCode) Set(v string) error { } } +// Values returns all possible values of TerminationReasonCode. +// +// There is no guarantee on the order of the values in the slice. +func (f *TerminationReasonCode) Values() []TerminationReasonCode { + return []TerminationReasonCode{ + TerminationReasonCodeAbuseDetected, + TerminationReasonCodeAccessTokenFailure, + TerminationReasonCodeAllocationTimeout, + TerminationReasonCodeAllocationTimeoutNodeDaemonNotReady, + TerminationReasonCodeAllocationTimeoutNoHealthyAndWarmedUpClusters, + TerminationReasonCodeAllocationTimeoutNoHealthyClusters, + TerminationReasonCodeAllocationTimeoutNoMatchedClusters, + TerminationReasonCodeAllocationTimeoutNoReadyClusters, + TerminationReasonCodeAllocationTimeoutNoUnallocatedClusters, + TerminationReasonCodeAllocationTimeoutNoWarmedUpClusters, + TerminationReasonCodeAttachProjectFailure, + TerminationReasonCodeAwsAuthorizationFailure, + TerminationReasonCodeAwsInaccessibleKmsKeyFailure, + TerminationReasonCodeAwsInstanceProfileUpdateFailure, + TerminationReasonCodeAwsInsufficientFreeAddressesInSubnetFailure, + TerminationReasonCodeAwsInsufficientInstanceCapacityFailure, + TerminationReasonCodeAwsInvalidKeyPair, + TerminationReasonCodeAwsInvalidKmsKeyState, + TerminationReasonCodeAwsMaxSpotInstanceCountExceededFailure, + TerminationReasonCodeAwsRequestLimitExceeded, + TerminationReasonCodeAwsResourceQuotaExceeded, + TerminationReasonCodeAwsUnsupportedFailure, + TerminationReasonCodeAzureByokKeyPermissionFailure, + TerminationReasonCodeAzureEphemeralDiskFailure, + TerminationReasonCodeAzureInvalidDeploymentTemplate, + TerminationReasonCodeAzureOperationNotAllowedException, + TerminationReasonCodeAzurePackedDeploymentPartialFailure, + TerminationReasonCodeAzureQuotaExceededException, + TerminationReasonCodeAzureResourceManagerThrottling, + TerminationReasonCodeAzureResourceProviderThrottling, + TerminationReasonCodeAzureUnexpectedDeploymentTemplateFailure, + TerminationReasonCodeAzureVmExtensionFailure, + TerminationReasonCodeAzureVnetConfigurationFailure, + TerminationReasonCodeBootstrapTimeout, + TerminationReasonCodeBootstrapTimeoutCloudProviderException, + TerminationReasonCodeBootstrapTimeoutDueToMisconfig, + TerminationReasonCodeBudgetPolicyLimitEnforcementActivated, + TerminationReasonCodeBudgetPolicyResolutionFailure, + TerminationReasonCodeCloudAccountSetupFailure, + TerminationReasonCodeCloudOperationCancelled, + TerminationReasonCodeCloudProviderDiskSetupFailure, + TerminationReasonCodeCloudProviderInstanceNotLaunched, + TerminationReasonCodeCloudProviderLaunchFailure, + TerminationReasonCodeCloudProviderLaunchFailureDueToMisconfig, + TerminationReasonCodeCloudProviderResourceStockout, + TerminationReasonCodeCloudProviderResourceStockoutDueToMisconfig, + TerminationReasonCodeCloudProviderShutdown, + TerminationReasonCodeClusterOperationThrottled, + TerminationReasonCodeClusterOperationTimeout, + TerminationReasonCodeCommunicationLost, + TerminationReasonCodeContainerLaunchFailure, + TerminationReasonCodeControlPlaneRequestFailure, + TerminationReasonCodeControlPlaneRequestFailureDueToMisconfig, + TerminationReasonCodeDatabaseConnectionFailure, + TerminationReasonCodeDataAccessConfigChanged, + TerminationReasonCodeDbfsComponentUnhealthy, + TerminationReasonCodeDisasterRecoveryReplication, + TerminationReasonCodeDnsResolutionError, + TerminationReasonCodeDockerContainerCreationException, + TerminationReasonCodeDockerImagePullFailure, + TerminationReasonCodeDockerImageTooLargeForInstanceException, + TerminationReasonCodeDockerInvalidOsException, + TerminationReasonCodeDriverEviction, + TerminationReasonCodeDriverLaunchTimeout, + TerminationReasonCodeDriverNodeUnreachable, + TerminationReasonCodeDriverOutOfDisk, + TerminationReasonCodeDriverOutOfMemory, + TerminationReasonCodeDriverPodCreationFailure, + TerminationReasonCodeDriverUnexpectedFailure, + TerminationReasonCodeDriverUnreachable, + TerminationReasonCodeDriverUnresponsive, + TerminationReasonCodeDynamicSparkConfSizeExceeded, + TerminationReasonCodeEosSparkImage, + TerminationReasonCodeExecutionComponentUnhealthy, + TerminationReasonCodeExecutorPodUnscheduled, + TerminationReasonCodeGcpApiRateQuotaExceeded, + TerminationReasonCodeGcpDeniedByOrgPolicy, + TerminationReasonCodeGcpForbidden, + TerminationReasonCodeGcpIamTimeout, + TerminationReasonCodeGcpInaccessibleKmsKeyFailure, + TerminationReasonCodeGcpInsufficientCapacity, + TerminationReasonCodeGcpIpSpaceExhausted, + TerminationReasonCodeGcpKmsKeyPermissionDenied, + TerminationReasonCodeGcpNotFound, + TerminationReasonCodeGcpQuotaExceeded, + TerminationReasonCodeGcpResourceQuotaExceeded, + TerminationReasonCodeGcpServiceAccountAccessDenied, + TerminationReasonCodeGcpServiceAccountDeleted, + TerminationReasonCodeGcpServiceAccountNotFound, + TerminationReasonCodeGcpSubnetNotReady, + TerminationReasonCodeGcpTrustedImageProjectsViolated, + TerminationReasonCodeGkeBasedClusterTermination, + TerminationReasonCodeGlobalInitScriptFailure, + TerminationReasonCodeHiveMetastoreProvisioningFailure, + TerminationReasonCodeImagePullPermissionDenied, + TerminationReasonCodeInactivity, + TerminationReasonCodeInitContainerNotFinished, + TerminationReasonCodeInitScriptFailure, + TerminationReasonCodeInstancePoolClusterFailure, + TerminationReasonCodeInstancePoolMaxCapacityReached, + TerminationReasonCodeInstancePoolNotFound, + TerminationReasonCodeInstanceUnreachable, + TerminationReasonCodeInstanceUnreachableDueToMisconfig, + TerminationReasonCodeInternalCapacityFailure, + TerminationReasonCodeInternalError, + TerminationReasonCodeInvalidArgument, + TerminationReasonCodeInvalidAwsParameter, + TerminationReasonCodeInvalidInstancePlacementProtocol, + TerminationReasonCodeInvalidSparkImage, + TerminationReasonCodeInvalidWorkerImageFailure, + TerminationReasonCodeInPenaltyBox, + TerminationReasonCodeIpExhaustionFailure, + TerminationReasonCodeJobFinished, + TerminationReasonCodeK8sAutoscalingFailure, + TerminationReasonCodeK8sDbrClusterLaunchTimeout, + TerminationReasonCodeLazyAllocationTimeout, + TerminationReasonCodeMaintenanceMode, + TerminationReasonCodeMetastoreComponentUnhealthy, + TerminationReasonCodeNephosResourceManagement, + TerminationReasonCodeNetvisorSetupTimeout, + TerminationReasonCodeNetworkCheckControlPlaneFailure, + TerminationReasonCodeNetworkCheckDnsServerFailure, + TerminationReasonCodeNetworkCheckMetadataEndpointFailure, + TerminationReasonCodeNetworkCheckMultipleComponentsFailure, + TerminationReasonCodeNetworkCheckNicFailure, + TerminationReasonCodeNetworkCheckStorageFailure, + TerminationReasonCodeNetworkConfigurationFailure, + TerminationReasonCodeNfsMountFailure, + TerminationReasonCodeNoMatchedK8s, + TerminationReasonCodeNoMatchedK8sTestingTag, + TerminationReasonCodeNpipTunnelSetupFailure, + TerminationReasonCodeNpipTunnelTokenFailure, + TerminationReasonCodePodAssignmentFailure, + TerminationReasonCodePodSchedulingFailure, + TerminationReasonCodeRequestRejected, + TerminationReasonCodeRequestThrottled, + TerminationReasonCodeResourceUsageBlocked, + TerminationReasonCodeSecretCreationFailure, + TerminationReasonCodeSecretPermissionDenied, + TerminationReasonCodeSecretResolutionError, + TerminationReasonCodeSecurityDaemonRegistrationException, + TerminationReasonCodeSelfBootstrapFailure, + TerminationReasonCodeServerlessLongRunningTerminated, + TerminationReasonCodeSkippedSlowNodes, + TerminationReasonCodeSlowImageDownload, + TerminationReasonCodeSparkError, + TerminationReasonCodeSparkImageDownloadFailure, + TerminationReasonCodeSparkImageDownloadThrottled, + TerminationReasonCodeSparkImageNotFound, + TerminationReasonCodeSparkStartupFailure, + TerminationReasonCodeSpotInstanceTermination, + TerminationReasonCodeSshBootstrapFailure, + TerminationReasonCodeStorageDownloadFailure, + TerminationReasonCodeStorageDownloadFailureDueToMisconfig, + TerminationReasonCodeStorageDownloadFailureSlow, + TerminationReasonCodeStorageDownloadFailureThrottled, + TerminationReasonCodeStsClientSetupFailure, + TerminationReasonCodeSubnetExhaustedFailure, + TerminationReasonCodeTemporarilyUnavailable, + TerminationReasonCodeTrialExpired, + TerminationReasonCodeUnexpectedLaunchFailure, + TerminationReasonCodeUnexpectedPodRecreation, + TerminationReasonCodeUnknown, + TerminationReasonCodeUnsupportedInstanceType, + TerminationReasonCodeUpdateInstanceProfileFailure, + TerminationReasonCodeUserInitiatedVmTermination, + TerminationReasonCodeUserRequest, + TerminationReasonCodeWorkerSetupFailure, + TerminationReasonCodeWorkspaceCancelledError, + TerminationReasonCodeWorkspaceConfigurationError, + TerminationReasonCodeWorkspaceUpdate, + } +} + // Type always returns TerminationReasonCode to satisfy [pflag.Value] interface func (f *TerminationReasonCode) Type() string { return "TerminationReasonCode" @@ -5657,6 +6228,18 @@ func (f *TerminationReasonType) Set(v string) error { } } +// Values returns all possible values of TerminationReasonType. +// +// There is no guarantee on the order of the values in the slice. +func (f *TerminationReasonType) Values() []TerminationReasonType { + return []TerminationReasonType{ + TerminationReasonTypeClientError, + TerminationReasonTypeCloudFailure, + TerminationReasonTypeServiceFault, + TerminationReasonTypeSuccess, + } +} + // Type always returns TerminationReasonType to satisfy [pflag.Value] interface func (f *TerminationReasonType) Type() string { return "TerminationReasonType" diff --git a/service/dashboards/interface.go b/service/dashboards/interface.go index ffc8bdc7a..1ae8236aa 100755 --- a/service/dashboards/interface.go +++ b/service/dashboards/interface.go @@ -11,6 +11,8 @@ import ( // natural language. Genie uses data registered to Unity Catalog and requires at // least CAN USE permission on a Pro or Serverless SQL warehouse. Also, // Databricks Assistant must be enabled. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type GenieService interface { // Create conversation message. @@ -96,6 +98,8 @@ type GenieService interface { // These APIs provide specific management operations for Lakeview dashboards. // Generic resource management can be done with Workspace API (import, export, // get-status, list, delete). +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type LakeviewService interface { // Create dashboard. @@ -132,18 +136,12 @@ type LakeviewService interface { GetSubscription(ctx context.Context, request GetSubscriptionRequest) (*Subscription, error) // List dashboards. - // - // Use ListAll() to get all Dashboard instances, which will iterate over every result page. List(ctx context.Context, request ListDashboardsRequest) (*ListDashboardsResponse, error) // List dashboard schedules. - // - // Use ListSchedulesAll() to get all Schedule instances, which will iterate over every result page. ListSchedules(ctx context.Context, request ListSchedulesRequest) (*ListSchedulesResponse, error) // List schedule subscriptions. - // - // Use ListSubscriptionsAll() to get all Subscription instances, which will iterate over every result page. ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) (*ListSubscriptionsResponse, error) // Migrate dashboard. @@ -176,6 +174,8 @@ type LakeviewService interface { } // Token-based Lakeview APIs for embedding dashboards in external applications. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type LakeviewEmbeddedService interface { // Read a published dashboard in an embedded ui. @@ -197,6 +197,8 @@ type LakeviewEmbeddedService interface { } // Query execution APIs for AI / BI Dashboards +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type QueryExecutionService interface { // Cancel the results for the a query for a published, embedded dashboard. diff --git a/service/dashboards/model.go b/service/dashboards/model.go index b3ed5aa82..21c2eeaba 100755 --- a/service/dashboards/model.go +++ b/service/dashboards/model.go @@ -179,6 +179,15 @@ func (f *DashboardView) Set(v string) error { } } +// Values returns all possible values of DashboardView. +// +// There is no guarantee on the order of the values in the slice. +func (f *DashboardView) Values() []DashboardView { + return []DashboardView{ + DashboardViewDashboardViewBasic, + } +} + // Type always returns DashboardView to satisfy [pflag.Value] interface func (f *DashboardView) Type() string { return "DashboardView" @@ -695,6 +704,16 @@ func (f *LifecycleState) Set(v string) error { } } +// Values returns all possible values of LifecycleState. +// +// There is no guarantee on the order of the values in the slice. +func (f *LifecycleState) Values() []LifecycleState { + return []LifecycleState{ + LifecycleStateActive, + LifecycleStateTrashed, + } +} + // Type always returns LifecycleState to satisfy [pflag.Value] interface func (f *LifecycleState) Type() string { return "LifecycleState" @@ -963,6 +982,67 @@ func (f *MessageErrorType) Set(v string) error { } } +// Values returns all possible values of MessageErrorType. +// +// There is no guarantee on the order of the values in the slice. +func (f *MessageErrorType) Values() []MessageErrorType { + return []MessageErrorType{ + MessageErrorTypeBlockMultipleExecutionsException, + MessageErrorTypeChatCompletionClientException, + MessageErrorTypeChatCompletionClientTimeoutException, + MessageErrorTypeChatCompletionNetworkException, + MessageErrorTypeContentFilterException, + MessageErrorTypeContextExceededException, + MessageErrorTypeCouldNotGetModelDeploymentsException, + MessageErrorTypeCouldNotGetUcSchemaException, + MessageErrorTypeDeploymentNotFoundException, + MessageErrorTypeDescribeQueryInvalidSqlError, + MessageErrorTypeDescribeQueryTimeout, + MessageErrorTypeDescribeQueryUnexpectedFailure, + MessageErrorTypeFunctionsNotAvailableException, + MessageErrorTypeFunctionArgumentsInvalidException, + MessageErrorTypeFunctionArgumentsInvalidJsonException, + MessageErrorTypeFunctionArgumentsInvalidTypeException, + MessageErrorTypeFunctionCallMissingParameterException, + MessageErrorTypeGeneratedSqlQueryTooLongException, + MessageErrorTypeGenericChatCompletionException, + MessageErrorTypeGenericChatCompletionServiceException, + MessageErrorTypeGenericSqlExecApiCallException, + MessageErrorTypeIllegalParameterDefinitionException, + MessageErrorTypeInvalidCertifiedAnswerFunctionException, + MessageErrorTypeInvalidCertifiedAnswerIdentifierException, + MessageErrorTypeInvalidChatCompletionArgumentsJsonException, + MessageErrorTypeInvalidChatCompletionJsonException, + MessageErrorTypeInvalidCompletionRequestException, + MessageErrorTypeInvalidFunctionCallException, + MessageErrorTypeInvalidSqlMultipleDatasetReferencesException, + MessageErrorTypeInvalidSqlMultipleStatementsException, + MessageErrorTypeInvalidSqlUnknownTableException, + MessageErrorTypeInvalidTableIdentifierException, + MessageErrorTypeLocalContextExceededException, + MessageErrorTypeMessageCancelledWhileExecutingException, + MessageErrorTypeMessageDeletedWhileExecutingException, + MessageErrorTypeMessageUpdatedWhileExecutingException, + MessageErrorTypeMissingSqlQueryException, + MessageErrorTypeNoDeploymentsAvailableToWorkspace, + MessageErrorTypeNoQueryToVisualizeException, + MessageErrorTypeNoTablesToQueryException, + MessageErrorTypeRateLimitExceededGenericException, + MessageErrorTypeRateLimitExceededSpecifiedWaitException, + MessageErrorTypeReplyProcessTimeoutException, + MessageErrorTypeRetryableProcessingException, + MessageErrorTypeSqlExecutionException, + MessageErrorTypeStopProcessDueToAutoRegenerate, + MessageErrorTypeTablesMissingException, + MessageErrorTypeTooManyCertifiedAnswersException, + MessageErrorTypeTooManyTablesException, + MessageErrorTypeUnexpectedReplyProcessException, + MessageErrorTypeUnknownAiModel, + MessageErrorTypeWarehouseAccessMissingException, + MessageErrorTypeWarehouseNotFoundException, + } +} + // Type always returns MessageErrorType to satisfy [pflag.Value] interface func (f *MessageErrorType) Type() string { return "MessageErrorType" @@ -1040,6 +1120,24 @@ func (f *MessageStatus) Set(v string) error { } } +// Values returns all possible values of MessageStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *MessageStatus) Values() []MessageStatus { + return []MessageStatus{ + MessageStatusAskingAi, + MessageStatusCancelled, + MessageStatusCompleted, + MessageStatusExecutingQuery, + MessageStatusFailed, + MessageStatusFetchingMetadata, + MessageStatusFilteringContext, + MessageStatusPendingWarehouse, + MessageStatusQueryResultExpired, + MessageStatusSubmitted, + } +} + // Type always returns MessageStatus to satisfy [pflag.Value] interface func (f *MessageStatus) Type() string { return "MessageStatus" @@ -1241,6 +1339,16 @@ func (f *SchedulePauseStatus) Set(v string) error { } } +// Values returns all possible values of SchedulePauseStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *SchedulePauseStatus) Values() []SchedulePauseStatus { + return []SchedulePauseStatus{ + SchedulePauseStatusPaused, + SchedulePauseStatusUnpaused, + } +} + // Type always returns SchedulePauseStatus to satisfy [pflag.Value] interface func (f *SchedulePauseStatus) Type() string { return "SchedulePauseStatus" diff --git a/service/files/interface.go b/service/files/interface.go index c67524d4d..f8b672290 100755 --- a/service/files/interface.go +++ b/service/files/interface.go @@ -8,6 +8,8 @@ import ( // DBFS API makes it simple to interact with various data sources without having // to include a users credentials every time to read a file. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type DbfsService interface { // Append data block. @@ -83,8 +85,6 @@ type DbfsService interface { // using the [File system utility // (dbutils.fs)](/dev-tools/databricks-utils.html#dbutils-fs), which // provides the same functionality without timing out. - // - // Use ListAll() to get all FileInfo instances List(ctx context.Context, request ListDbfsRequest) (*ListStatusResponse, error) // Create a directory. @@ -156,6 +156,8 @@ type DbfsService interface { // profile or use the environment variable // `DATABRICKS_ENABLE_EXPERIMENTAL_FILES_API_CLIENT=True`. // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [Unity Catalog volumes]: https://docs.databricks.com/en/connect/unity-catalog/volumes.html type FilesService interface { @@ -212,8 +214,6 @@ type FilesService interface { // // Returns the contents of a directory. If there is no directory at the // specified path, the API returns a HTTP 404 error. - // - // Use ListDirectoryContentsAll() to get all DirectoryEntry instances, which will iterate over every result page. ListDirectoryContents(ctx context.Context, request ListDirectoryContentsRequest) (*ListDirectoryResponse, error) // Upload a file. diff --git a/service/iam/impl.go b/service/iam/impl.go index 59ee7a50e..71e0f28c1 100755 --- a/service/iam/impl.go +++ b/service/iam/impl.go @@ -141,7 +141,7 @@ func (a *accountGroupsImpl) List(ctx context.Context, request ListAccountGroupsR request.StartIndex = 1 // SCIM offset starts from 1 if request.Count == 0 { - request.Count = 100 + request.Count = 10000 } getNextPage := func(ctx context.Context, req ListAccountGroupsRequest) (*ListGroupsResponse, error) { ctx = useragent.InContext(ctx, "sdk-feature", "pagination") @@ -251,7 +251,7 @@ func (a *accountServicePrincipalsImpl) List(ctx context.Context, request ListAcc request.StartIndex = 1 // SCIM offset starts from 1 if request.Count == 0 { - request.Count = 100 + request.Count = 10000 } getNextPage := func(ctx context.Context, req ListAccountServicePrincipalsRequest) (*ListServicePrincipalResponse, error) { ctx = useragent.InContext(ctx, "sdk-feature", "pagination") @@ -361,7 +361,7 @@ func (a *accountUsersImpl) List(ctx context.Context, request ListAccountUsersReq request.StartIndex = 1 // SCIM offset starts from 1 if request.Count == 0 { - request.Count = 100 + request.Count = 10000 } getNextPage := func(ctx context.Context, req ListAccountUsersRequest) (*ListUsersResponse, error) { ctx = useragent.InContext(ctx, "sdk-feature", "pagination") @@ -486,7 +486,7 @@ func (a *groupsImpl) List(ctx context.Context, request ListGroupsRequest) listin request.StartIndex = 1 // SCIM offset starts from 1 if request.Count == 0 { - request.Count = 100 + request.Count = 10000 } getNextPage := func(ctx context.Context, req ListGroupsRequest) (*ListGroupsResponse, error) { ctx = useragent.InContext(ctx, "sdk-feature", "pagination") @@ -659,7 +659,7 @@ func (a *servicePrincipalsImpl) List(ctx context.Context, request ListServicePri request.StartIndex = 1 // SCIM offset starts from 1 if request.Count == 0 { - request.Count = 100 + request.Count = 10000 } getNextPage := func(ctx context.Context, req ListServicePrincipalsRequest) (*ListServicePrincipalResponse, error) { ctx = useragent.InContext(ctx, "sdk-feature", "pagination") @@ -789,7 +789,7 @@ func (a *usersImpl) List(ctx context.Context, request ListUsersRequest) listing. request.StartIndex = 1 // SCIM offset starts from 1 if request.Count == 0 { - request.Count = 100 + request.Count = 10000 } getNextPage := func(ctx context.Context, req ListUsersRequest) (*ListUsersResponse, error) { ctx = useragent.InContext(ctx, "sdk-feature", "pagination") diff --git a/service/iam/interface.go b/service/iam/interface.go index ba75f5a47..1e057de3c 100755 --- a/service/iam/interface.go +++ b/service/iam/interface.go @@ -7,6 +7,8 @@ import ( ) // Rule based Access Control for Databricks Resources. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AccessControlService interface { // Check access policy to a resource. @@ -16,6 +18,8 @@ type AccessControlService interface { // These APIs manage access rules on resources in an account. Currently, only // grant rules are supported. A grant rule specifies a role assigned to a set of // principals. A list of rules attached to a resource is called a rule set. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AccountAccessControlService interface { // Get assignable roles for a resource. @@ -44,6 +48,8 @@ type AccountAccessControlService interface { // grant rules are supported. A grant rule specifies a role assigned to a set of // principals. A list of rules attached to a resource is called a rule set. A // workspace must belong to an account for these APIs to work +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AccountAccessControlProxyService interface { // Get assignable roles for a resource. @@ -75,6 +81,8 @@ type AccountAccessControlProxyService interface { // policies in Unity Catalog to groups, instead of to users individually. All // Databricks account identities can be assigned as members of groups, and // members inherit permissions that are assigned to their group. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AccountGroupsService interface { // Create a new group. @@ -96,8 +104,6 @@ type AccountGroupsService interface { // List group details. // // Gets all details of the groups associated with the Databricks account. - // - // Use ListAll() to get all Group instances, which will iterate over every result page. List(ctx context.Context, request ListAccountGroupsRequest) (*ListGroupsResponse, error) // Update group details. @@ -117,6 +123,8 @@ type AccountGroupsService interface { // on production data run with service principals, interactive users do not need // any write, delete, or modify privileges in production. This eliminates the // risk of a user overwriting production data by accident. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AccountServicePrincipalsService interface { // Create a service principal. @@ -138,8 +146,6 @@ type AccountServicePrincipalsService interface { // List service principals. // // Gets the set of service principals associated with a Databricks account. - // - // Use ListAll() to get all ServicePrincipal instances, which will iterate over every result page. List(ctx context.Context, request ListAccountServicePrincipalsRequest) (*ListServicePrincipalResponse, error) // Update service principal details. @@ -167,6 +173,8 @@ type AccountServicePrincipalsService interface { // provider and that user’s account will also be removed from Databricks // account. This ensures a consistent offboarding process and prevents // unauthorized users from accessing sensitive data. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AccountUsersService interface { // Create a new user. @@ -189,8 +197,6 @@ type AccountUsersService interface { // List users. // // Gets details for all the users associated with a Databricks account. - // - // Use ListAll() to get all User instances, which will iterate over every result page. List(ctx context.Context, request ListAccountUsersRequest) (*ListUsersResponse, error) // Update user details. @@ -207,6 +213,8 @@ type AccountUsersService interface { // This API allows retrieving information about currently authenticated user or // service principal. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type CurrentUserService interface { // Get current user info. @@ -222,6 +230,8 @@ type CurrentUserService interface { // policies in Unity Catalog to groups, instead of to users individually. All // Databricks workspace identities can be assigned as members of groups, and // members inherit permissions that are assigned to their group. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type GroupsService interface { // Create a new group. @@ -243,8 +253,6 @@ type GroupsService interface { // List group details. // // Gets all details of the groups associated with the Databricks workspace. - // - // Use ListAll() to get all Group instances, which will iterate over every result page. List(ctx context.Context, request ListGroupsRequest) (*ListGroupsResponse, error) // Update group details. @@ -260,6 +268,8 @@ type GroupsService interface { // APIs for migrating acl permissions, used only by the ucx tool: // https://github.com/databrickslabs/ucx +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type PermissionMigrationService interface { // Migrate Permissions. @@ -296,6 +306,8 @@ type PermissionMigrationService interface { // manage access control on service principals, use **[Account Access Control // Proxy](:service:accountaccesscontrolproxy)**. // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [Access Control]: https://docs.databricks.com/security/auth-authz/access-control/index.html type PermissionsService interface { @@ -330,6 +342,8 @@ type PermissionsService interface { // on production data run with service principals, interactive users do not need // any write, delete, or modify privileges in production. This eliminates the // risk of a user overwriting production data by accident. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ServicePrincipalsService interface { // Create a service principal. @@ -352,8 +366,6 @@ type ServicePrincipalsService interface { // // Gets the set of service principals associated with a Databricks // workspace. - // - // Use ListAll() to get all ServicePrincipal instances, which will iterate over every result page. List(ctx context.Context, request ListServicePrincipalsRequest) (*ListServicePrincipalResponse, error) // Update service principal details. @@ -381,6 +393,8 @@ type ServicePrincipalsService interface { // identity provider and that user’s account will also be removed from // Databricks workspace. This ensures a consistent offboarding process and // prevents unauthorized users from accessing sensitive data. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type UsersService interface { // Create a new user. @@ -414,8 +428,6 @@ type UsersService interface { // List users. // // Gets details for all the users associated with a Databricks workspace. - // - // Use ListAll() to get all User instances, which will iterate over every result page. List(ctx context.Context, request ListUsersRequest) (*ListUsersResponse, error) // Update user details. @@ -445,6 +457,8 @@ type UsersService interface { // The Workspace Permission Assignment API allows you to manage workspace // permissions for principals in your account. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type WorkspaceAssignmentService interface { // Delete permissions assignment. @@ -463,8 +477,6 @@ type WorkspaceAssignmentService interface { // // Get the permission assignments for the specified Databricks account and // Databricks workspace. - // - // Use ListAll() to get all PermissionAssignment instances List(ctx context.Context, request ListWorkspaceAssignmentRequest) (*PermissionAssignments, error) // Create or update permissions assignment. diff --git a/service/iam/model.go b/service/iam/model.go index 0bd923991..207f3e5bc 100755 --- a/service/iam/model.go +++ b/service/iam/model.go @@ -339,6 +339,16 @@ func (f *GetSortOrder) Set(v string) error { } } +// Values returns all possible values of GetSortOrder. +// +// There is no guarantee on the order of the values in the slice. +func (f *GetSortOrder) Values() []GetSortOrder { + return []GetSortOrder{ + GetSortOrderAscending, + GetSortOrderDescending, + } +} + // Type always returns GetSortOrder to satisfy [pflag.Value] interface func (f *GetSortOrder) Type() string { return "GetSortOrder" @@ -452,6 +462,15 @@ func (f *GroupSchema) Set(v string) error { } } +// Values returns all possible values of GroupSchema. +// +// There is no guarantee on the order of the values in the slice. +func (f *GroupSchema) Values() []GroupSchema { + return []GroupSchema{ + GroupSchemaUrnIetfParamsScimSchemasCore20Group, + } +} + // Type always returns GroupSchema to satisfy [pflag.Value] interface func (f *GroupSchema) Type() string { return "GroupSchema" @@ -638,6 +657,15 @@ func (f *ListResponseSchema) Set(v string) error { } } +// Values returns all possible values of ListResponseSchema. +// +// There is no guarantee on the order of the values in the slice. +func (f *ListResponseSchema) Values() []ListResponseSchema { + return []ListResponseSchema{ + ListResponseSchemaUrnIetfParamsScimApiMessages20ListResponse, + } +} + // Type always returns ListResponseSchema to satisfy [pflag.Value] interface func (f *ListResponseSchema) Type() string { return "ListResponseSchema" @@ -723,6 +751,16 @@ func (f *ListSortOrder) Set(v string) error { } } +// Values returns all possible values of ListSortOrder. +// +// There is no guarantee on the order of the values in the slice. +func (f *ListSortOrder) Values() []ListSortOrder { + return []ListSortOrder{ + ListSortOrderAscending, + ListSortOrderDescending, + } +} + // Type always returns ListSortOrder to satisfy [pflag.Value] interface func (f *ListSortOrder) Type() string { return "ListSortOrder" @@ -958,6 +996,15 @@ func (f *PasswordPermissionLevel) Set(v string) error { } } +// Values returns all possible values of PasswordPermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *PasswordPermissionLevel) Values() []PasswordPermissionLevel { + return []PasswordPermissionLevel{ + PasswordPermissionLevelCanUse, + } +} + // Type always returns PasswordPermissionLevel to satisfy [pflag.Value] interface func (f *PasswordPermissionLevel) Type() string { return "PasswordPermissionLevel" @@ -1045,6 +1092,17 @@ func (f *PatchOp) Set(v string) error { } } +// Values returns all possible values of PatchOp. +// +// There is no guarantee on the order of the values in the slice. +func (f *PatchOp) Values() []PatchOp { + return []PatchOp{ + PatchOpAdd, + PatchOpRemove, + PatchOpReplace, + } +} + // Type always returns PatchOp to satisfy [pflag.Value] interface func (f *PatchOp) Type() string { return "PatchOp" @@ -1073,6 +1131,15 @@ func (f *PatchSchema) Set(v string) error { } } +// Values returns all possible values of PatchSchema. +// +// There is no guarantee on the order of the values in the slice. +func (f *PatchSchema) Values() []PatchSchema { + return []PatchSchema{ + PatchSchemaUrnIetfParamsScimApiMessages20PatchOp, + } +} + // Type always returns PatchSchema to satisfy [pflag.Value] interface func (f *PatchSchema) Type() string { return "PatchSchema" @@ -1179,6 +1246,33 @@ func (f *PermissionLevel) Set(v string) error { } } +// Values returns all possible values of PermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *PermissionLevel) Values() []PermissionLevel { + return []PermissionLevel{ + PermissionLevelCanAttachTo, + PermissionLevelCanBind, + PermissionLevelCanCreate, + PermissionLevelCanEdit, + PermissionLevelCanEditMetadata, + PermissionLevelCanManage, + PermissionLevelCanManageProductionVersions, + PermissionLevelCanManageRun, + PermissionLevelCanManageStagingVersions, + PermissionLevelCanMonitor, + PermissionLevelCanMonitorOnly, + PermissionLevelCanQuery, + PermissionLevelCanRead, + PermissionLevelCanRestart, + PermissionLevelCanRun, + PermissionLevelCanUse, + PermissionLevelCanView, + PermissionLevelCanViewMetadata, + PermissionLevelIsOwner, + } +} + // Type always returns PermissionLevel to satisfy [pflag.Value] interface func (f *PermissionLevel) Type() string { return "PermissionLevel" @@ -1266,6 +1360,16 @@ func (f *RequestAuthzIdentity) Set(v string) error { } } +// Values returns all possible values of RequestAuthzIdentity. +// +// There is no guarantee on the order of the values in the slice. +func (f *RequestAuthzIdentity) Values() []RequestAuthzIdentity { + return []RequestAuthzIdentity{ + RequestAuthzIdentityRequestAuthzIdentityServiceIdentity, + RequestAuthzIdentityRequestAuthzIdentityUserContext, + } +} + // Type always returns RequestAuthzIdentity to satisfy [pflag.Value] interface func (f *RequestAuthzIdentity) Type() string { return "RequestAuthzIdentity" @@ -1400,6 +1504,15 @@ func (f *ServicePrincipalSchema) Set(v string) error { } } +// Values returns all possible values of ServicePrincipalSchema. +// +// There is no guarantee on the order of the values in the slice. +func (f *ServicePrincipalSchema) Values() []ServicePrincipalSchema { + return []ServicePrincipalSchema{ + ServicePrincipalSchemaUrnIetfParamsScimSchemasCore20ServicePrincipal, + } +} + // Type always returns ServicePrincipalSchema to satisfy [pflag.Value] interface func (f *ServicePrincipalSchema) Type() string { return "ServicePrincipalSchema" @@ -1518,6 +1631,16 @@ func (f *UserSchema) Set(v string) error { } } +// Values returns all possible values of UserSchema. +// +// There is no guarantee on the order of the values in the slice. +func (f *UserSchema) Values() []UserSchema { + return []UserSchema{ + UserSchemaUrnIetfParamsScimSchemasCore20User, + UserSchemaUrnIetfParamsScimSchemasExtensionWorkspace20User, + } +} + // Type always returns UserSchema to satisfy [pflag.Value] interface func (f *UserSchema) Type() string { return "UserSchema" @@ -1547,6 +1670,17 @@ func (f *WorkspacePermission) Set(v string) error { } } +// Values returns all possible values of WorkspacePermission. +// +// There is no guarantee on the order of the values in the slice. +func (f *WorkspacePermission) Values() []WorkspacePermission { + return []WorkspacePermission{ + WorkspacePermissionAdmin, + WorkspacePermissionUnknown, + WorkspacePermissionUser, + } +} + // Type always returns WorkspacePermission to satisfy [pflag.Value] interface func (f *WorkspacePermission) Type() string { return "WorkspacePermission" diff --git a/service/jobs/interface.go b/service/jobs/interface.go index a012a92b7..0a690fe88 100755 --- a/service/jobs/interface.go +++ b/service/jobs/interface.go @@ -21,6 +21,8 @@ import ( // [Secrets CLI] to manage secrets in the [Databricks CLI]. Use the [Secrets // utility] to reference secrets in notebooks and jobs. // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [Databricks CLI]: https://docs.databricks.com/dev-tools/cli/index.html // [Secrets CLI]: https://docs.databricks.com/dev-tools/cli/secrets-cli.html // [Secrets utility]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-secrets @@ -114,15 +116,11 @@ type JobsService interface { // List jobs. // // Retrieves a list of jobs. - // - // Use ListAll() to get all BaseJob instances, which will iterate over every result page. List(ctx context.Context, request ListJobsRequest) (*ListJobsResponse, error) // List job runs. // // List runs in descending order by start time. - // - // Use ListRunsAll() to get all BaseRun instances, which will iterate over every result page. ListRuns(ctx context.Context, request ListRunsRequest) (*ListRunsResponse, error) // Repair a job run. @@ -184,6 +182,8 @@ type JobsService interface { // The get and list compliance APIs allow you to view the policy compliance // status of a job. The enforce compliance API allows you to update a job so // that it becomes compliant with all of its policies. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type PolicyComplianceForJobsService interface { // Enforce job policy compliance. @@ -208,7 +208,5 @@ type PolicyComplianceForJobsService interface { // Jobs could be out of compliance if a cluster policy they use was updated // after the job was last edited and its job clusters no longer comply with // the updated policy. - // - // Use ListComplianceAll() to get all JobCompliance instances, which will iterate over every result page. ListCompliance(ctx context.Context, request ListJobComplianceRequest) (*ListJobComplianceForPolicyResponse, error) } diff --git a/service/jobs/model.go b/service/jobs/model.go index c4b1f796e..d93927fc1 100755 --- a/service/jobs/model.go +++ b/service/jobs/model.go @@ -31,6 +31,16 @@ func (f *AuthenticationMethod) Set(v string) error { } } +// Values returns all possible values of AuthenticationMethod. +// +// There is no guarantee on the order of the values in the slice. +func (f *AuthenticationMethod) Values() []AuthenticationMethod { + return []AuthenticationMethod{ + AuthenticationMethodOauth, + AuthenticationMethodPat, + } +} + // Type always returns AuthenticationMethod to satisfy [pflag.Value] interface func (f *AuthenticationMethod) Type() string { return "AuthenticationMethod" @@ -302,6 +312,24 @@ func (f *CleanRoomTaskRunLifeCycleState) Set(v string) error { } } +// Values returns all possible values of CleanRoomTaskRunLifeCycleState. +// +// There is no guarantee on the order of the values in the slice. +func (f *CleanRoomTaskRunLifeCycleState) Values() []CleanRoomTaskRunLifeCycleState { + return []CleanRoomTaskRunLifeCycleState{ + CleanRoomTaskRunLifeCycleStateBlocked, + CleanRoomTaskRunLifeCycleStateInternalError, + CleanRoomTaskRunLifeCycleStatePending, + CleanRoomTaskRunLifeCycleStateQueued, + CleanRoomTaskRunLifeCycleStateRunning, + CleanRoomTaskRunLifeCycleStateRunLifeCycleStateUnspecified, + CleanRoomTaskRunLifeCycleStateSkipped, + CleanRoomTaskRunLifeCycleStateTerminated, + CleanRoomTaskRunLifeCycleStateTerminating, + CleanRoomTaskRunLifeCycleStateWaitingForRetry, + } +} + // Type always returns CleanRoomTaskRunLifeCycleState to satisfy [pflag.Value] interface func (f *CleanRoomTaskRunLifeCycleState) Type() string { return "CleanRoomTaskRunLifeCycleState" @@ -353,6 +381,27 @@ func (f *CleanRoomTaskRunResultState) Set(v string) error { } } +// Values returns all possible values of CleanRoomTaskRunResultState. +// +// There is no guarantee on the order of the values in the slice. +func (f *CleanRoomTaskRunResultState) Values() []CleanRoomTaskRunResultState { + return []CleanRoomTaskRunResultState{ + CleanRoomTaskRunResultStateCanceled, + CleanRoomTaskRunResultStateDisabled, + CleanRoomTaskRunResultStateEvicted, + CleanRoomTaskRunResultStateExcluded, + CleanRoomTaskRunResultStateFailed, + CleanRoomTaskRunResultStateMaximumConcurrentRunsReached, + CleanRoomTaskRunResultStateRunResultStateUnspecified, + CleanRoomTaskRunResultStateSuccess, + CleanRoomTaskRunResultStateSuccessWithFailures, + CleanRoomTaskRunResultStateTimedout, + CleanRoomTaskRunResultStateUpstreamCanceled, + CleanRoomTaskRunResultStateUpstreamEvicted, + CleanRoomTaskRunResultStateUpstreamFailed, + } +} + // Type always returns CleanRoomTaskRunResultState to satisfy [pflag.Value] interface func (f *CleanRoomTaskRunResultState) Type() string { return "CleanRoomTaskRunResultState" @@ -501,6 +550,16 @@ func (f *Condition) Set(v string) error { } } +// Values returns all possible values of Condition. +// +// There is no guarantee on the order of the values in the slice. +func (f *Condition) Values() []Condition { + return []Condition{ + ConditionAllUpdated, + ConditionAnyUpdated, + } +} + // Type always returns Condition to satisfy [pflag.Value] interface func (f *Condition) Type() string { return "Condition" @@ -566,6 +625,20 @@ func (f *ConditionTaskOp) Set(v string) error { } } +// Values returns all possible values of ConditionTaskOp. +// +// There is no guarantee on the order of the values in the slice. +func (f *ConditionTaskOp) Values() []ConditionTaskOp { + return []ConditionTaskOp{ + ConditionTaskOpEqualTo, + ConditionTaskOpGreaterThan, + ConditionTaskOpGreaterThanOrEqual, + ConditionTaskOpLessThan, + ConditionTaskOpLessThanOrEqual, + ConditionTaskOpNotEqual, + } +} + // Type always returns ConditionTaskOp to satisfy [pflag.Value] interface func (f *ConditionTaskOp) Type() string { return "ConditionTaskOp" @@ -1075,6 +1148,16 @@ func (f *Format) Set(v string) error { } } +// Values returns all possible values of Format. +// +// There is no guarantee on the order of the values in the slice. +func (f *Format) Values() []Format { + return []Format{ + FormatMultiTask, + FormatSingleTask, + } +} + // Type always returns Format to satisfy [pflag.Value] interface func (f *Format) Type() string { return "Format" @@ -1255,6 +1338,22 @@ func (f *GitProvider) Set(v string) error { } } +// Values returns all possible values of GitProvider. +// +// There is no guarantee on the order of the values in the slice. +func (f *GitProvider) Values() []GitProvider { + return []GitProvider{ + GitProviderAwsCodeCommit, + GitProviderAzureDevOpsServices, + GitProviderBitbucketCloud, + GitProviderBitbucketServer, + GitProviderGitHub, + GitProviderGitHubEnterprise, + GitProviderGitLab, + GitProviderGitLabEnterpriseEdition, + } +} + // Type always returns GitProvider to satisfy [pflag.Value] interface func (f *GitProvider) Type() string { return "GitProvider" @@ -1486,6 +1585,15 @@ func (f *JobDeploymentKind) Set(v string) error { } } +// Values returns all possible values of JobDeploymentKind. +// +// There is no guarantee on the order of the values in the slice. +func (f *JobDeploymentKind) Values() []JobDeploymentKind { + return []JobDeploymentKind{ + JobDeploymentKindBundle, + } +} + // Type always returns JobDeploymentKind to satisfy [pflag.Value] interface func (f *JobDeploymentKind) Type() string { return "JobDeploymentKind" @@ -1519,6 +1627,16 @@ func (f *JobEditMode) Set(v string) error { } } +// Values returns all possible values of JobEditMode. +// +// There is no guarantee on the order of the values in the slice. +func (f *JobEditMode) Values() []JobEditMode { + return []JobEditMode{ + JobEditModeEditable, + JobEditModeUiLocked, + } +} + // Type always returns JobEditMode to satisfy [pflag.Value] interface func (f *JobEditMode) Type() string { return "JobEditMode" @@ -1671,6 +1789,18 @@ func (f *JobPermissionLevel) Set(v string) error { } } +// Values returns all possible values of JobPermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *JobPermissionLevel) Values() []JobPermissionLevel { + return []JobPermissionLevel{ + JobPermissionLevelCanManage, + JobPermissionLevelCanManageRun, + JobPermissionLevelCanView, + JobPermissionLevelIsOwner, + } +} + // Type always returns JobPermissionLevel to satisfy [pflag.Value] interface func (f *JobPermissionLevel) Type() string { return "JobPermissionLevel" @@ -1920,6 +2050,16 @@ func (f *JobSourceDirtyState) Set(v string) error { } } +// Values returns all possible values of JobSourceDirtyState. +// +// There is no guarantee on the order of the values in the slice. +func (f *JobSourceDirtyState) Values() []JobSourceDirtyState { + return []JobSourceDirtyState{ + JobSourceDirtyStateDisconnected, + JobSourceDirtyStateNotSynced, + } +} + // Type always returns JobSourceDirtyState to satisfy [pflag.Value] interface func (f *JobSourceDirtyState) Type() string { return "JobSourceDirtyState" @@ -1974,6 +2114,19 @@ func (f *JobsHealthMetric) Set(v string) error { } } +// Values returns all possible values of JobsHealthMetric. +// +// There is no guarantee on the order of the values in the slice. +func (f *JobsHealthMetric) Values() []JobsHealthMetric { + return []JobsHealthMetric{ + JobsHealthMetricRunDurationSeconds, + JobsHealthMetricStreamingBacklogBytes, + JobsHealthMetricStreamingBacklogFiles, + JobsHealthMetricStreamingBacklogRecords, + JobsHealthMetricStreamingBacklogSeconds, + } +} + // Type always returns JobsHealthMetric to satisfy [pflag.Value] interface func (f *JobsHealthMetric) Type() string { return "JobsHealthMetric" @@ -2001,6 +2154,15 @@ func (f *JobsHealthOperator) Set(v string) error { } } +// Values returns all possible values of JobsHealthOperator. +// +// There is no guarantee on the order of the values in the slice. +func (f *JobsHealthOperator) Values() []JobsHealthOperator { + return []JobsHealthOperator{ + JobsHealthOperatorGreaterThan, + } +} + // Type always returns JobsHealthOperator to satisfy [pflag.Value] interface func (f *JobsHealthOperator) Type() string { return "JobsHealthOperator" @@ -2327,6 +2489,16 @@ func (f *PauseStatus) Set(v string) error { } } +// Values returns all possible values of PauseStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *PauseStatus) Values() []PauseStatus { + return []PauseStatus{ + PauseStatusPaused, + PauseStatusUnpaused, + } +} + // Type always returns PauseStatus to satisfy [pflag.Value] interface func (f *PauseStatus) Type() string { return "PauseStatus" @@ -2358,6 +2530,16 @@ func (f *PerformanceTarget) Set(v string) error { } } +// Values returns all possible values of PerformanceTarget. +// +// There is no guarantee on the order of the values in the slice. +func (f *PerformanceTarget) Values() []PerformanceTarget { + return []PerformanceTarget{ + PerformanceTargetPerformanceOptimized, + PerformanceTargetStandard, + } +} + // Type always returns PerformanceTarget to satisfy [pflag.Value] interface func (f *PerformanceTarget) Type() string { return "PerformanceTarget" @@ -2394,6 +2576,17 @@ func (f *PeriodicTriggerConfigurationTimeUnit) Set(v string) error { } } +// Values returns all possible values of PeriodicTriggerConfigurationTimeUnit. +// +// There is no guarantee on the order of the values in the slice. +func (f *PeriodicTriggerConfigurationTimeUnit) Values() []PeriodicTriggerConfigurationTimeUnit { + return []PeriodicTriggerConfigurationTimeUnit{ + PeriodicTriggerConfigurationTimeUnitDays, + PeriodicTriggerConfigurationTimeUnitHours, + PeriodicTriggerConfigurationTimeUnitWeeks, + } +} + // Type always returns PeriodicTriggerConfigurationTimeUnit to satisfy [pflag.Value] interface func (f *PeriodicTriggerConfigurationTimeUnit) Type() string { return "PeriodicTriggerConfigurationTimeUnit" @@ -2571,6 +2764,17 @@ func (f *QueueDetailsCodeCode) Set(v string) error { } } +// Values returns all possible values of QueueDetailsCodeCode. +// +// There is no guarantee on the order of the values in the slice. +func (f *QueueDetailsCodeCode) Values() []QueueDetailsCodeCode { + return []QueueDetailsCodeCode{ + QueueDetailsCodeCodeActiveRunsLimitReached, + QueueDetailsCodeCodeActiveRunJobTasksLimitReached, + QueueDetailsCodeCodeMaxConcurrentRunsReached, + } +} + // Type always returns QueueDetailsCodeCode to satisfy [pflag.Value] interface func (f *QueueDetailsCodeCode) Type() string { return "QueueDetailsCodeCode" @@ -2644,6 +2848,16 @@ func (f *RepairHistoryItemType) Set(v string) error { } } +// Values returns all possible values of RepairHistoryItemType. +// +// There is no guarantee on the order of the values in the slice. +func (f *RepairHistoryItemType) Values() []RepairHistoryItemType { + return []RepairHistoryItemType{ + RepairHistoryItemTypeOriginal, + RepairHistoryItemTypeRepair, + } +} + // Type always returns RepairHistoryItemType to satisfy [pflag.Value] interface func (f *RepairHistoryItemType) Type() string { return "RepairHistoryItemType" @@ -3139,6 +3353,20 @@ func (f *RunIf) Set(v string) error { } } +// Values returns all possible values of RunIf. +// +// There is no guarantee on the order of the values in the slice. +func (f *RunIf) Values() []RunIf { + return []RunIf{ + RunIfAllDone, + RunIfAllFailed, + RunIfAllSuccess, + RunIfAtLeastOneFailed, + RunIfAtLeastOneSuccess, + RunIfNoneFailed, + } +} + // Type always returns RunIf to satisfy [pflag.Value] interface func (f *RunIf) Type() string { return "RunIf" @@ -3314,6 +3542,23 @@ func (f *RunLifeCycleState) Set(v string) error { } } +// Values returns all possible values of RunLifeCycleState. +// +// There is no guarantee on the order of the values in the slice. +func (f *RunLifeCycleState) Values() []RunLifeCycleState { + return []RunLifeCycleState{ + RunLifeCycleStateBlocked, + RunLifeCycleStateInternalError, + RunLifeCycleStatePending, + RunLifeCycleStateQueued, + RunLifeCycleStateRunning, + RunLifeCycleStateSkipped, + RunLifeCycleStateTerminated, + RunLifeCycleStateTerminating, + RunLifeCycleStateWaitingForRetry, + } +} + // Type always returns RunLifeCycleState to satisfy [pflag.Value] interface func (f *RunLifeCycleState) Type() string { return "RunLifeCycleState" @@ -3352,6 +3597,21 @@ func (f *RunLifecycleStateV2State) Set(v string) error { } } +// Values returns all possible values of RunLifecycleStateV2State. +// +// There is no guarantee on the order of the values in the slice. +func (f *RunLifecycleStateV2State) Values() []RunLifecycleStateV2State { + return []RunLifecycleStateV2State{ + RunLifecycleStateV2StateBlocked, + RunLifecycleStateV2StatePending, + RunLifecycleStateV2StateQueued, + RunLifecycleStateV2StateRunning, + RunLifecycleStateV2StateTerminated, + RunLifecycleStateV2StateTerminating, + RunLifecycleStateV2StateWaiting, + } +} + // Type always returns RunLifecycleStateV2State to satisfy [pflag.Value] interface func (f *RunLifecycleStateV2State) Type() string { return "RunLifecycleStateV2State" @@ -3705,6 +3965,24 @@ func (f *RunResultState) Set(v string) error { } } +// Values returns all possible values of RunResultState. +// +// There is no guarantee on the order of the values in the slice. +func (f *RunResultState) Values() []RunResultState { + return []RunResultState{ + RunResultStateCanceled, + RunResultStateDisabled, + RunResultStateExcluded, + RunResultStateFailed, + RunResultStateMaximumConcurrentRunsReached, + RunResultStateSuccess, + RunResultStateSuccessWithFailures, + RunResultStateTimedout, + RunResultStateUpstreamCanceled, + RunResultStateUpstreamFailed, + } +} + // Type always returns RunResultState to satisfy [pflag.Value] interface func (f *RunResultState) Type() string { return "RunResultState" @@ -3987,6 +4265,17 @@ func (f *RunType) Set(v string) error { } } +// Values returns all possible values of RunType. +// +// There is no guarantee on the order of the values in the slice. +func (f *RunType) Values() []RunType { + return []RunType{ + RunTypeJobRun, + RunTypeSubmitRun, + RunTypeWorkflowRun, + } +} + // Type always returns RunType to satisfy [pflag.Value] interface func (f *RunType) Type() string { return "RunType" @@ -4024,6 +4313,16 @@ func (f *Source) Set(v string) error { } } +// Values returns all possible values of Source. +// +// There is no guarantee on the order of the values in the slice. +func (f *Source) Values() []Source { + return []Source{ + SourceGit, + SourceWorkspace, + } +} + // Type always returns Source to satisfy [pflag.Value] interface func (f *Source) Type() string { return "Source" @@ -4153,6 +4452,17 @@ func (f *SqlAlertState) Set(v string) error { } } +// Values returns all possible values of SqlAlertState. +// +// There is no guarantee on the order of the values in the slice. +func (f *SqlAlertState) Values() []SqlAlertState { + return []SqlAlertState{ + SqlAlertStateOk, + SqlAlertStateTriggered, + SqlAlertStateUnknown, + } +} + // Type always returns SqlAlertState to satisfy [pflag.Value] interface func (f *SqlAlertState) Type() string { return "SqlAlertState" @@ -4230,6 +4540,19 @@ func (f *SqlDashboardWidgetOutputStatus) Set(v string) error { } } +// Values returns all possible values of SqlDashboardWidgetOutputStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *SqlDashboardWidgetOutputStatus) Values() []SqlDashboardWidgetOutputStatus { + return []SqlDashboardWidgetOutputStatus{ + SqlDashboardWidgetOutputStatusCancelled, + SqlDashboardWidgetOutputStatusFailed, + SqlDashboardWidgetOutputStatusPending, + SqlDashboardWidgetOutputStatusRunning, + SqlDashboardWidgetOutputStatusSuccess, + } +} + // Type always returns SqlDashboardWidgetOutputStatus to satisfy [pflag.Value] interface func (f *SqlDashboardWidgetOutputStatus) Type() string { return "SqlDashboardWidgetOutputStatus" @@ -4424,6 +4747,17 @@ func (f *StorageMode) Set(v string) error { } } +// Values returns all possible values of StorageMode. +// +// There is no guarantee on the order of the values in the slice. +func (f *StorageMode) Values() []StorageMode { + return []StorageMode{ + StorageModeDirectQuery, + StorageModeDual, + StorageModeImport, + } +} + // Type always returns StorageMode to satisfy [pflag.Value] interface func (f *StorageMode) Type() string { return "StorageMode" @@ -5098,6 +5432,39 @@ func (f *TerminationCodeCode) Set(v string) error { } } +// Values returns all possible values of TerminationCodeCode. +// +// There is no guarantee on the order of the values in the slice. +func (f *TerminationCodeCode) Values() []TerminationCodeCode { + return []TerminationCodeCode{ + TerminationCodeCodeBudgetPolicyLimitExceeded, + TerminationCodeCodeCanceled, + TerminationCodeCodeCloudFailure, + TerminationCodeCodeClusterError, + TerminationCodeCodeClusterRequestLimitExceeded, + TerminationCodeCodeDisabled, + TerminationCodeCodeDriverError, + TerminationCodeCodeFeatureDisabled, + TerminationCodeCodeInternalError, + TerminationCodeCodeInvalidClusterRequest, + TerminationCodeCodeInvalidRunConfiguration, + TerminationCodeCodeLibraryInstallationError, + TerminationCodeCodeMaxConcurrentRunsExceeded, + TerminationCodeCodeMaxJobQueueSizeExceeded, + TerminationCodeCodeMaxSparkContextsExceeded, + TerminationCodeCodeRepositoryCheckoutFailed, + TerminationCodeCodeResourceNotFound, + TerminationCodeCodeRunExecutionError, + TerminationCodeCodeSkipped, + TerminationCodeCodeStorageAccessError, + TerminationCodeCodeSuccess, + TerminationCodeCodeSuccessWithFailures, + TerminationCodeCodeUnauthorizedError, + TerminationCodeCodeUserCanceled, + TerminationCodeCodeWorkspaceRunLimitExceeded, + } +} + // Type always returns TerminationCodeCode to satisfy [pflag.Value] interface func (f *TerminationCodeCode) Type() string { return "TerminationCodeCode" @@ -5219,6 +5586,18 @@ func (f *TerminationTypeType) Set(v string) error { } } +// Values returns all possible values of TerminationTypeType. +// +// There is no guarantee on the order of the values in the slice. +func (f *TerminationTypeType) Values() []TerminationTypeType { + return []TerminationTypeType{ + TerminationTypeTypeClientError, + TerminationTypeTypeCloudFailure, + TerminationTypeTypeInternalError, + TerminationTypeTypeSuccess, + } +} + // Type always returns TerminationTypeType to satisfy [pflag.Value] interface func (f *TerminationTypeType) Type() string { return "TerminationTypeType" @@ -5303,6 +5682,20 @@ func (f *TriggerType) Set(v string) error { } } +// Values returns all possible values of TriggerType. +// +// There is no guarantee on the order of the values in the slice. +func (f *TriggerType) Values() []TriggerType { + return []TriggerType{ + TriggerTypeFileArrival, + TriggerTypeOneTime, + TriggerTypePeriodic, + TriggerTypeRetry, + TriggerTypeRunJobTask, + TriggerTypeTable, + } +} + // Type always returns TriggerType to satisfy [pflag.Value] interface func (f *TriggerType) Type() string { return "TriggerType" @@ -5378,6 +5771,16 @@ func (f *ViewType) Set(v string) error { } } +// Values returns all possible values of ViewType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ViewType) Values() []ViewType { + return []ViewType{ + ViewTypeDashboard, + ViewTypeNotebook, + } +} + // Type always returns ViewType to satisfy [pflag.Value] interface func (f *ViewType) Type() string { return "ViewType" @@ -5412,6 +5815,17 @@ func (f *ViewsToExport) Set(v string) error { } } +// Values returns all possible values of ViewsToExport. +// +// There is no guarantee on the order of the values in the slice. +func (f *ViewsToExport) Values() []ViewsToExport { + return []ViewsToExport{ + ViewsToExportAll, + ViewsToExportCode, + ViewsToExportDashboards, + } +} + // Type always returns ViewsToExport to satisfy [pflag.Value] interface func (f *ViewsToExport) Type() string { return "ViewsToExport" diff --git a/service/marketplace/interface.go b/service/marketplace/interface.go index ca7e60b7c..42b59bd73 100755 --- a/service/marketplace/interface.go +++ b/service/marketplace/interface.go @@ -7,13 +7,13 @@ import ( ) // Fulfillments are entities that allow consumers to preview installations. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ConsumerFulfillmentsService interface { // Get listing content metadata. // // Get a high level preview of the metadata of listing installable content. - // - // Use GetAll() to get all SharedDataObject instances, which will iterate over every result page. Get(ctx context.Context, request GetListingContentMetadataRequest) (*GetListingContentMetadataResponse, error) // List all listing fulfillments. @@ -23,13 +23,13 @@ type ConsumerFulfillmentsService interface { // about the attached share or git repo. Only one of these fields will be // present. Personalized installations contain metadata about the attached // share or git repo, as well as the Delta Sharing recipient type. - // - // Use ListAll() to get all ListingFulfillment instances, which will iterate over every result page. List(ctx context.Context, request ListFulfillmentsRequest) (*ListFulfillmentsResponse, error) } // Installations are entities that allow consumers to interact with Databricks // Marketplace listings. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ConsumerInstallationsService interface { // Install from a listing. @@ -46,15 +46,11 @@ type ConsumerInstallationsService interface { // List all installations. // // List all installations across all listings. - // - // Use ListAll() to get all InstallationDetail instances, which will iterate over every result page. List(ctx context.Context, request ListAllInstallationsRequest) (*ListAllInstallationsResponse, error) // List installations for a listing. // // List all installations for a particular listing. - // - // Use ListListingInstallationsAll() to get all InstallationDetail instances, which will iterate over every result page. ListListingInstallations(ctx context.Context, request ListInstallationsRequest) (*ListInstallationsResponse, error) // Update an installation. @@ -70,6 +66,8 @@ type ConsumerInstallationsService interface { // Listings are the core entities in the Marketplace. They represent the // products that are available for consumption. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ConsumerListingsService interface { // Get one batch of listings. One may specify up to 50 IDs per request. @@ -88,8 +86,6 @@ type ConsumerListingsService interface { // // List all published listings in the Databricks Marketplace that the // consumer has access to. - // - // Use ListAll() to get all Listing instances, which will iterate over every result page. List(ctx context.Context, request ListListingsRequest) (*ListListingsResponse, error) // Search listings. @@ -97,13 +93,13 @@ type ConsumerListingsService interface { // Search published listings in the Databricks Marketplace that the consumer // has access to. This query supports a variety of different search // parameters and performs fuzzy matching. - // - // Use SearchAll() to get all Listing instances, which will iterate over every result page. Search(ctx context.Context, request SearchListingsRequest) (*SearchListingsResponse, error) } // Personalization Requests allow customers to interact with the individualized // Marketplace listing flow. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ConsumerPersonalizationRequestsService interface { // Create a personalization request. @@ -120,12 +116,12 @@ type ConsumerPersonalizationRequestsService interface { // List all personalization requests. // // List personalization requests for a consumer across all listings. - // - // Use ListAll() to get all PersonalizationRequest instances, which will iterate over every result page. List(ctx context.Context, request ListAllPersonalizationRequestsRequest) (*ListAllPersonalizationRequestsResponse, error) } // Providers are the entities that publish listings to the Marketplace. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ConsumerProvidersService interface { // Get one batch of providers. One may specify up to 50 IDs per request. @@ -144,12 +140,12 @@ type ConsumerProvidersService interface { // // List all providers in the Databricks Marketplace with at least one // visible listing. - // - // Use ListAll() to get all ProviderInfo instances, which will iterate over every result page. List(ctx context.Context, request ListProvidersRequest) (*ListProvidersResponse, error) } // Marketplace exchanges filters curate which groups can access an exchange. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ProviderExchangeFiltersService interface { // Create a new exchange filter. @@ -165,8 +161,6 @@ type ProviderExchangeFiltersService interface { // List exchange filters. // // List exchange filter - // - // Use ListAll() to get all ExchangeFilter instances, which will iterate over every result page. List(ctx context.Context, request ListExchangeFiltersRequest) (*ListExchangeFiltersResponse, error) // Update exchange filter. @@ -177,6 +171,8 @@ type ProviderExchangeFiltersService interface { // Marketplace exchanges allow providers to share their listings with a curated // set of customers. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ProviderExchangesService interface { // Add an exchange for listing. @@ -207,22 +203,16 @@ type ProviderExchangesService interface { // List exchanges. // // List exchanges visible to provider - // - // Use ListAll() to get all Exchange instances, which will iterate over every result page. List(ctx context.Context, request ListExchangesRequest) (*ListExchangesResponse, error) // List exchanges for listing. // // List exchanges associated with a listing - // - // Use ListExchangesForListingAll() to get all ExchangeListing instances, which will iterate over every result page. ListExchangesForListing(ctx context.Context, request ListExchangesForListingRequest) (*ListExchangesForListingResponse, error) // List listings for exchange. // // List listings associated with an exchange - // - // Use ListListingsForExchangeAll() to get all ExchangeListing instances, which will iterate over every result page. ListListingsForExchange(ctx context.Context, request ListListingsForExchangeRequest) (*ListListingsForExchangeResponse, error) // Update exchange. @@ -233,6 +223,8 @@ type ProviderExchangesService interface { // Marketplace offers a set of file APIs for various purposes such as preview // notebooks and provider icons. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ProviderFilesService interface { // Create a file. @@ -254,13 +246,13 @@ type ProviderFilesService interface { // List files. // // List files attached to a parent entity. - // - // Use ListAll() to get all FileInfo instances, which will iterate over every result page. List(ctx context.Context, request ListFilesRequest) (*ListFilesResponse, error) } // Listings are the core entities in the Marketplace. They represent the // products that are available for consumption. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ProviderListingsService interface { // Create a listing. @@ -281,8 +273,6 @@ type ProviderListingsService interface { // List listings. // // List listings owned by this provider - // - // Use ListAll() to get all Listing instances, which will iterate over every result page. List(ctx context.Context, request GetListingsRequest) (*GetListingsResponse, error) // Update listing. @@ -293,14 +283,14 @@ type ProviderListingsService interface { // Personalization requests are an alternate to instantly available listings. // Control the lifecycle of personalized solutions. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ProviderPersonalizationRequestsService interface { // All personalization requests across all listings. // // List personalization requests to this provider. This will return all // personalization requests, regardless of which listing they are for. - // - // Use ListAll() to get all PersonalizationRequest instances, which will iterate over every result page. List(ctx context.Context, request ListAllPersonalizationRequestsRequest) (*ListAllPersonalizationRequestsResponse, error) // Update personalization request status. @@ -311,6 +301,8 @@ type ProviderPersonalizationRequestsService interface { } // Manage templated analytics solution for providers. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ProviderProviderAnalyticsDashboardsService interface { // Create provider analytics dashboard. @@ -336,6 +328,8 @@ type ProviderProviderAnalyticsDashboardsService interface { } // Providers are entities that manage assets in Marketplace. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ProviderProvidersService interface { // Create a provider. @@ -356,8 +350,6 @@ type ProviderProvidersService interface { // List providers. // // List provider profiles for account. - // - // Use ListAll() to get all ProviderInfo instances, which will iterate over every result page. List(ctx context.Context, request ListProvidersRequest) (*ListProvidersResponse, error) // Update provider. diff --git a/service/marketplace/model.go b/service/marketplace/model.go index 62364f223..2586cd4cb 100755 --- a/service/marketplace/model.go +++ b/service/marketplace/model.go @@ -50,6 +50,21 @@ func (f *AssetType) Set(v string) error { } } +// Values returns all possible values of AssetType. +// +// There is no guarantee on the order of the values in the slice. +func (f *AssetType) Values() []AssetType { + return []AssetType{ + AssetTypeAssetTypeApp, + AssetTypeAssetTypeDataTable, + AssetTypeAssetTypeGitRepo, + AssetTypeAssetTypeMedia, + AssetTypeAssetTypeModel, + AssetTypeAssetTypeNotebook, + AssetTypeAssetTypePartnerIntegration, + } +} + // Type always returns AssetType to satisfy [pflag.Value] interface func (f *AssetType) Type() string { return "AssetType" @@ -135,6 +150,36 @@ func (f *Category) Set(v string) error { } } +// Values returns all possible values of Category. +// +// There is no guarantee on the order of the values in the slice. +func (f *Category) Values() []Category { + return []Category{ + CategoryAdvertisingAndMarketing, + CategoryClimateAndEnvironment, + CategoryCommerce, + CategoryDemographics, + CategoryEconomics, + CategoryEducation, + CategoryEnergy, + CategoryFinancial, + CategoryGaming, + CategoryGeospatial, + CategoryHealth, + CategoryLookupTables, + CategoryManufacturing, + CategoryMedia, + CategoryOther, + CategoryPublicSector, + CategoryRetail, + CategoryScienceAndResearch, + CategorySecurity, + CategorySports, + CategoryTransportationAndLogistics, + CategoryTravelAndTourism, + } +} + // Type always returns Category to satisfy [pflag.Value] interface func (f *Category) Type() string { return "Category" @@ -188,6 +233,16 @@ func (f *Cost) Set(v string) error { } } +// Values returns all possible values of Cost. +// +// There is no guarantee on the order of the values in the slice. +func (f *Cost) Values() []Cost { + return []Cost{ + CostFree, + CostPaid, + } +} + // Type always returns Cost to satisfy [pflag.Value] interface func (f *Cost) Type() string { return "Cost" @@ -406,6 +461,23 @@ func (f *DataRefresh) Set(v string) error { } } +// Values returns all possible values of DataRefresh. +// +// There is no guarantee on the order of the values in the slice. +func (f *DataRefresh) Values() []DataRefresh { + return []DataRefresh{ + DataRefreshDaily, + DataRefreshHourly, + DataRefreshMinute, + DataRefreshMonthly, + DataRefreshNone, + DataRefreshQuarterly, + DataRefreshSecond, + DataRefreshWeekly, + DataRefreshYearly, + } +} + // Type always returns DataRefresh to satisfy [pflag.Value] interface func (f *DataRefresh) Type() string { return "DataRefresh" @@ -489,6 +561,16 @@ func (f *DeltaSharingRecipientType) Set(v string) error { } } +// Values returns all possible values of DeltaSharingRecipientType. +// +// There is no guarantee on the order of the values in the slice. +func (f *DeltaSharingRecipientType) Values() []DeltaSharingRecipientType { + return []DeltaSharingRecipientType{ + DeltaSharingRecipientTypeDeltaSharingRecipientTypeDatabricks, + DeltaSharingRecipientTypeDeltaSharingRecipientTypeOpen, + } +} + // Type always returns DeltaSharingRecipientType to satisfy [pflag.Value] interface func (f *DeltaSharingRecipientType) Type() string { return "DeltaSharingRecipientType" @@ -574,6 +656,15 @@ func (f *ExchangeFilterType) Set(v string) error { } } +// Values returns all possible values of ExchangeFilterType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ExchangeFilterType) Values() []ExchangeFilterType { + return []ExchangeFilterType{ + ExchangeFilterTypeGlobalMetastoreId, + } +} + // Type always returns ExchangeFilterType to satisfy [pflag.Value] interface func (f *ExchangeFilterType) Type() string { return "ExchangeFilterType" @@ -678,6 +769,17 @@ func (f *FileParentType) Set(v string) error { } } +// Values returns all possible values of FileParentType. +// +// There is no guarantee on the order of the values in the slice. +func (f *FileParentType) Values() []FileParentType { + return []FileParentType{ + FileParentTypeListing, + FileParentTypeListingResource, + FileParentTypeProvider, + } +} + // Type always returns FileParentType to satisfy [pflag.Value] interface func (f *FileParentType) Type() string { return "FileParentType" @@ -709,6 +811,18 @@ func (f *FileStatus) Set(v string) error { } } +// Values returns all possible values of FileStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *FileStatus) Values() []FileStatus { + return []FileStatus{ + FileStatusFileStatusPublished, + FileStatusFileStatusSanitizationFailed, + FileStatusFileStatusSanitizing, + FileStatusFileStatusStaging, + } +} + // Type always returns FileStatus to satisfy [pflag.Value] interface func (f *FileStatus) Type() string { return "FileStatus" @@ -736,6 +850,16 @@ func (f *FulfillmentType) Set(v string) error { } } +// Values returns all possible values of FulfillmentType. +// +// There is no guarantee on the order of the values in the slice. +func (f *FulfillmentType) Values() []FulfillmentType { + return []FulfillmentType{ + FulfillmentTypeInstall, + FulfillmentTypeRequestAccess, + } +} + // Type always returns FulfillmentType to satisfy [pflag.Value] interface func (f *FulfillmentType) Type() string { return "FulfillmentType" @@ -933,6 +1057,16 @@ func (f *InstallationStatus) Set(v string) error { } } +// Values returns all possible values of InstallationStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *InstallationStatus) Values() []InstallationStatus { + return []InstallationStatus{ + InstallationStatusFailed, + InstallationStatusInstalled, + } +} + // Type always returns InstallationStatus to satisfy [pflag.Value] interface func (f *InstallationStatus) Type() string { return "InstallationStatus" @@ -1466,6 +1600,16 @@ func (f *ListingShareType) Set(v string) error { } } +// Values returns all possible values of ListingShareType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ListingShareType) Values() []ListingShareType { + return []ListingShareType{ + ListingShareTypeFull, + ListingShareTypeSample, + } +} + // Type always returns ListingShareType to satisfy [pflag.Value] interface func (f *ListingShareType) Type() string { return "ListingShareType" @@ -1498,6 +1642,18 @@ func (f *ListingStatus) Set(v string) error { } } +// Values returns all possible values of ListingStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *ListingStatus) Values() []ListingStatus { + return []ListingStatus{ + ListingStatusDraft, + ListingStatusPending, + ListingStatusPublished, + ListingStatusSuspended, + } +} + // Type always returns ListingStatus to satisfy [pflag.Value] interface func (f *ListingStatus) Type() string { return "ListingStatus" @@ -1584,6 +1740,16 @@ func (f *ListingTagType) Set(v string) error { } } +// Values returns all possible values of ListingTagType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ListingTagType) Values() []ListingTagType { + return []ListingTagType{ + ListingTagTypeListingTagTypeLanguage, + ListingTagTypeListingTagTypeTask, + } +} + // Type always returns ListingTagType to satisfy [pflag.Value] interface func (f *ListingTagType) Type() string { return "ListingTagType" @@ -1611,6 +1777,16 @@ func (f *ListingType) Set(v string) error { } } +// Values returns all possible values of ListingType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ListingType) Values() []ListingType { + return []ListingType{ + ListingTypePersonalized, + ListingTypeStandard, + } +} + // Type always returns ListingType to satisfy [pflag.Value] interface func (f *ListingType) Type() string { return "ListingType" @@ -1640,6 +1816,17 @@ func (f *MarketplaceFileType) Set(v string) error { } } +// Values returns all possible values of MarketplaceFileType. +// +// There is no guarantee on the order of the values in the slice. +func (f *MarketplaceFileType) Values() []MarketplaceFileType { + return []MarketplaceFileType{ + MarketplaceFileTypeApp, + MarketplaceFileTypeEmbeddedNotebook, + MarketplaceFileTypeProviderIcon, + } +} + // Type always returns MarketplaceFileType to satisfy [pflag.Value] interface func (f *MarketplaceFileType) Type() string { return "MarketplaceFileType" @@ -1716,6 +1903,18 @@ func (f *PersonalizationRequestStatus) Set(v string) error { } } +// Values returns all possible values of PersonalizationRequestStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *PersonalizationRequestStatus) Values() []PersonalizationRequestStatus { + return []PersonalizationRequestStatus{ + PersonalizationRequestStatusDenied, + PersonalizationRequestStatusFulfilled, + PersonalizationRequestStatusNew, + PersonalizationRequestStatusRequestPending, + } +} + // Type always returns PersonalizationRequestStatus to satisfy [pflag.Value] interface func (f *PersonalizationRequestStatus) Type() string { return "PersonalizationRequestStatus" @@ -2073,6 +2272,16 @@ func (f *Visibility) Set(v string) error { } } +// Values returns all possible values of Visibility. +// +// There is no guarantee on the order of the values in the slice. +func (f *Visibility) Values() []Visibility { + return []Visibility{ + VisibilityPrivate, + VisibilityPublic, + } +} + // Type always returns Visibility to satisfy [pflag.Value] interface func (f *Visibility) Type() string { return "Visibility" diff --git a/service/ml/interface.go b/service/ml/interface.go index ec7e6d77f..f56671525 100755 --- a/service/ml/interface.go +++ b/service/ml/interface.go @@ -15,6 +15,8 @@ import ( // Experiments are located in the workspace file tree. You manage experiments // using the same tools you use to manage other workspace objects such as // folders, notebooks, and libraries. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ExperimentsService interface { // Create experiment. @@ -102,8 +104,6 @@ type ExperimentsService interface { // Get metric history for a run. // // Gets a list of all values for the specified metric for a given run. - // - // Use GetHistoryAll() to get all Metric instances, which will iterate over every result page. GetHistory(ctx context.Context, request GetHistoryRequest) (*GetMetricHistoryResponse, error) // Get a logged model. @@ -138,15 +138,11 @@ type ExperimentsService interface { // Please call `/api/2.0/fs/directories{directory_path}` for listing // artifacts in UC Volumes, which supports pagination. See [List directory // contents | Files API](/api/workspace/files/listdirectorycontents). - // - // Use ListArtifactsAll() to get all FileInfo instances, which will iterate over every result page. ListArtifacts(ctx context.Context, request ListArtifactsRequest) (*ListArtifactsResponse, error) // List experiments. // // Gets a list of all experiments. - // - // Use ListExperimentsAll() to get all Experiment instances, which will iterate over every result page. ListExperiments(ctx context.Context, request ListExperimentsRequest) (*ListExperimentsResponse, error) // List artifacts for a logged model. @@ -285,8 +281,6 @@ type ExperimentsService interface { // Search experiments. // // Searches for experiments that satisfy specified search criteria. - // - // Use SearchExperimentsAll() to get all Experiment instances, which will iterate over every result page. SearchExperiments(ctx context.Context, request SearchExperiments) (*SearchExperimentsResponse, error) // Search logged models. @@ -299,8 +293,6 @@ type ExperimentsService interface { // Searches for runs that satisfy expressions. // // Search expressions can use `mlflowMetric` and `mlflowParam` keys. - // - // Use SearchRunsAll() to get all Run instances, which will iterate over every result page. SearchRuns(ctx context.Context, request SearchRuns) (*SearchRunsResponse, error) // Set a tag for an experiment. @@ -344,6 +336,8 @@ type ExperimentsService interface { // The Forecasting API allows you to create and get serverless forecasting // experiments +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ForecastingService interface { // Create a forecasting experiment. @@ -365,6 +359,8 @@ type ForecastingService interface { // // The Workspace Model Registry is a centralized model repository and a UI and // set of APIs that enable you to manage the full lifecycle of MLflow Models. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ModelRegistryService interface { // Approve transition request. @@ -445,8 +441,6 @@ type ModelRegistryService interface { // Get the latest version. // // Gets the latest version of a registered model. - // - // Use GetLatestVersionsAll() to get all ModelVersion instances GetLatestVersions(ctx context.Context, request GetLatestVersionsRequest) (*GetLatestVersionsResponse, error) // Get model. @@ -483,15 +477,11 @@ type ModelRegistryService interface { // // Lists all available registered models, up to the limit specified in // __max_results__. - // - // Use ListModelsAll() to get all Model instances, which will iterate over every result page. ListModels(ctx context.Context, request ListModelsRequest) (*ListModelsResponse, error) // List transition requests. // // Gets a list of all open stage transition requests for the model version. - // - // Use ListTransitionRequestsAll() to get all Activity instances ListTransitionRequests(ctx context.Context, request ListTransitionRequestsRequest) (*ListTransitionRequestsResponse, error) // List registry webhooks. @@ -499,8 +489,6 @@ type ModelRegistryService interface { // **NOTE:** This endpoint is in Public Preview. // // Lists all registry webhooks. - // - // Use ListWebhooksAll() to get all RegistryWebhook instances, which will iterate over every result page. ListWebhooks(ctx context.Context, request ListWebhooksRequest) (*ListRegistryWebhooks, error) // Reject a transition request. @@ -516,15 +504,11 @@ type ModelRegistryService interface { // Searches model versions. // // Searches for specific model versions based on the supplied __filter__. - // - // Use SearchModelVersionsAll() to get all ModelVersion instances, which will iterate over every result page. SearchModelVersions(ctx context.Context, request SearchModelVersionsRequest) (*SearchModelVersionsResponse, error) // Search models. // // Search for registered models based on the specified __filter__. - // - // Use SearchModelsAll() to get all Model instances, which will iterate over every result page. SearchModels(ctx context.Context, request SearchModelsRequest) (*SearchModelsResponse, error) // Set a tag. diff --git a/service/ml/model.go b/service/ml/model.go index 46f7d3002..6f8c30ed6 100755 --- a/service/ml/model.go +++ b/service/ml/model.go @@ -108,6 +108,17 @@ func (f *ActivityAction) Set(v string) error { } } +// Values returns all possible values of ActivityAction. +// +// There is no guarantee on the order of the values in the slice. +func (f *ActivityAction) Values() []ActivityAction { + return []ActivityAction{ + ActivityActionApproveTransitionRequest, + ActivityActionCancelTransitionRequest, + ActivityActionRejectTransitionRequest, + } +} + // Type always returns ActivityAction to satisfy [pflag.Value] interface func (f *ActivityAction) Type() string { return "ActivityAction" @@ -165,6 +176,21 @@ func (f *ActivityType) Set(v string) error { } } +// Values returns all possible values of ActivityType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ActivityType) Values() []ActivityType { + return []ActivityType{ + ActivityTypeAppliedTransition, + ActivityTypeApprovedRequest, + ActivityTypeCancelledRequest, + ActivityTypeNewComment, + ActivityTypeRejectedRequest, + ActivityTypeRequestedTransition, + ActivityTypeSystemTransition, + } +} + // Type always returns ActivityType to satisfy [pflag.Value] interface func (f *ActivityType) Type() string { return "ActivityType" @@ -278,6 +304,18 @@ func (f *ArtifactCredentialType) Set(v string) error { } } +// Values returns all possible values of ArtifactCredentialType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ArtifactCredentialType) Values() []ArtifactCredentialType { + return []ArtifactCredentialType{ + ArtifactCredentialTypeAwsPresignedUrl, + ArtifactCredentialTypeAzureAdlsGen2SasUri, + ArtifactCredentialTypeAzureSasUri, + ArtifactCredentialTypeGcpSignedUrl, + } +} + // Type always returns ArtifactCredentialType to satisfy [pflag.Value] interface func (f *ArtifactCredentialType) Type() string { return "ArtifactCredentialType" @@ -311,6 +349,16 @@ func (f *CommentActivityAction) Set(v string) error { } } +// Values returns all possible values of CommentActivityAction. +// +// There is no guarantee on the order of the values in the slice. +func (f *CommentActivityAction) Values() []CommentActivityAction { + return []CommentActivityAction{ + CommentActivityActionDeleteComment, + CommentActivityActionEditComment, + } +} + // Type always returns CommentActivityAction to satisfy [pflag.Value] interface func (f *CommentActivityAction) Type() string { return "CommentActivityAction" @@ -944,6 +992,18 @@ func (f *DeleteTransitionRequestStage) Set(v string) error { } } +// Values returns all possible values of DeleteTransitionRequestStage. +// +// There is no guarantee on the order of the values in the slice. +func (f *DeleteTransitionRequestStage) Values() []DeleteTransitionRequestStage { + return []DeleteTransitionRequestStage{ + DeleteTransitionRequestStageArchived, + DeleteTransitionRequestStageNone, + DeleteTransitionRequestStageProduction, + DeleteTransitionRequestStageStaging, + } +} + // Type always returns DeleteTransitionRequestStage to satisfy [pflag.Value] interface func (f *DeleteTransitionRequestStage) Type() string { return "DeleteTransitionRequestStage" @@ -1084,6 +1144,17 @@ func (f *ExperimentPermissionLevel) Set(v string) error { } } +// Values returns all possible values of ExperimentPermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *ExperimentPermissionLevel) Values() []ExperimentPermissionLevel { + return []ExperimentPermissionLevel{ + ExperimentPermissionLevelCanEdit, + ExperimentPermissionLevelCanManage, + ExperimentPermissionLevelCanRead, + } +} + // Type always returns ExperimentPermissionLevel to satisfy [pflag.Value] interface func (f *ExperimentPermissionLevel) Type() string { return "ExperimentPermissionLevel" @@ -1230,6 +1301,19 @@ func (f *ForecastingExperimentState) Set(v string) error { } } +// Values returns all possible values of ForecastingExperimentState. +// +// There is no guarantee on the order of the values in the slice. +func (f *ForecastingExperimentState) Values() []ForecastingExperimentState { + return []ForecastingExperimentState{ + ForecastingExperimentStateCancelled, + ForecastingExperimentStateFailed, + ForecastingExperimentStatePending, + ForecastingExperimentStateRunning, + ForecastingExperimentStateSucceeded, + } +} + // Type always returns ForecastingExperimentState to satisfy [pflag.Value] interface func (f *ForecastingExperimentState) Type() string { return "ForecastingExperimentState" @@ -2034,6 +2118,17 @@ func (f *LoggedModelStatus) Set(v string) error { } } +// Values returns all possible values of LoggedModelStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *LoggedModelStatus) Values() []LoggedModelStatus { + return []LoggedModelStatus{ + LoggedModelStatusLoggedModelPending, + LoggedModelStatusLoggedModelReady, + LoggedModelStatusLoggedModelUploadFailed, + } +} + // Type always returns LoggedModelStatus to satisfy [pflag.Value] interface func (f *LoggedModelStatus) Type() string { return "LoggedModelStatus" @@ -2311,6 +2406,17 @@ func (f *ModelVersionStatus) Set(v string) error { } } +// Values returns all possible values of ModelVersionStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *ModelVersionStatus) Values() []ModelVersionStatus { + return []ModelVersionStatus{ + ModelVersionStatusFailedRegistration, + ModelVersionStatusPendingRegistration, + ModelVersionStatusReady, + } +} + // Type always returns ModelVersionStatus to satisfy [pflag.Value] interface func (f *ModelVersionStatus) Type() string { return "ModelVersionStatus" @@ -2381,6 +2487,19 @@ func (f *PermissionLevel) Set(v string) error { } } +// Values returns all possible values of PermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *PermissionLevel) Values() []PermissionLevel { + return []PermissionLevel{ + PermissionLevelCanEdit, + PermissionLevelCanManage, + PermissionLevelCanManageProductionVersions, + PermissionLevelCanManageStagingVersions, + PermissionLevelCanRead, + } +} + // Type always returns PermissionLevel to satisfy [pflag.Value] interface func (f *PermissionLevel) Type() string { return "PermissionLevel" @@ -2477,6 +2596,19 @@ func (f *RegisteredModelPermissionLevel) Set(v string) error { } } +// Values returns all possible values of RegisteredModelPermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *RegisteredModelPermissionLevel) Values() []RegisteredModelPermissionLevel { + return []RegisteredModelPermissionLevel{ + RegisteredModelPermissionLevelCanEdit, + RegisteredModelPermissionLevelCanManage, + RegisteredModelPermissionLevelCanManageProductionVersions, + RegisteredModelPermissionLevelCanManageStagingVersions, + RegisteredModelPermissionLevelCanRead, + } +} + // Type always returns RegisteredModelPermissionLevel to satisfy [pflag.Value] interface func (f *RegisteredModelPermissionLevel) Type() string { return "RegisteredModelPermissionLevel" @@ -2634,6 +2766,26 @@ func (f *RegistryWebhookEvent) Set(v string) error { } } +// Values returns all possible values of RegistryWebhookEvent. +// +// There is no guarantee on the order of the values in the slice. +func (f *RegistryWebhookEvent) Values() []RegistryWebhookEvent { + return []RegistryWebhookEvent{ + RegistryWebhookEventCommentCreated, + RegistryWebhookEventModelVersionCreated, + RegistryWebhookEventModelVersionTagSet, + RegistryWebhookEventModelVersionTransitionedStage, + RegistryWebhookEventModelVersionTransitionedToArchived, + RegistryWebhookEventModelVersionTransitionedToProduction, + RegistryWebhookEventModelVersionTransitionedToStaging, + RegistryWebhookEventRegisteredModelCreated, + RegistryWebhookEventTransitionRequestCreated, + RegistryWebhookEventTransitionRequestToArchivedCreated, + RegistryWebhookEventTransitionRequestToProductionCreated, + RegistryWebhookEventTransitionRequestToStagingCreated, + } +} + // Type always returns RegistryWebhookEvent to satisfy [pflag.Value] interface func (f *RegistryWebhookEvent) Type() string { return "RegistryWebhookEvent" @@ -2675,6 +2827,17 @@ func (f *RegistryWebhookStatus) Set(v string) error { } } +// Values returns all possible values of RegistryWebhookStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *RegistryWebhookStatus) Values() []RegistryWebhookStatus { + return []RegistryWebhookStatus{ + RegistryWebhookStatusActive, + RegistryWebhookStatusDisabled, + RegistryWebhookStatusTestMode, + } +} + // Type always returns RegistryWebhookStatus to satisfy [pflag.Value] interface func (f *RegistryWebhookStatus) Type() string { return "RegistryWebhookStatus" @@ -2877,6 +3040,19 @@ func (f *RunInfoStatus) Set(v string) error { } } +// Values returns all possible values of RunInfoStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *RunInfoStatus) Values() []RunInfoStatus { + return []RunInfoStatus{ + RunInfoStatusFailed, + RunInfoStatusFinished, + RunInfoStatusKilled, + RunInfoStatusRunning, + RunInfoStatusScheduled, + } +} + // Type always returns RunInfoStatus to satisfy [pflag.Value] interface func (f *RunInfoStatus) Type() string { return "RunInfoStatus" @@ -3323,6 +3499,18 @@ func (f *Stage) Set(v string) error { } } +// Values returns all possible values of Stage. +// +// There is no guarantee on the order of the values in the slice. +func (f *Stage) Values() []Stage { + return []Stage{ + StageArchived, + StageNone, + StageProduction, + StageStaging, + } +} + // Type always returns Stage to satisfy [pflag.Value] interface func (f *Stage) Type() string { return "Stage" @@ -3363,6 +3551,17 @@ func (f *Status) Set(v string) error { } } +// Values returns all possible values of Status. +// +// There is no guarantee on the order of the values in the slice. +func (f *Status) Values() []Status { + return []Status{ + StatusFailedRegistration, + StatusPendingRegistration, + StatusReady, + } +} + // Type always returns Status to satisfy [pflag.Value] interface func (f *Status) Type() string { return "Status" @@ -3666,6 +3865,19 @@ func (f *UpdateRunStatus) Set(v string) error { } } +// Values returns all possible values of UpdateRunStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *UpdateRunStatus) Values() []UpdateRunStatus { + return []UpdateRunStatus{ + UpdateRunStatusFailed, + UpdateRunStatusFinished, + UpdateRunStatusKilled, + UpdateRunStatusRunning, + UpdateRunStatusScheduled, + } +} + // Type always returns UpdateRunStatus to satisfy [pflag.Value] interface func (f *UpdateRunStatus) Type() string { return "UpdateRunStatus" @@ -3699,6 +3911,17 @@ func (f *ViewType) Set(v string) error { } } +// Values returns all possible values of ViewType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ViewType) Values() []ViewType { + return []ViewType{ + ViewTypeActiveOnly, + ViewTypeAll, + ViewTypeDeletedOnly, + } +} + // Type always returns ViewType to satisfy [pflag.Value] interface func (f *ViewType) Type() string { return "ViewType" diff --git a/service/oauth2/interface.go b/service/oauth2/interface.go index dd42df15b..8d84dc8f5 100755 --- a/service/oauth2/interface.go +++ b/service/oauth2/interface.go @@ -55,6 +55,8 @@ import ( // You do not need to configure an OAuth application in Databricks to use token // federation. // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [SCIM]: https://docs.databricks.com/admin/users-groups/scim/index.html type AccountFederationPolicyService interface { @@ -68,8 +70,6 @@ type AccountFederationPolicyService interface { Get(ctx context.Context, request GetAccountFederationPolicyRequest) (*FederationPolicy, error) // List account federation policies. - // - // Use ListAll() to get all FederationPolicy instances, which will iterate over every result page. List(ctx context.Context, request ListAccountFederationPoliciesRequest) (*ListFederationPoliciesResponse, error) // Update account federation policy. @@ -79,6 +79,8 @@ type AccountFederationPolicyService interface { // These APIs enable administrators to manage custom OAuth app integrations, // which is required for adding/using Custom OAuth App Integration like Tableau // Cloud for Databricks in AWS cloud. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type CustomAppIntegrationService interface { // Create Custom OAuth App Integration. @@ -104,8 +106,6 @@ type CustomAppIntegrationService interface { // // Get the list of custom OAuth app integrations for the specified // Databricks account - // - // Use ListAll() to get all GetCustomAppIntegrationOutput instances, which will iterate over every result page. List(ctx context.Context, request ListCustomAppIntegrationsRequest) (*GetCustomAppIntegrationsOutput, error) // Updates Custom OAuth App Integration. @@ -119,19 +119,21 @@ type CustomAppIntegrationService interface { // applications in Databricks. Administrators can add the published OAuth // applications to their account through the OAuth Published App Integration // APIs. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type OAuthPublishedAppsService interface { // Get all the published OAuth apps. // // Get all the available published OAuth apps in Databricks. - // - // Use ListAll() to get all PublishedAppOutput instances, which will iterate over every result page. List(ctx context.Context, request ListOAuthPublishedAppsRequest) (*GetPublishedAppsOutput, error) } // These APIs enable administrators to manage published OAuth app integrations, // which is required for adding/using Published OAuth App Integration like // Tableau Desktop for Databricks in AWS cloud. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type PublishedAppIntegrationService interface { // Create Published OAuth App Integration. @@ -157,8 +159,6 @@ type PublishedAppIntegrationService interface { // // Get the list of published OAuth app integrations for the specified // Databricks account - // - // Use ListAll() to get all GetPublishedAppIntegrationOutput instances, which will iterate over every result page. List(ctx context.Context, request ListPublishedAppIntegrationsRequest) (*GetPublishedAppIntegrationsOutput, error) // Updates Published OAuth App Integration. @@ -222,6 +222,8 @@ type PublishedAppIntegrationService interface { // // You do not need to configure an OAuth application in Databricks to use token // federation. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ServicePrincipalFederationPolicyService interface { // Create service principal federation policy. @@ -234,8 +236,6 @@ type ServicePrincipalFederationPolicyService interface { Get(ctx context.Context, request GetServicePrincipalFederationPolicyRequest) (*FederationPolicy, error) // List service principal federation policies. - // - // Use ListAll() to get all FederationPolicy instances, which will iterate over every result page. List(ctx context.Context, request ListServicePrincipalFederationPoliciesRequest) (*ListFederationPoliciesResponse, error) // Update service principal federation policy. @@ -253,6 +253,8 @@ type ServicePrincipalFederationPolicyService interface { // Terraform Provider to authenticate with the service principal. For more // information, see [Databricks Terraform Provider]. // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [Authentication using OAuth tokens for service principals]: https://docs.databricks.com/dev-tools/authentication-oauth.html // [Databricks Terraform Provider]: https://github.com/databricks/terraform-provider-databricks/blob/master/docs/index.md#authenticating-with-service-principal type ServicePrincipalSecretsService interface { @@ -272,7 +274,5 @@ type ServicePrincipalSecretsService interface { // List all secrets associated with the given service principal. This // operation only returns information about the secrets themselves and does // not include the secret values. - // - // Use ListAll() to get all SecretInfo instances, which will iterate over every result page. List(ctx context.Context, request ListServicePrincipalSecretsRequest) (*ListServicePrincipalSecretsResponse, error) } diff --git a/service/pipelines/interface.go b/service/pipelines/interface.go index 6753a6ba6..cf8b4874e 100755 --- a/service/pipelines/interface.go +++ b/service/pipelines/interface.go @@ -20,6 +20,8 @@ import ( // data quality with Delta Live Tables expectations. Expectations allow you to // define expected data quality and specify how to handle records that fail // those expectations. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type PipelinesService interface { // Create a pipeline. @@ -56,15 +58,11 @@ type PipelinesService interface { // List pipeline events. // // Retrieves events for a pipeline. - // - // Use ListPipelineEventsAll() to get all PipelineEvent instances, which will iterate over every result page. ListPipelineEvents(ctx context.Context, request ListPipelineEventsRequest) (*ListPipelineEventsResponse, error) // List pipelines. // // Lists pipelines defined in the Delta Live Tables system. - // - // Use ListPipelinesAll() to get all PipelineStateInfo instances, which will iterate over every result page. ListPipelines(ctx context.Context, request ListPipelinesRequest) (*ListPipelinesResponse, error) // List pipeline updates. diff --git a/service/pipelines/model.go b/service/pipelines/model.go index c8f53b00a..f77471ebe 100755 --- a/service/pipelines/model.go +++ b/service/pipelines/model.go @@ -180,6 +180,21 @@ func (f *DayOfWeek) Set(v string) error { } } +// Values returns all possible values of DayOfWeek. +// +// There is no guarantee on the order of the values in the slice. +func (f *DayOfWeek) Values() []DayOfWeek { + return []DayOfWeek{ + DayOfWeekFriday, + DayOfWeekMonday, + DayOfWeekSaturday, + DayOfWeekSunday, + DayOfWeekThursday, + DayOfWeekTuesday, + DayOfWeekWednesday, + } +} + // Type always returns DayOfWeek to satisfy [pflag.Value] interface func (f *DayOfWeek) Type() string { return "DayOfWeek" @@ -215,6 +230,15 @@ func (f *DeploymentKind) Set(v string) error { } } +// Values returns all possible values of DeploymentKind. +// +// There is no guarantee on the order of the values in the slice. +func (f *DeploymentKind) Values() []DeploymentKind { + return []DeploymentKind{ + DeploymentKindBundle, + } +} + // Type always returns DeploymentKind to satisfy [pflag.Value] interface func (f *DeploymentKind) Type() string { return "DeploymentKind" @@ -356,6 +380,18 @@ func (f *EventLevel) Set(v string) error { } } +// Values returns all possible values of EventLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *EventLevel) Values() []EventLevel { + return []EventLevel{ + EventLevelError, + EventLevelInfo, + EventLevelMetrics, + EventLevelWarn, + } +} + // Type always returns EventLevel to satisfy [pflag.Value] interface func (f *EventLevel) Type() string { return "EventLevel" @@ -487,6 +523,16 @@ func (f *GetPipelineResponseHealth) Set(v string) error { } } +// Values returns all possible values of GetPipelineResponseHealth. +// +// There is no guarantee on the order of the values in the slice. +func (f *GetPipelineResponseHealth) Values() []GetPipelineResponseHealth { + return []GetPipelineResponseHealth{ + GetPipelineResponseHealthHealthy, + GetPipelineResponseHealthUnhealthy, + } +} + // Type always returns GetPipelineResponseHealth to satisfy [pflag.Value] interface func (f *GetPipelineResponseHealth) Type() string { return "GetPipelineResponseHealth" @@ -618,6 +664,26 @@ func (f *IngestionSourceType) Set(v string) error { } } +// Values returns all possible values of IngestionSourceType. +// +// There is no guarantee on the order of the values in the slice. +func (f *IngestionSourceType) Values() []IngestionSourceType { + return []IngestionSourceType{ + IngestionSourceTypeDynamics365, + IngestionSourceTypeGa4RawData, + IngestionSourceTypeManagedPostgresql, + IngestionSourceTypeMysql, + IngestionSourceTypeNetsuite, + IngestionSourceTypeOracle, + IngestionSourceTypePostgresql, + IngestionSourceTypeSalesforce, + IngestionSourceTypeServicenow, + IngestionSourceTypeSharepoint, + IngestionSourceTypeSqlserver, + IngestionSourceTypeWorkdayRaas, + } +} + // Type always returns IngestionSourceType to satisfy [pflag.Value] interface func (f *IngestionSourceType) Type() string { return "IngestionSourceType" @@ -802,6 +868,17 @@ func (f *MaturityLevel) Set(v string) error { } } +// Values returns all possible values of MaturityLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *MaturityLevel) Values() []MaturityLevel { + return []MaturityLevel{ + MaturityLevelDeprecated, + MaturityLevelEvolving, + MaturityLevelStable, + } +} + // Type always returns MaturityLevel to satisfy [pflag.Value] interface func (f *MaturityLevel) Type() string { return "MaturityLevel" @@ -1092,6 +1169,16 @@ func (f *PipelineClusterAutoscaleMode) Set(v string) error { } } +// Values returns all possible values of PipelineClusterAutoscaleMode. +// +// There is no guarantee on the order of the values in the slice. +func (f *PipelineClusterAutoscaleMode) Values() []PipelineClusterAutoscaleMode { + return []PipelineClusterAutoscaleMode{ + PipelineClusterAutoscaleModeEnhanced, + PipelineClusterAutoscaleModeLegacy, + } +} + // Type always returns PipelineClusterAutoscaleMode to satisfy [pflag.Value] interface func (f *PipelineClusterAutoscaleMode) Type() string { return "PipelineClusterAutoscaleMode" @@ -1219,6 +1306,18 @@ func (f *PipelinePermissionLevel) Set(v string) error { } } +// Values returns all possible values of PipelinePermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *PipelinePermissionLevel) Values() []PipelinePermissionLevel { + return []PipelinePermissionLevel{ + PipelinePermissionLevelCanManage, + PipelinePermissionLevelCanRun, + PipelinePermissionLevelCanView, + PipelinePermissionLevelIsOwner, + } +} + // Type always returns PipelinePermissionLevel to satisfy [pflag.Value] interface func (f *PipelinePermissionLevel) Type() string { return "PipelinePermissionLevel" @@ -1374,6 +1473,23 @@ func (f *PipelineState) Set(v string) error { } } +// Values returns all possible values of PipelineState. +// +// There is no guarantee on the order of the values in the slice. +func (f *PipelineState) Values() []PipelineState { + return []PipelineState{ + PipelineStateDeleted, + PipelineStateDeploying, + PipelineStateFailed, + PipelineStateIdle, + PipelineStateRecovering, + PipelineStateResetting, + PipelineStateRunning, + PipelineStateStarting, + PipelineStateStopping, + } +} + // Type always returns PipelineState to satisfy [pflag.Value] interface func (f *PipelineState) Type() string { return "PipelineState" @@ -1433,6 +1549,16 @@ func (f *PipelineStateInfoHealth) Set(v string) error { } } +// Values returns all possible values of PipelineStateInfoHealth. +// +// There is no guarantee on the order of the values in the slice. +func (f *PipelineStateInfoHealth) Values() []PipelineStateInfoHealth { + return []PipelineStateInfoHealth{ + PipelineStateInfoHealthHealthy, + PipelineStateInfoHealthUnhealthy, + } +} + // Type always returns PipelineStateInfoHealth to satisfy [pflag.Value] interface func (f *PipelineStateInfoHealth) Type() string { return "PipelineStateInfoHealth" @@ -1670,6 +1796,21 @@ func (f *StartUpdateCause) Set(v string) error { } } +// Values returns all possible values of StartUpdateCause. +// +// There is no guarantee on the order of the values in the slice. +func (f *StartUpdateCause) Values() []StartUpdateCause { + return []StartUpdateCause{ + StartUpdateCauseApiCall, + StartUpdateCauseInfrastructureMaintenance, + StartUpdateCauseJobTask, + StartUpdateCauseRetryOnFailure, + StartUpdateCauseSchemaChange, + StartUpdateCauseServiceUpgrade, + StartUpdateCauseUserAction, + } +} + // Type always returns StartUpdateCause to satisfy [pflag.Value] interface func (f *StartUpdateCause) Type() string { return "StartUpdateCause" @@ -1787,6 +1928,16 @@ func (f *TableSpecificConfigScdType) Set(v string) error { } } +// Values returns all possible values of TableSpecificConfigScdType. +// +// There is no guarantee on the order of the values in the slice. +func (f *TableSpecificConfigScdType) Values() []TableSpecificConfigScdType { + return []TableSpecificConfigScdType{ + TableSpecificConfigScdTypeScdType1, + TableSpecificConfigScdTypeScdType2, + } +} + // Type always returns TableSpecificConfigScdType to satisfy [pflag.Value] interface func (f *TableSpecificConfigScdType) Type() string { return "TableSpecificConfigScdType" @@ -1868,6 +2019,21 @@ func (f *UpdateInfoCause) Set(v string) error { } } +// Values returns all possible values of UpdateInfoCause. +// +// There is no guarantee on the order of the values in the slice. +func (f *UpdateInfoCause) Values() []UpdateInfoCause { + return []UpdateInfoCause{ + UpdateInfoCauseApiCall, + UpdateInfoCauseInfrastructureMaintenance, + UpdateInfoCauseJobTask, + UpdateInfoCauseRetryOnFailure, + UpdateInfoCauseSchemaChange, + UpdateInfoCauseServiceUpgrade, + UpdateInfoCauseUserAction, + } +} + // Type always returns UpdateInfoCause to satisfy [pflag.Value] interface func (f *UpdateInfoCause) Type() string { return "UpdateInfoCause" @@ -1914,6 +2080,25 @@ func (f *UpdateInfoState) Set(v string) error { } } +// Values returns all possible values of UpdateInfoState. +// +// There is no guarantee on the order of the values in the slice. +func (f *UpdateInfoState) Values() []UpdateInfoState { + return []UpdateInfoState{ + UpdateInfoStateCanceled, + UpdateInfoStateCompleted, + UpdateInfoStateCreated, + UpdateInfoStateFailed, + UpdateInfoStateInitializing, + UpdateInfoStateQueued, + UpdateInfoStateResetting, + UpdateInfoStateRunning, + UpdateInfoStateSettingUpTables, + UpdateInfoStateStopping, + UpdateInfoStateWaitingForResources, + } +} + // Type always returns UpdateInfoState to satisfy [pflag.Value] interface func (f *UpdateInfoState) Type() string { return "UpdateInfoState" @@ -1978,6 +2163,25 @@ func (f *UpdateStateInfoState) Set(v string) error { } } +// Values returns all possible values of UpdateStateInfoState. +// +// There is no guarantee on the order of the values in the slice. +func (f *UpdateStateInfoState) Values() []UpdateStateInfoState { + return []UpdateStateInfoState{ + UpdateStateInfoStateCanceled, + UpdateStateInfoStateCompleted, + UpdateStateInfoStateCreated, + UpdateStateInfoStateFailed, + UpdateStateInfoStateInitializing, + UpdateStateInfoStateQueued, + UpdateStateInfoStateResetting, + UpdateStateInfoStateRunning, + UpdateStateInfoStateSettingUpTables, + UpdateStateInfoStateStopping, + UpdateStateInfoStateWaitingForResources, + } +} + // Type always returns UpdateStateInfoState to satisfy [pflag.Value] interface func (f *UpdateStateInfoState) Type() string { return "UpdateStateInfoState" diff --git a/service/pkg.go b/service/pkg.go index 599ac820d..8cd72c43e 100644 --- a/service/pkg.go +++ b/service/pkg.go @@ -54,10 +54,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. @@ -362,8 +362,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/interface.go b/service/provisioning/interface.go index e0a0cd86e..e84e37b4c 100755 --- a/service/provisioning/interface.go +++ b/service/provisioning/interface.go @@ -11,6 +11,8 @@ import ( // Databricks can deploy clusters in the appropriate VPC for the new workspace. // A credential configuration encapsulates this role information, and its ID is // used when creating a new workspace. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type CredentialsService interface { // Create credential configuration. @@ -67,6 +69,8 @@ type CredentialsService interface { // encryption requires that the workspace is on the E2 version of the platform. // If you have an older workspace, it might not be on the E2 version of the // platform. If you are not sure, contact your Databricks representative. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type EncryptionKeysService interface { // Create encryption key configuration. @@ -138,6 +142,8 @@ type EncryptionKeysService interface { // These APIs manage network configurations for customer-managed VPCs // (optional). Its ID is used when creating a new workspace if you use // customer-managed VPCs. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type NetworksService interface { // Create network configuration. @@ -174,6 +180,8 @@ type NetworksService interface { } // These APIs manage private access settings for this account. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type PrivateAccessService interface { // Create private access settings. @@ -259,6 +267,8 @@ type PrivateAccessService interface { // bucket for storage of non-production DBFS data. A storage configuration // encapsulates this bucket information, and its ID is used when creating a new // workspace. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type StorageService interface { // Create new storage configuration. @@ -295,6 +305,8 @@ type StorageService interface { } // These APIs manage VPC endpoint configurations for this account. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type VpcEndpointsService interface { // Create VPC endpoint configuration. @@ -359,6 +371,8 @@ type VpcEndpointsService interface { // These endpoints are available if your account is on the E2 version of the // platform or on a select custom plan that allows multiple workspaces per // account. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type WorkspacesService interface { // Create a new workspace. diff --git a/service/provisioning/model.go b/service/provisioning/model.go index af68dac4a..bac81a427 100755 --- a/service/provisioning/model.go +++ b/service/provisioning/model.go @@ -446,6 +446,16 @@ func (f *EndpointUseCase) Set(v string) error { } } +// Values returns all possible values of EndpointUseCase. +// +// There is no guarantee on the order of the values in the slice. +func (f *EndpointUseCase) Values() []EndpointUseCase { + return []EndpointUseCase{ + EndpointUseCaseDataplaneRelayAccess, + EndpointUseCaseWorkspaceAccess, + } +} + // Type always returns EndpointUseCase to satisfy [pflag.Value] interface func (f *EndpointUseCase) Type() string { return "EndpointUseCase" @@ -481,6 +491,19 @@ func (f *ErrorType) Set(v string) error { } } +// Values returns all possible values of ErrorType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ErrorType) Values() []ErrorType { + return []ErrorType{ + ErrorTypeCredentials, + ErrorTypeNetworkAcl, + ErrorTypeSecurityGroup, + ErrorTypeSubnet, + ErrorTypeVpc, + } +} + // Type always returns ErrorType to satisfy [pflag.Value] interface func (f *ErrorType) Type() string { return "ErrorType" @@ -704,6 +727,16 @@ func (f *GkeConfigConnectivityType) Set(v string) error { } } +// Values returns all possible values of GkeConfigConnectivityType. +// +// There is no guarantee on the order of the values in the slice. +func (f *GkeConfigConnectivityType) Values() []GkeConfigConnectivityType { + return []GkeConfigConnectivityType{ + GkeConfigConnectivityTypePrivateNodePublicMaster, + GkeConfigConnectivityTypePublicNodePublicMaster, + } +} + // Type always returns GkeConfigConnectivityType to satisfy [pflag.Value] interface func (f *GkeConfigConnectivityType) Type() string { return "GkeConfigConnectivityType" @@ -737,6 +770,16 @@ func (f *KeyUseCase) Set(v string) error { } } +// Values returns all possible values of KeyUseCase. +// +// There is no guarantee on the order of the values in the slice. +func (f *KeyUseCase) Values() []KeyUseCase { + return []KeyUseCase{ + KeyUseCaseManagedServices, + KeyUseCaseStorage, + } +} + // Type always returns KeyUseCase to satisfy [pflag.Value] interface func (f *KeyUseCase) Type() string { return "KeyUseCase" @@ -871,6 +914,20 @@ func (f *PricingTier) Set(v string) error { } } +// Values returns all possible values of PricingTier. +// +// There is no guarantee on the order of the values in the slice. +func (f *PricingTier) Values() []PricingTier { + return []PricingTier{ + PricingTierCommunityEdition, + PricingTierDedicated, + PricingTierEnterprise, + PricingTierPremium, + PricingTierStandard, + PricingTierUnknown, + } +} + // Type always returns PricingTier to satisfy [pflag.Value] interface func (f *PricingTier) Type() string { return "PricingTier" @@ -904,6 +961,16 @@ func (f *PrivateAccessLevel) Set(v string) error { } } +// Values returns all possible values of PrivateAccessLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *PrivateAccessLevel) Values() []PrivateAccessLevel { + return []PrivateAccessLevel{ + PrivateAccessLevelAccount, + PrivateAccessLevelEndpoint, + } +} + // Type always returns PrivateAccessLevel to satisfy [pflag.Value] interface func (f *PrivateAccessLevel) Type() string { return "PrivateAccessLevel" @@ -1183,6 +1250,18 @@ func (f *VpcStatus) Set(v string) error { } } +// Values returns all possible values of VpcStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *VpcStatus) Values() []VpcStatus { + return []VpcStatus{ + VpcStatusBroken, + VpcStatusUnattached, + VpcStatusValid, + VpcStatusWarned, + } +} + // Type always returns VpcStatus to satisfy [pflag.Value] interface func (f *VpcStatus) Type() string { return "VpcStatus" @@ -1211,6 +1290,16 @@ func (f *WarningType) Set(v string) error { } } +// Values returns all possible values of WarningType. +// +// There is no guarantee on the order of the values in the slice. +func (f *WarningType) Values() []WarningType { + return []WarningType{ + WarningTypeSecurityGroup, + WarningTypeSubnet, + } +} + // Type always returns WarningType to satisfy [pflag.Value] interface func (f *WarningType) Type() string { return "WarningType" @@ -1359,6 +1448,20 @@ func (f *WorkspaceStatus) Set(v string) error { } } +// Values returns all possible values of WorkspaceStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *WorkspaceStatus) Values() []WorkspaceStatus { + return []WorkspaceStatus{ + WorkspaceStatusBanned, + WorkspaceStatusCancelling, + WorkspaceStatusFailed, + WorkspaceStatusNotProvisioned, + WorkspaceStatusProvisioning, + WorkspaceStatusRunning, + } +} + // Type always returns WorkspaceStatus to satisfy [pflag.Value] interface func (f *WorkspaceStatus) Type() string { return "WorkspaceStatus" diff --git a/service/serving/interface.go b/service/serving/interface.go index 408c33f19..beace9417 100755 --- a/service/serving/interface.go +++ b/service/serving/interface.go @@ -19,6 +19,8 @@ import ( // configure traffic settings to define how requests should be routed to your // served entities behind an endpoint. Additionally, you can configure the scale // of resources that should be applied to each served entity. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ServingEndpointsService interface { // Get build logs for a served model. @@ -69,8 +71,6 @@ type ServingEndpointsService interface { HttpRequest(ctx context.Context, request ExternalFunctionRequest) (*HttpRequestResponse, error) // Get all serving endpoints. - // - // Use ListAll() to get all ServingEndpoint instances List(ctx context.Context) (*ListEndpointsResponse, error) // Get the latest logs for a served model. @@ -131,6 +131,8 @@ type ServingEndpointsService interface { // Serving endpoints DataPlane provides a set of operations to interact with // data plane endpoints for Serving endpoints service. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ServingEndpointsDataPlaneService interface { // Query a serving endpoint. diff --git a/service/serving/model.go b/service/serving/model.go index 96e125df6..17b71cf52 100755 --- a/service/serving/model.go +++ b/service/serving/model.go @@ -102,6 +102,16 @@ func (f *AiGatewayGuardrailPiiBehaviorBehavior) Set(v string) error { } } +// Values returns all possible values of AiGatewayGuardrailPiiBehaviorBehavior. +// +// There is no guarantee on the order of the values in the slice. +func (f *AiGatewayGuardrailPiiBehaviorBehavior) Values() []AiGatewayGuardrailPiiBehaviorBehavior { + return []AiGatewayGuardrailPiiBehaviorBehavior{ + AiGatewayGuardrailPiiBehaviorBehaviorBlock, + AiGatewayGuardrailPiiBehaviorBehaviorNone, + } +} + // Type always returns AiGatewayGuardrailPiiBehaviorBehavior to satisfy [pflag.Value] interface func (f *AiGatewayGuardrailPiiBehaviorBehavior) Type() string { return "AiGatewayGuardrailPiiBehaviorBehavior" @@ -174,6 +184,16 @@ func (f *AiGatewayRateLimitKey) Set(v string) error { } } +// Values returns all possible values of AiGatewayRateLimitKey. +// +// There is no guarantee on the order of the values in the slice. +func (f *AiGatewayRateLimitKey) Values() []AiGatewayRateLimitKey { + return []AiGatewayRateLimitKey{ + AiGatewayRateLimitKeyEndpoint, + AiGatewayRateLimitKeyUser, + } +} + // Type always returns AiGatewayRateLimitKey to satisfy [pflag.Value] interface func (f *AiGatewayRateLimitKey) Type() string { return "AiGatewayRateLimitKey" @@ -199,6 +219,15 @@ func (f *AiGatewayRateLimitRenewalPeriod) Set(v string) error { } } +// Values returns all possible values of AiGatewayRateLimitRenewalPeriod. +// +// There is no guarantee on the order of the values in the slice. +func (f *AiGatewayRateLimitRenewalPeriod) Values() []AiGatewayRateLimitRenewalPeriod { + return []AiGatewayRateLimitRenewalPeriod{ + AiGatewayRateLimitRenewalPeriodMinute, + } +} + // Type always returns AiGatewayRateLimitRenewalPeriod to satisfy [pflag.Value] interface func (f *AiGatewayRateLimitRenewalPeriod) Type() string { return "AiGatewayRateLimitRenewalPeriod" @@ -295,6 +324,18 @@ func (f *AmazonBedrockConfigBedrockProvider) Set(v string) error { } } +// Values returns all possible values of AmazonBedrockConfigBedrockProvider. +// +// There is no guarantee on the order of the values in the slice. +func (f *AmazonBedrockConfigBedrockProvider) Values() []AmazonBedrockConfigBedrockProvider { + return []AmazonBedrockConfigBedrockProvider{ + AmazonBedrockConfigBedrockProviderAi21labs, + AmazonBedrockConfigBedrockProviderAmazon, + AmazonBedrockConfigBedrockProviderAnthropic, + AmazonBedrockConfigBedrockProviderCohere, + } +} + // Type always returns AmazonBedrockConfigBedrockProvider to satisfy [pflag.Value] interface func (f *AmazonBedrockConfigBedrockProvider) Type() string { return "AmazonBedrockConfigBedrockProvider" @@ -474,6 +515,17 @@ func (f *ChatMessageRole) Set(v string) error { } } +// Values returns all possible values of ChatMessageRole. +// +// There is no guarantee on the order of the values in the slice. +func (f *ChatMessageRole) Values() []ChatMessageRole { + return []ChatMessageRole{ + ChatMessageRoleAssistant, + ChatMessageRoleSystem, + ChatMessageRoleUser, + } +} + // Type always returns ChatMessageRole to satisfy [pflag.Value] interface func (f *ChatMessageRole) Type() string { return "ChatMessageRole" @@ -679,6 +731,15 @@ func (f *EmbeddingsV1ResponseEmbeddingElementObject) Set(v string) error { } } +// Values returns all possible values of EmbeddingsV1ResponseEmbeddingElementObject. +// +// There is no guarantee on the order of the values in the slice. +func (f *EmbeddingsV1ResponseEmbeddingElementObject) Values() []EmbeddingsV1ResponseEmbeddingElementObject { + return []EmbeddingsV1ResponseEmbeddingElementObject{ + EmbeddingsV1ResponseEmbeddingElementObjectEmbedding, + } +} + // Type always returns EmbeddingsV1ResponseEmbeddingElementObject to satisfy [pflag.Value] interface func (f *EmbeddingsV1ResponseEmbeddingElementObject) Type() string { return "EmbeddingsV1ResponseEmbeddingElementObject" @@ -810,6 +871,18 @@ func (f *EndpointStateConfigUpdate) Set(v string) error { } } +// Values returns all possible values of EndpointStateConfigUpdate. +// +// There is no guarantee on the order of the values in the slice. +func (f *EndpointStateConfigUpdate) Values() []EndpointStateConfigUpdate { + return []EndpointStateConfigUpdate{ + EndpointStateConfigUpdateInProgress, + EndpointStateConfigUpdateNotUpdating, + EndpointStateConfigUpdateUpdateCanceled, + EndpointStateConfigUpdateUpdateFailed, + } +} + // Type always returns EndpointStateConfigUpdate to satisfy [pflag.Value] interface func (f *EndpointStateConfigUpdate) Type() string { return "EndpointStateConfigUpdate" @@ -837,6 +910,16 @@ func (f *EndpointStateReady) Set(v string) error { } } +// Values returns all possible values of EndpointStateReady. +// +// There is no guarantee on the order of the values in the slice. +func (f *EndpointStateReady) Values() []EndpointStateReady { + return []EndpointStateReady{ + EndpointStateReadyNotReady, + EndpointStateReadyReady, + } +} + // Type always returns EndpointStateReady to satisfy [pflag.Value] interface func (f *EndpointStateReady) Type() string { return "EndpointStateReady" @@ -930,6 +1013,19 @@ func (f *ExternalFunctionRequestHttpMethod) Set(v string) error { } } +// Values returns all possible values of ExternalFunctionRequestHttpMethod. +// +// There is no guarantee on the order of the values in the slice. +func (f *ExternalFunctionRequestHttpMethod) Values() []ExternalFunctionRequestHttpMethod { + return []ExternalFunctionRequestHttpMethod{ + ExternalFunctionRequestHttpMethodDelete, + ExternalFunctionRequestHttpMethodGet, + ExternalFunctionRequestHttpMethodPatch, + ExternalFunctionRequestHttpMethodPost, + ExternalFunctionRequestHttpMethodPut, + } +} + // Type always returns ExternalFunctionRequestHttpMethod to satisfy [pflag.Value] interface func (f *ExternalFunctionRequestHttpMethod) Type() string { return "ExternalFunctionRequestHttpMethod" @@ -1003,6 +1099,23 @@ func (f *ExternalModelProvider) Set(v string) error { } } +// Values returns all possible values of ExternalModelProvider. +// +// There is no guarantee on the order of the values in the slice. +func (f *ExternalModelProvider) Values() []ExternalModelProvider { + return []ExternalModelProvider{ + ExternalModelProviderAi21labs, + ExternalModelProviderAmazonBedrock, + ExternalModelProviderAnthropic, + ExternalModelProviderCohere, + ExternalModelProviderCustom, + ExternalModelProviderDatabricksModelServing, + ExternalModelProviderGoogleCloudVertexAi, + ExternalModelProviderOpenai, + ExternalModelProviderPalm, + } +} + // Type always returns ExternalModelProvider to satisfy [pflag.Value] interface func (f *ExternalModelProvider) Type() string { return "ExternalModelProvider" @@ -1499,6 +1612,17 @@ func (f *QueryEndpointResponseObject) Set(v string) error { } } +// Values returns all possible values of QueryEndpointResponseObject. +// +// There is no guarantee on the order of the values in the slice. +func (f *QueryEndpointResponseObject) Values() []QueryEndpointResponseObject { + return []QueryEndpointResponseObject{ + QueryEndpointResponseObjectChatCompletion, + QueryEndpointResponseObjectList, + QueryEndpointResponseObjectTextCompletion, + } +} + // Type always returns QueryEndpointResponseObject to satisfy [pflag.Value] interface func (f *QueryEndpointResponseObject) Type() string { return "QueryEndpointResponseObject" @@ -1539,6 +1663,16 @@ func (f *RateLimitKey) Set(v string) error { } } +// Values returns all possible values of RateLimitKey. +// +// There is no guarantee on the order of the values in the slice. +func (f *RateLimitKey) Values() []RateLimitKey { + return []RateLimitKey{ + RateLimitKeyEndpoint, + RateLimitKeyUser, + } +} + // Type always returns RateLimitKey to satisfy [pflag.Value] interface func (f *RateLimitKey) Type() string { return "RateLimitKey" @@ -1564,6 +1698,15 @@ func (f *RateLimitRenewalPeriod) Set(v string) error { } } +// Values returns all possible values of RateLimitRenewalPeriod. +// +// There is no guarantee on the order of the values in the slice. +func (f *RateLimitRenewalPeriod) Values() []RateLimitRenewalPeriod { + return []RateLimitRenewalPeriod{ + RateLimitRenewalPeriodMinute, + } +} + // Type always returns RateLimitRenewalPeriod to satisfy [pflag.Value] interface func (f *RateLimitRenewalPeriod) Type() string { return "RateLimitRenewalPeriod" @@ -1841,6 +1984,19 @@ func (f *ServedModelInputWorkloadType) Set(v string) error { } } +// Values returns all possible values of ServedModelInputWorkloadType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ServedModelInputWorkloadType) Values() []ServedModelInputWorkloadType { + return []ServedModelInputWorkloadType{ + ServedModelInputWorkloadTypeCpu, + ServedModelInputWorkloadTypeGpuLarge, + ServedModelInputWorkloadTypeGpuMedium, + ServedModelInputWorkloadTypeGpuSmall, + ServedModelInputWorkloadTypeMultigpuMedium, + } +} + // Type always returns ServedModelInputWorkloadType to satisfy [pflag.Value] interface func (f *ServedModelInputWorkloadType) Type() string { return "ServedModelInputWorkloadType" @@ -1969,6 +2125,19 @@ func (f *ServedModelStateDeployment) Set(v string) error { } } +// Values returns all possible values of ServedModelStateDeployment. +// +// There is no guarantee on the order of the values in the slice. +func (f *ServedModelStateDeployment) Values() []ServedModelStateDeployment { + return []ServedModelStateDeployment{ + ServedModelStateDeploymentAborted, + ServedModelStateDeploymentCreating, + ServedModelStateDeploymentFailed, + ServedModelStateDeploymentReady, + ServedModelStateDeploymentRecovering, + } +} + // Type always returns ServedModelStateDeployment to satisfy [pflag.Value] interface func (f *ServedModelStateDeployment) Type() string { return "ServedModelStateDeployment" @@ -2135,6 +2304,17 @@ func (f *ServingEndpointDetailedPermissionLevel) Set(v string) error { } } +// Values returns all possible values of ServingEndpointDetailedPermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *ServingEndpointDetailedPermissionLevel) Values() []ServingEndpointDetailedPermissionLevel { + return []ServingEndpointDetailedPermissionLevel{ + ServingEndpointDetailedPermissionLevelCanManage, + ServingEndpointDetailedPermissionLevelCanQuery, + ServingEndpointDetailedPermissionLevelCanView, + } +} + // Type always returns ServingEndpointDetailedPermissionLevel to satisfy [pflag.Value] interface func (f *ServingEndpointDetailedPermissionLevel) Type() string { return "ServingEndpointDetailedPermissionLevel" @@ -2183,6 +2363,17 @@ func (f *ServingEndpointPermissionLevel) Set(v string) error { } } +// Values returns all possible values of ServingEndpointPermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *ServingEndpointPermissionLevel) Values() []ServingEndpointPermissionLevel { + return []ServingEndpointPermissionLevel{ + ServingEndpointPermissionLevelCanManage, + ServingEndpointPermissionLevelCanQuery, + ServingEndpointPermissionLevelCanView, + } +} + // Type always returns ServingEndpointPermissionLevel to satisfy [pflag.Value] interface func (f *ServingEndpointPermissionLevel) Type() string { return "ServingEndpointPermissionLevel" @@ -2258,6 +2449,19 @@ func (f *ServingModelWorkloadType) Set(v string) error { } } +// Values returns all possible values of ServingModelWorkloadType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ServingModelWorkloadType) Values() []ServingModelWorkloadType { + return []ServingModelWorkloadType{ + ServingModelWorkloadTypeCpu, + ServingModelWorkloadTypeGpuLarge, + ServingModelWorkloadTypeGpuMedium, + ServingModelWorkloadTypeGpuSmall, + ServingModelWorkloadTypeMultigpuMedium, + } +} + // Type always returns ServingModelWorkloadType to satisfy [pflag.Value] interface func (f *ServingModelWorkloadType) Type() string { return "ServingModelWorkloadType" diff --git a/service/settings/interface.go b/service/settings/interface.go index 4ca2dd1ab..32430b607 100755 --- a/service/settings/interface.go +++ b/service/settings/interface.go @@ -28,6 +28,8 @@ import ( // // After changes to the account-level IP access lists, it can take a few minutes // for changes to take effect. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AccountIpAccessListsService interface { // Create access list. @@ -63,8 +65,6 @@ type AccountIpAccessListsService interface { // Get access lists. // // Gets all IP access lists for the specified account. - // - // Use ListAll() to get all IpAccessListInfo instances List(ctx context.Context) (*GetIpAccessListsResponse, error) // Replace access list. @@ -104,12 +104,16 @@ type AccountIpAccessListsService interface { } // Accounts Settings API allows users to manage settings at the account level. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AccountSettingsService interface { } // Controls whether AI/BI published dashboard embedding is enabled, // conditionally enabled, or disabled at the workspace level. By default, this // setting is conditionally enabled (ALLOW_APPROVED_DOMAINS). +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AibiDashboardEmbeddingAccessPolicyService interface { // Delete the AI/BI dashboard embedding access policy. @@ -135,6 +139,8 @@ type AibiDashboardEmbeddingAccessPolicyService interface { // Controls the list of domains approved to host the embedded AI/BI dashboards. // The approved domains list can't be mutated when the current access policy is // not set to ALLOW_APPROVED_DOMAINS. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AibiDashboardEmbeddingApprovedDomainsService interface { // Delete AI/BI dashboard embedding approved domains. @@ -158,6 +164,8 @@ type AibiDashboardEmbeddingApprovedDomainsService interface { // Controls whether automatic cluster update is enabled for the current // workspace. By default, it is turned off. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AutomaticClusterUpdateService interface { // Get the automatic cluster update setting. @@ -181,6 +189,8 @@ type AutomaticClusterUpdateService interface { // off. // // This settings can NOT be disabled once it is enabled. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ComplianceSecurityProfileService interface { // Get the compliance security profile setting. @@ -201,6 +211,8 @@ type ComplianceSecurityProfileService interface { // Credentials manager interacts with with Identity Providers to to perform // token exchanges using stored credentials and refresh tokens. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type CredentialsManagerService interface { // Exchange token. @@ -217,6 +229,8 @@ type CredentialsManagerService interface { // // This settings can be disabled so that new workspaces do not have compliance // security profile enabled by default. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type CspEnablementAccountService interface { // Get the compliance security profile setting for new workspaces. @@ -243,6 +257,8 @@ type CspEnablementAccountService interface { // This setting requires a restart of clusters and SQL warehouses to take // effect. Additionally, the default namespace only applies when using Unity // Catalog-enabled compute. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type DefaultNamespaceService interface { // Delete the default namespace setting. @@ -279,6 +295,8 @@ type DefaultNamespaceService interface { // can still access a Hive Metastore through Hive Metastore federation. 2. // Disables fallback mode on external location access from the workspace. 3. // Disables Databricks Runtime versions prior to 13.3LTS. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type DisableLegacyAccessService interface { // Delete Legacy Access Disablement Status. @@ -306,6 +324,8 @@ type DisableLegacyAccessService interface { // restrictions are imposed on Databricks Runtime versions. This setting can // take up to 20 minutes to take effect and requires a manual restart of // all-purpose compute clusters and SQL warehouses. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type DisableLegacyDbfsService interface { // Delete the disable legacy DBFS setting. @@ -331,6 +351,8 @@ type DisableLegacyDbfsService interface { // Hive Metastore will not be provisioned. 3. Disables the use of // ‘No-isolation clusters’. 4. Disables Databricks Runtime versions prior to // 13.3LTS. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type DisableLegacyFeaturesService interface { // Delete the disable legacy features setting. @@ -351,6 +373,8 @@ type DisableLegacyFeaturesService interface { // Controls whether users can export notebooks and files from the Workspace UI. // By default, this setting is enabled. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type EnableExportNotebookService interface { // Get the Notebook and File exporting setting. @@ -369,6 +393,8 @@ type EnableExportNotebookService interface { // Controls the enforcement of IP access lists for accessing the account // console. Allowing you to enable or disable restricted access based on IP // addresses. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type EnableIpAccessListsService interface { // Delete the account IP access toggle setting. @@ -389,6 +415,8 @@ type EnableIpAccessListsService interface { // Controls whether users can copy tabular data to the clipboard via the UI. By // default, this setting is enabled. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type EnableNotebookTableClipboardService interface { // Get the Results Table Clipboard features setting. @@ -406,6 +434,8 @@ type EnableNotebookTableClipboardService interface { // Controls whether users can download notebook results. By default, this // setting is enabled. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type EnableResultsDownloadingService interface { // Get the Notebook results download setting. @@ -428,6 +458,8 @@ type EnableResultsDownloadingService interface { // // If the compliance security profile is disabled, you can enable or disable // this setting and it is not permanent. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type EnhancedSecurityMonitoringService interface { // Get the enhanced security monitoring setting. @@ -451,6 +483,8 @@ type EnhancedSecurityMonitoringService interface { // account-level setting is disabled for new workspaces. After workspace // creation, account admins can enable enhanced security monitoring individually // for each workspace. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type EsmEnablementAccountService interface { // Get the enhanced security monitoring setting for new workspaces. @@ -486,6 +520,8 @@ type EsmEnablementAccountService interface { // // After changes to the IP access list feature, it can take a few minutes for // changes to take effect. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type IpAccessListsService interface { // Create access list. @@ -523,8 +559,6 @@ type IpAccessListsService interface { // Get access lists. // // Gets all IP access lists for the specified workspace. - // - // Use ListAll() to get all IpAccessListInfo instances List(ctx context.Context) (*ListIpAccessListResponse, error) // Replace access list. @@ -569,6 +603,8 @@ type IpAccessListsService interface { // Determines if partner powered models are enabled or not for a specific // account +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type LlmProxyPartnerPoweredAccountService interface { // Get the enable partner powered AI features account setting. @@ -584,6 +620,8 @@ type LlmProxyPartnerPoweredAccountService interface { // Determines if the account-level partner-powered setting value is enforced // upon the workspace-level partner-powered setting +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type LlmProxyPartnerPoweredEnforceService interface { // Get the enforcement status of partner powered AI features account @@ -603,6 +641,8 @@ type LlmProxyPartnerPoweredEnforceService interface { // Determines if partner powered models are enabled or not for a specific // workspace +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type LlmProxyPartnerPoweredWorkspaceService interface { // Delete the enable partner powered AI features workspace setting. @@ -630,6 +670,8 @@ type LlmProxyPartnerPoweredWorkspaceService interface { // compute resources to your Azure resources using Azure Private Link. See // [configure serverless secure connectivity]. // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [configure serverless secure connectivity]: https://learn.microsoft.com/azure/databricks/security/network/serverless-network-security type NetworkConnectivityService interface { @@ -692,15 +734,11 @@ type NetworkConnectivityService interface { // List network connectivity configurations. // // Gets an array of network connectivity configurations. - // - // Use ListNetworkConnectivityConfigurationsAll() to get all NetworkConnectivityConfiguration instances, which will iterate over every result page. ListNetworkConnectivityConfigurations(ctx context.Context, request ListNetworkConnectivityConfigurationsRequest) (*ListNetworkConnectivityConfigurationsResponse, error) // List private endpoint rules. // // Gets an array of private endpoint rules. - // - // Use ListPrivateEndpointRulesAll() to get all NccAzurePrivateEndpointRule instances, which will iterate over every result page. ListPrivateEndpointRules(ctx context.Context, request ListPrivateEndpointRulesRequest) (*ListNccAzurePrivateEndpointRulesResponse, error) // Update a private endpoint rule. @@ -717,6 +755,8 @@ type NetworkConnectivityService interface { // policy assignment, and is automatically associated with each newly created // workspace. 'default-policy' is reserved and cannot be deleted, but it can be // updated to customize the default network access rules for your account. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type NetworkPoliciesService interface { // Create a network policy. @@ -738,8 +778,6 @@ type NetworkPoliciesService interface { // List network policies. // // Gets an array of network policies. - // - // Use ListNetworkPoliciesRpcAll() to get all AccountNetworkPolicy instances, which will iterate over every result page. ListNetworkPoliciesRpc(ctx context.Context, request ListNetworkPoliciesRequest) (*ListNetworkPoliciesResponse, error) // Update a network policy. @@ -754,6 +792,8 @@ type NetworkPoliciesService interface { // send notifications for query alerts and jobs to destinations outside of // Databricks. Only workspace admins can create, update, and delete notification // destinations. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type NotificationDestinationsService interface { // Create a notification destination. @@ -774,8 +814,6 @@ type NotificationDestinationsService interface { // List notification destinations. // // Lists notification destinations. - // - // Use ListAll() to get all ListNotificationDestinationsResult instances, which will iterate over every result page. List(ctx context.Context, request ListNotificationDestinationsRequest) (*ListNotificationDestinationsResponse, error) // Update a notification destination. @@ -794,6 +832,8 @@ type NotificationDestinationsService interface { // has a default value, this setting is present on all accounts even though it's // never set on a given account. Deletion reverts the value of the setting back // to the default value. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type PersonalComputeService interface { // Delete Personal Compute setting. @@ -824,6 +864,8 @@ type PersonalComputeService interface { // User role on. They can also only change a job owner to themselves. And they // can change the job run_as setting to themselves or to a service principal on // which they have the Service Principal User role. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type RestrictWorkspaceAdminsService interface { // Delete the restrict workspace admins setting. @@ -854,12 +896,16 @@ type RestrictWorkspaceAdminsService interface { // Workspace Settings API allows users to manage settings at the workspace // level. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type SettingsService interface { } // Enables administrators to get all tokens and delete tokens for other users. // Admins can either get every token, get a specific token by ID, or get all // tokens for a particular user. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type TokenManagementService interface { // Create on-behalf token. @@ -891,8 +937,6 @@ type TokenManagementService interface { // List all tokens. // // Lists all tokens associated with the specified workspace or user. - // - // Use ListAll() to get all TokenInfo instances List(ctx context.Context, request ListTokenManagementRequest) (*ListTokensResponse, error) // Set token permissions. @@ -911,6 +955,8 @@ type TokenManagementService interface { // The Token API allows you to create, list, and revoke tokens that can be used // to authenticate and access Databricks REST APIs. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type TokensService interface { // Create a user token. @@ -932,12 +978,12 @@ type TokensService interface { // List tokens. // // Lists all the valid tokens for a user-workspace pair. - // - // Use ListAll() to get all PublicTokenInfo instances List(ctx context.Context) (*ListPublicTokensResponse, error) } // This API allows updating known workspace settings for advanced users. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type WorkspaceConfService interface { // Check configuration status. @@ -959,6 +1005,8 @@ type WorkspaceConfService interface { // network policy. You cannot create or delete a workspace's network // configuration, only update it to associate the workspace with a different // policy. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type WorkspaceNetworkConfigurationService interface { // Get workspace network configuration. diff --git a/service/settings/model.go b/service/settings/model.go index 2a71a9cb0..3731485a8 100755 --- a/service/settings/model.go +++ b/service/settings/model.go @@ -83,6 +83,17 @@ func (f *AibiDashboardEmbeddingAccessPolicyAccessPolicyType) Set(v string) error } } +// Values returns all possible values of AibiDashboardEmbeddingAccessPolicyAccessPolicyType. +// +// There is no guarantee on the order of the values in the slice. +func (f *AibiDashboardEmbeddingAccessPolicyAccessPolicyType) Values() []AibiDashboardEmbeddingAccessPolicyAccessPolicyType { + return []AibiDashboardEmbeddingAccessPolicyAccessPolicyType{ + AibiDashboardEmbeddingAccessPolicyAccessPolicyTypeAllowAllDomains, + AibiDashboardEmbeddingAccessPolicyAccessPolicyTypeAllowApprovedDomains, + AibiDashboardEmbeddingAccessPolicyAccessPolicyTypeDenyAllDomains, + } +} + // Type always returns AibiDashboardEmbeddingAccessPolicyAccessPolicyType to satisfy [pflag.Value] interface func (f *AibiDashboardEmbeddingAccessPolicyAccessPolicyType) Type() string { return "AibiDashboardEmbeddingAccessPolicyAccessPolicyType" @@ -279,6 +290,21 @@ func (f *ClusterAutoRestartMessageMaintenanceWindowDayOfWeek) Set(v string) erro } } +// Values returns all possible values of ClusterAutoRestartMessageMaintenanceWindowDayOfWeek. +// +// There is no guarantee on the order of the values in the slice. +func (f *ClusterAutoRestartMessageMaintenanceWindowDayOfWeek) Values() []ClusterAutoRestartMessageMaintenanceWindowDayOfWeek { + return []ClusterAutoRestartMessageMaintenanceWindowDayOfWeek{ + ClusterAutoRestartMessageMaintenanceWindowDayOfWeekFriday, + ClusterAutoRestartMessageMaintenanceWindowDayOfWeekMonday, + ClusterAutoRestartMessageMaintenanceWindowDayOfWeekSaturday, + ClusterAutoRestartMessageMaintenanceWindowDayOfWeekSunday, + ClusterAutoRestartMessageMaintenanceWindowDayOfWeekThursday, + ClusterAutoRestartMessageMaintenanceWindowDayOfWeekTuesday, + ClusterAutoRestartMessageMaintenanceWindowDayOfWeekWednesday, + } +} + // Type always returns ClusterAutoRestartMessageMaintenanceWindowDayOfWeek to satisfy [pflag.Value] interface func (f *ClusterAutoRestartMessageMaintenanceWindowDayOfWeek) Type() string { return "ClusterAutoRestartMessageMaintenanceWindowDayOfWeek" @@ -324,6 +350,21 @@ func (f *ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency) Set(v strin } } +// Values returns all possible values of ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency. +// +// There is no guarantee on the order of the values in the slice. +func (f *ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency) Values() []ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency { + return []ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency{ + ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequencyEveryWeek, + ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequencyFirstAndThirdOfMonth, + ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequencyFirstOfMonth, + ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequencyFourthOfMonth, + ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequencySecondAndFourthOfMonth, + ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequencySecondOfMonth, + ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequencyThirdOfMonth, + } +} + // Type always returns ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency to satisfy [pflag.Value] interface func (f *ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency) Type() string { return "ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency" @@ -437,6 +478,27 @@ func (f *ComplianceStandard) Set(v string) error { } } +// Values returns all possible values of ComplianceStandard. +// +// There is no guarantee on the order of the values in the slice. +func (f *ComplianceStandard) Values() []ComplianceStandard { + return []ComplianceStandard{ + ComplianceStandardCanadaProtectedB, + ComplianceStandardCyberEssentialPlus, + ComplianceStandardFedrampHigh, + ComplianceStandardFedrampIl5, + ComplianceStandardFedrampModerate, + ComplianceStandardHipaa, + ComplianceStandardHitrust, + ComplianceStandardIrapProtected, + ComplianceStandardIsmap, + ComplianceStandardItarEar, + ComplianceStandardKFsi, + ComplianceStandardNone, + ComplianceStandardPciDss, + } +} + // Type always returns ComplianceStandard to satisfy [pflag.Value] interface func (f *ComplianceStandard) Type() string { return "ComplianceStandard" @@ -1133,6 +1195,19 @@ func (f *DestinationType) Set(v string) error { } } +// Values returns all possible values of DestinationType. +// +// There is no guarantee on the order of the values in the slice. +func (f *DestinationType) Values() []DestinationType { + return []DestinationType{ + DestinationTypeEmail, + DestinationTypeMicrosoftTeams, + DestinationTypePagerduty, + DestinationTypeSlack, + DestinationTypeWebhook, + } +} + // Type always returns DestinationType to satisfy [pflag.Value] interface func (f *DestinationType) Type() string { return "DestinationType" @@ -1297,6 +1372,15 @@ func (f *EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDesti } } +// Values returns all possible values of EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationFilteringProtocol. +// +// There is no guarantee on the order of the values in the slice. +func (f *EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationFilteringProtocol) Values() []EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationFilteringProtocol { + return []EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationFilteringProtocol{ + EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationFilteringProtocolTcp, + } +} + // Type always returns EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationFilteringProtocol to satisfy [pflag.Value] interface func (f *EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationFilteringProtocol) Type() string { return "EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationFilteringProtocol" @@ -1322,6 +1406,15 @@ func (f *EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDesti } } +// Values returns all possible values of EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationType. +// +// There is no guarantee on the order of the values in the slice. +func (f *EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationType) Values() []EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationType { + return []EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationType{ + EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationTypeFqdn, + } +} + // Type always returns EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationType to satisfy [pflag.Value] interface func (f *EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationType) Type() string { return "EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationType" @@ -1355,6 +1448,16 @@ func (f *EgressNetworkPolicyInternetAccessPolicyLogOnlyModeLogOnlyModeType) Set( } } +// Values returns all possible values of EgressNetworkPolicyInternetAccessPolicyLogOnlyModeLogOnlyModeType. +// +// There is no guarantee on the order of the values in the slice. +func (f *EgressNetworkPolicyInternetAccessPolicyLogOnlyModeLogOnlyModeType) Values() []EgressNetworkPolicyInternetAccessPolicyLogOnlyModeLogOnlyModeType { + return []EgressNetworkPolicyInternetAccessPolicyLogOnlyModeLogOnlyModeType{ + EgressNetworkPolicyInternetAccessPolicyLogOnlyModeLogOnlyModeTypeAllServices, + EgressNetworkPolicyInternetAccessPolicyLogOnlyModeLogOnlyModeTypeSelectedServices, + } +} + // Type always returns EgressNetworkPolicyInternetAccessPolicyLogOnlyModeLogOnlyModeType to satisfy [pflag.Value] interface func (f *EgressNetworkPolicyInternetAccessPolicyLogOnlyModeLogOnlyModeType) Type() string { return "EgressNetworkPolicyInternetAccessPolicyLogOnlyModeLogOnlyModeType" @@ -1383,6 +1486,16 @@ func (f *EgressNetworkPolicyInternetAccessPolicyLogOnlyModeWorkloadType) Set(v s } } +// Values returns all possible values of EgressNetworkPolicyInternetAccessPolicyLogOnlyModeWorkloadType. +// +// There is no guarantee on the order of the values in the slice. +func (f *EgressNetworkPolicyInternetAccessPolicyLogOnlyModeWorkloadType) Values() []EgressNetworkPolicyInternetAccessPolicyLogOnlyModeWorkloadType { + return []EgressNetworkPolicyInternetAccessPolicyLogOnlyModeWorkloadType{ + EgressNetworkPolicyInternetAccessPolicyLogOnlyModeWorkloadTypeDbsql, + EgressNetworkPolicyInternetAccessPolicyLogOnlyModeWorkloadTypeMlServing, + } +} + // Type always returns EgressNetworkPolicyInternetAccessPolicyLogOnlyModeWorkloadType to satisfy [pflag.Value] interface func (f *EgressNetworkPolicyInternetAccessPolicyLogOnlyModeWorkloadType) Type() string { return "EgressNetworkPolicyInternetAccessPolicyLogOnlyModeWorkloadType" @@ -1418,6 +1531,17 @@ func (f *EgressNetworkPolicyInternetAccessPolicyRestrictionMode) Set(v string) e } } +// Values returns all possible values of EgressNetworkPolicyInternetAccessPolicyRestrictionMode. +// +// There is no guarantee on the order of the values in the slice. +func (f *EgressNetworkPolicyInternetAccessPolicyRestrictionMode) Values() []EgressNetworkPolicyInternetAccessPolicyRestrictionMode { + return []EgressNetworkPolicyInternetAccessPolicyRestrictionMode{ + EgressNetworkPolicyInternetAccessPolicyRestrictionModeFullAccess, + EgressNetworkPolicyInternetAccessPolicyRestrictionModePrivateAccessOnly, + EgressNetworkPolicyInternetAccessPolicyRestrictionModeRestrictedAccess, + } +} + // Type always returns EgressNetworkPolicyInternetAccessPolicyRestrictionMode to satisfy [pflag.Value] interface func (f *EgressNetworkPolicyInternetAccessPolicyRestrictionMode) Type() string { return "EgressNetworkPolicyInternetAccessPolicyRestrictionMode" @@ -1478,6 +1602,18 @@ func (f *EgressNetworkPolicyInternetAccessPolicyStorageDestinationStorageDestina } } +// Values returns all possible values of EgressNetworkPolicyInternetAccessPolicyStorageDestinationStorageDestinationType. +// +// There is no guarantee on the order of the values in the slice. +func (f *EgressNetworkPolicyInternetAccessPolicyStorageDestinationStorageDestinationType) Values() []EgressNetworkPolicyInternetAccessPolicyStorageDestinationStorageDestinationType { + return []EgressNetworkPolicyInternetAccessPolicyStorageDestinationStorageDestinationType{ + EgressNetworkPolicyInternetAccessPolicyStorageDestinationStorageDestinationTypeAwsS3, + EgressNetworkPolicyInternetAccessPolicyStorageDestinationStorageDestinationTypeAzureStorage, + EgressNetworkPolicyInternetAccessPolicyStorageDestinationStorageDestinationTypeCloudflareR2, + EgressNetworkPolicyInternetAccessPolicyStorageDestinationStorageDestinationTypeGoogleCloudStorage, + } +} + // Type always returns EgressNetworkPolicyInternetAccessPolicyStorageDestinationStorageDestinationType to satisfy [pflag.Value] interface func (f *EgressNetworkPolicyInternetAccessPolicyStorageDestinationStorageDestinationType) Type() string { return "EgressNetworkPolicyInternetAccessPolicyStorageDestinationStorageDestinationType" @@ -1539,6 +1675,15 @@ func (f *EgressNetworkPolicyNetworkAccessPolicyInternetDestinationInternetDestin } } +// Values returns all possible values of EgressNetworkPolicyNetworkAccessPolicyInternetDestinationInternetDestinationType. +// +// There is no guarantee on the order of the values in the slice. +func (f *EgressNetworkPolicyNetworkAccessPolicyInternetDestinationInternetDestinationType) Values() []EgressNetworkPolicyNetworkAccessPolicyInternetDestinationInternetDestinationType { + return []EgressNetworkPolicyNetworkAccessPolicyInternetDestinationInternetDestinationType{ + EgressNetworkPolicyNetworkAccessPolicyInternetDestinationInternetDestinationTypeDnsName, + } +} + // Type always returns EgressNetworkPolicyNetworkAccessPolicyInternetDestinationInternetDestinationType to satisfy [pflag.Value] interface func (f *EgressNetworkPolicyNetworkAccessPolicyInternetDestinationInternetDestinationType) Type() string { return "EgressNetworkPolicyNetworkAccessPolicyInternetDestinationInternetDestinationType" @@ -1578,6 +1723,16 @@ func (f *EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementDryRunModeProduc } } +// Values returns all possible values of EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementDryRunModeProductFilter. +// +// There is no guarantee on the order of the values in the slice. +func (f *EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementDryRunModeProductFilter) Values() []EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementDryRunModeProductFilter { + return []EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementDryRunModeProductFilter{ + EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementDryRunModeProductFilterDbsql, + EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementDryRunModeProductFilterMlServing, + } +} + // Type always returns EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementDryRunModeProductFilter to satisfy [pflag.Value] interface func (f *EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementDryRunModeProductFilter) Type() string { return "EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementDryRunModeProductFilter" @@ -1605,6 +1760,16 @@ func (f *EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementEnforcementMode) } } +// Values returns all possible values of EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementEnforcementMode. +// +// There is no guarantee on the order of the values in the slice. +func (f *EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementEnforcementMode) Values() []EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementEnforcementMode { + return []EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementEnforcementMode{ + EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementEnforcementModeDryRun, + EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementEnforcementModeEnforced, + } +} + // Type always returns EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementEnforcementMode to satisfy [pflag.Value] interface func (f *EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementEnforcementMode) Type() string { return "EgressNetworkPolicyNetworkAccessPolicyPolicyEnforcementEnforcementMode" @@ -1636,6 +1801,16 @@ func (f *EgressNetworkPolicyNetworkAccessPolicyRestrictionMode) Set(v string) er } } +// Values returns all possible values of EgressNetworkPolicyNetworkAccessPolicyRestrictionMode. +// +// There is no guarantee on the order of the values in the slice. +func (f *EgressNetworkPolicyNetworkAccessPolicyRestrictionMode) Values() []EgressNetworkPolicyNetworkAccessPolicyRestrictionMode { + return []EgressNetworkPolicyNetworkAccessPolicyRestrictionMode{ + EgressNetworkPolicyNetworkAccessPolicyRestrictionModeFullAccess, + EgressNetworkPolicyNetworkAccessPolicyRestrictionModeRestrictedAccess, + } +} + // Type always returns EgressNetworkPolicyNetworkAccessPolicyRestrictionMode to satisfy [pflag.Value] interface func (f *EgressNetworkPolicyNetworkAccessPolicyRestrictionMode) Type() string { return "EgressNetworkPolicyNetworkAccessPolicyRestrictionMode" @@ -1689,6 +1864,17 @@ func (f *EgressNetworkPolicyNetworkAccessPolicyStorageDestinationStorageDestinat } } +// Values returns all possible values of EgressNetworkPolicyNetworkAccessPolicyStorageDestinationStorageDestinationType. +// +// There is no guarantee on the order of the values in the slice. +func (f *EgressNetworkPolicyNetworkAccessPolicyStorageDestinationStorageDestinationType) Values() []EgressNetworkPolicyNetworkAccessPolicyStorageDestinationStorageDestinationType { + return []EgressNetworkPolicyNetworkAccessPolicyStorageDestinationStorageDestinationType{ + EgressNetworkPolicyNetworkAccessPolicyStorageDestinationStorageDestinationTypeAwsS3, + EgressNetworkPolicyNetworkAccessPolicyStorageDestinationStorageDestinationTypeAzureStorage, + EgressNetworkPolicyNetworkAccessPolicyStorageDestinationStorageDestinationTypeGoogleCloudStorage, + } +} + // Type always returns EgressNetworkPolicyNetworkAccessPolicyStorageDestinationStorageDestinationType to satisfy [pflag.Value] interface func (f *EgressNetworkPolicyNetworkAccessPolicyStorageDestinationStorageDestinationType) Type() string { return "EgressNetworkPolicyNetworkAccessPolicyStorageDestinationStorageDestinationType" @@ -1718,6 +1904,15 @@ func (f *EgressResourceType) Set(v string) error { } } +// Values returns all possible values of EgressResourceType. +// +// There is no guarantee on the order of the values in the slice. +func (f *EgressResourceType) Values() []EgressResourceType { + return []EgressResourceType{ + EgressResourceTypeAzureBlobStorage, + } +} + // Type always returns EgressResourceType to satisfy [pflag.Value] interface func (f *EgressResourceType) Type() string { return "EgressResourceType" @@ -2659,6 +2854,16 @@ func (f *ListType) Set(v string) error { } } +// Values returns all possible values of ListType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ListType) Values() []ListType { + return []ListType{ + ListTypeAllow, + ListTypeBlock, + } +} + // Type always returns ListType to satisfy [pflag.Value] interface func (f *ListType) Type() string { return "ListType" @@ -2860,6 +3065,20 @@ func (f *NccAzurePrivateEndpointRuleConnectionState) Set(v string) error { } } +// Values returns all possible values of NccAzurePrivateEndpointRuleConnectionState. +// +// There is no guarantee on the order of the values in the slice. +func (f *NccAzurePrivateEndpointRuleConnectionState) Values() []NccAzurePrivateEndpointRuleConnectionState { + return []NccAzurePrivateEndpointRuleConnectionState{ + NccAzurePrivateEndpointRuleConnectionStateDisconnected, + NccAzurePrivateEndpointRuleConnectionStateEstablished, + NccAzurePrivateEndpointRuleConnectionStateExpired, + NccAzurePrivateEndpointRuleConnectionStateInit, + NccAzurePrivateEndpointRuleConnectionStatePending, + NccAzurePrivateEndpointRuleConnectionStateRejected, + } +} + // Type always returns NccAzurePrivateEndpointRuleConnectionState to satisfy [pflag.Value] interface func (f *NccAzurePrivateEndpointRuleConnectionState) Type() string { return "NccAzurePrivateEndpointRuleConnectionState" @@ -3058,6 +3277,16 @@ func (f *PersonalComputeMessageEnum) Set(v string) error { } } +// Values returns all possible values of PersonalComputeMessageEnum. +// +// There is no guarantee on the order of the values in the slice. +func (f *PersonalComputeMessageEnum) Values() []PersonalComputeMessageEnum { + return []PersonalComputeMessageEnum{ + PersonalComputeMessageEnumDelegate, + PersonalComputeMessageEnumOn, + } +} + // Type always returns PersonalComputeMessageEnum to satisfy [pflag.Value] interface func (f *PersonalComputeMessageEnum) Type() string { return "PersonalComputeMessageEnum" @@ -3162,6 +3391,16 @@ func (f *RestrictWorkspaceAdminsMessageStatus) Set(v string) error { } } +// Values returns all possible values of RestrictWorkspaceAdminsMessageStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *RestrictWorkspaceAdminsMessageStatus) Values() []RestrictWorkspaceAdminsMessageStatus { + return []RestrictWorkspaceAdminsMessageStatus{ + RestrictWorkspaceAdminsMessageStatusAllowAll, + RestrictWorkspaceAdminsMessageStatusRestrictTokensAndJobRunAs, + } +} + // Type always returns RestrictWorkspaceAdminsMessageStatus to satisfy [pflag.Value] interface func (f *RestrictWorkspaceAdminsMessageStatus) Type() string { return "RestrictWorkspaceAdminsMessageStatus" @@ -3355,6 +3594,15 @@ func (f *TokenPermissionLevel) Set(v string) error { } } +// Values returns all possible values of TokenPermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *TokenPermissionLevel) Values() []TokenPermissionLevel { + return []TokenPermissionLevel{ + TokenPermissionLevelCanUse, + } +} + // Type always returns TokenPermissionLevel to satisfy [pflag.Value] interface func (f *TokenPermissionLevel) Type() string { return "TokenPermissionLevel" @@ -3428,6 +3676,19 @@ func (f *TokenType) Set(v string) error { } } +// Values returns all possible values of TokenType. +// +// There is no guarantee on the order of the values in the slice. +func (f *TokenType) Values() []TokenType { + return []TokenType{ + TokenTypeArclightAzureExchangeToken, + TokenTypeArclightAzureExchangeTokenWithUserDelegationKey, + TokenTypeArclightMultiTenantAzureExchangeToken, + TokenTypeArclightMultiTenantAzureExchangeTokenWithUserDelegationKey, + TokenTypeAzureActiveDirectoryToken, + } +} + // Type always returns TokenType to satisfy [pflag.Value] interface func (f *TokenType) Type() string { return "TokenType" diff --git a/service/sharing/interface.go b/service/sharing/interface.go index caa6d31ce..4ee1eb01d 100755 --- a/service/sharing/interface.go +++ b/service/sharing/interface.go @@ -9,6 +9,8 @@ import ( // A data provider is an object representing the organization in the real world // who shares the data. A provider contains shares which further contain the // shared data. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ProvidersService interface { // Create an auth provider. @@ -36,8 +38,6 @@ type ProvidersService interface { // either be a metastore admin or the owner of the providers. Providers not // owned by the caller are not included in the response. There is no // guarantee of a specific ordering of the elements in the array. - // - // Use ListAll() to get all ProviderInfo instances, which will iterate over every result page. List(ctx context.Context, request ListProvidersRequest) (*ListProvidersResponse, error) // List assets by provider share. @@ -52,8 +52,6 @@ type ProvidersService interface { // where: // // * the caller is a metastore admin, or * the caller is the owner. - // - // Use ListSharesAll() to get all ProviderShare instances, which will iterate over every result page. ListShares(ctx context.Context, request ListSharesRequest) (*ListProviderSharesResponse, error) // Update a provider. @@ -75,6 +73,8 @@ type ProvidersService interface { // Note that you can download the credential file only once. Recipients should // treat the downloaded credential as a secret and must not share it outside of // their organization. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type RecipientActivationService interface { // Get a share activation URL. @@ -114,6 +114,8 @@ type RecipientActivationService interface { // For more information, see // https://www.databricks.com/blog/announcing-oidc-token-federation-enhanced-delta-sharing-security // and https://docs.databricks.com/en/delta-sharing/create-recipient-oidc-fed +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type RecipientFederationPoliciesService interface { // Create recipient federation policy. @@ -165,8 +167,6 @@ type RecipientFederationPoliciesService interface { // Lists federation policies for an OIDC_FEDERATION recipient for sharing // data from Databricks to non-Databricks recipients. The caller must have // read access to the recipient. - // - // Use ListAll() to get all FederationPolicy instances, which will iterate over every result page. List(ctx context.Context, request ListFederationPoliciesRequest) (*ListFederationPoliciesResponse, error) // Update recipient federation policy. @@ -193,6 +193,8 @@ type RecipientFederationPoliciesService interface { // activation link to download the credential file, and then uses the credential // file to establish a secure connection to receive the shared data. This // sharing mode is called **open sharing**. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type RecipientsService interface { // Create a share recipient. @@ -222,8 +224,6 @@ type RecipientsService interface { // // * the caller is a metastore admin, or * the caller is the owner. There is // no guarantee of a specific ordering of the elements in the array. - // - // Use ListAll() to get all RecipientInfo instances, which will iterate over every result page. List(ctx context.Context, request ListRecipientsRequest) (*ListRecipientsResponse, error) // Rotate a token. @@ -253,6 +253,8 @@ type RecipientsService interface { // within the metastore using :method:shares/update. You can register data // assets under their original name, qualified by their original schema, or // provide alternate exposed names. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type SharesService interface { // Create a share. @@ -279,8 +281,6 @@ type SharesService interface { // Gets an array of data object shares from the metastore. The caller must // be a metastore admin or the owner of the share. There is no guarantee of // a specific ordering of the elements in the array. - // - // Use ListAll() to get all ShareInfo instances, which will iterate over every result page. List(ctx context.Context, request ListSharesRequest) (*ListSharesResponse, error) // Get permissions. diff --git a/service/sharing/model.go b/service/sharing/model.go index d54e5421f..6e807800f 100755 --- a/service/sharing/model.go +++ b/service/sharing/model.go @@ -34,6 +34,17 @@ func (f *AuthenticationType) Set(v string) error { } } +// Values returns all possible values of AuthenticationType. +// +// There is no guarantee on the order of the values in the slice. +func (f *AuthenticationType) Values() []AuthenticationType { + return []AuthenticationType{ + AuthenticationTypeDatabricks, + AuthenticationTypeOauthClientCredentials, + AuthenticationTypeToken, + } +} + // Type always returns AuthenticationType to satisfy [pflag.Value] interface func (f *AuthenticationType) Type() string { return "AuthenticationType" @@ -103,6 +114,36 @@ func (f *ColumnTypeName) Set(v string) error { } } +// Values returns all possible values of ColumnTypeName. +// +// There is no guarantee on the order of the values in the slice. +func (f *ColumnTypeName) Values() []ColumnTypeName { + return []ColumnTypeName{ + ColumnTypeNameArray, + ColumnTypeNameBinary, + ColumnTypeNameBoolean, + ColumnTypeNameByte, + ColumnTypeNameChar, + ColumnTypeNameDate, + ColumnTypeNameDecimal, + ColumnTypeNameDouble, + ColumnTypeNameFloat, + ColumnTypeNameInt, + ColumnTypeNameInterval, + ColumnTypeNameLong, + ColumnTypeNameMap, + ColumnTypeNameNull, + ColumnTypeNameShort, + ColumnTypeNameString, + ColumnTypeNameStruct, + ColumnTypeNameTableType, + ColumnTypeNameTimestamp, + ColumnTypeNameTimestampNtz, + ColumnTypeNameUserDefinedType, + ColumnTypeNameVariant, + } +} + // Type always returns ColumnTypeName to satisfy [pflag.Value] interface func (f *ColumnTypeName) Type() string { return "ColumnTypeName" @@ -414,6 +455,17 @@ func (f *FunctionParameterMode) Set(v string) error { } } +// Values returns all possible values of FunctionParameterMode. +// +// There is no guarantee on the order of the values in the slice. +func (f *FunctionParameterMode) Values() []FunctionParameterMode { + return []FunctionParameterMode{ + FunctionParameterModeIn, + FunctionParameterModeInout, + FunctionParameterModeOut, + } +} + // Type always returns FunctionParameterMode to satisfy [pflag.Value] interface func (f *FunctionParameterMode) Type() string { return "FunctionParameterMode" @@ -441,6 +493,16 @@ func (f *FunctionParameterType) Set(v string) error { } } +// Values returns all possible values of FunctionParameterType. +// +// There is no guarantee on the order of the values in the slice. +func (f *FunctionParameterType) Values() []FunctionParameterType { + return []FunctionParameterType{ + FunctionParameterTypeColumn, + FunctionParameterTypeParam, + } +} + // Type always returns FunctionParameterType to satisfy [pflag.Value] interface func (f *FunctionParameterType) Type() string { return "FunctionParameterType" @@ -885,6 +947,16 @@ func (f *PartitionValueOp) Set(v string) error { } } +// Values returns all possible values of PartitionValueOp. +// +// There is no guarantee on the order of the values in the slice. +func (f *PartitionValueOp) Values() []PartitionValueOp { + return []PartitionValueOp{ + PartitionValueOpEqual, + PartitionValueOpLike, + } +} + // Type always returns PartitionValueOp to satisfy [pflag.Value] interface func (f *PartitionValueOp) Type() string { return "PartitionValueOp" @@ -1017,6 +1089,59 @@ func (f *Privilege) Set(v string) error { } } +// Values returns all possible values of Privilege. +// +// There is no guarantee on the order of the values in the slice. +func (f *Privilege) Values() []Privilege { + return []Privilege{ + PrivilegeAccess, + PrivilegeAllPrivileges, + PrivilegeApplyTag, + PrivilegeCreate, + PrivilegeCreateCatalog, + PrivilegeCreateConnection, + PrivilegeCreateExternalLocation, + PrivilegeCreateExternalTable, + PrivilegeCreateExternalVolume, + PrivilegeCreateForeignCatalog, + PrivilegeCreateForeignSecurable, + PrivilegeCreateFunction, + PrivilegeCreateManagedStorage, + PrivilegeCreateMaterializedView, + PrivilegeCreateModel, + PrivilegeCreateProvider, + PrivilegeCreateRecipient, + PrivilegeCreateSchema, + PrivilegeCreateServiceCredential, + PrivilegeCreateShare, + PrivilegeCreateStorageCredential, + PrivilegeCreateTable, + PrivilegeCreateView, + PrivilegeCreateVolume, + PrivilegeExecute, + PrivilegeManage, + PrivilegeManageAllowlist, + PrivilegeModify, + PrivilegeReadFiles, + PrivilegeReadPrivateFiles, + PrivilegeReadVolume, + PrivilegeRefresh, + PrivilegeSelect, + PrivilegeSetSharePermission, + PrivilegeUsage, + PrivilegeUseCatalog, + PrivilegeUseConnection, + PrivilegeUseMarketplaceAssets, + PrivilegeUseProvider, + PrivilegeUseRecipient, + PrivilegeUseSchema, + PrivilegeUseShare, + PrivilegeWriteFiles, + PrivilegeWritePrivateFiles, + PrivilegeWriteVolume, + } +} + // Type always returns Privilege to satisfy [pflag.Value] interface func (f *Privilege) Type() string { return "Privilege" @@ -1445,6 +1570,23 @@ func (f *SharedDataObjectDataObjectType) Set(v string) error { } } +// Values returns all possible values of SharedDataObjectDataObjectType. +// +// There is no guarantee on the order of the values in the slice. +func (f *SharedDataObjectDataObjectType) Values() []SharedDataObjectDataObjectType { + return []SharedDataObjectDataObjectType{ + SharedDataObjectDataObjectTypeFeatureSpec, + SharedDataObjectDataObjectTypeFunction, + SharedDataObjectDataObjectTypeMaterializedView, + SharedDataObjectDataObjectTypeModel, + SharedDataObjectDataObjectTypeNotebookFile, + SharedDataObjectDataObjectTypeSchema, + SharedDataObjectDataObjectTypeStreamingTable, + SharedDataObjectDataObjectTypeTable, + SharedDataObjectDataObjectTypeView, + } +} + // Type always returns SharedDataObjectDataObjectType to satisfy [pflag.Value] interface func (f *SharedDataObjectDataObjectType) Type() string { return "SharedDataObjectDataObjectType" @@ -1472,6 +1614,16 @@ func (f *SharedDataObjectHistoryDataSharingStatus) Set(v string) error { } } +// Values returns all possible values of SharedDataObjectHistoryDataSharingStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *SharedDataObjectHistoryDataSharingStatus) Values() []SharedDataObjectHistoryDataSharingStatus { + return []SharedDataObjectHistoryDataSharingStatus{ + SharedDataObjectHistoryDataSharingStatusDisabled, + SharedDataObjectHistoryDataSharingStatusEnabled, + } +} + // Type always returns SharedDataObjectHistoryDataSharingStatus to satisfy [pflag.Value] interface func (f *SharedDataObjectHistoryDataSharingStatus) Type() string { return "SharedDataObjectHistoryDataSharingStatus" @@ -1499,6 +1651,16 @@ func (f *SharedDataObjectStatus) Set(v string) error { } } +// Values returns all possible values of SharedDataObjectStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *SharedDataObjectStatus) Values() []SharedDataObjectStatus { + return []SharedDataObjectStatus{ + SharedDataObjectStatusActive, + SharedDataObjectStatusPermissionDenied, + } +} + // Type always returns SharedDataObjectStatus to satisfy [pflag.Value] interface func (f *SharedDataObjectStatus) Type() string { return "SharedDataObjectStatus" @@ -1535,6 +1697,17 @@ func (f *SharedDataObjectUpdateAction) Set(v string) error { } } +// Values returns all possible values of SharedDataObjectUpdateAction. +// +// There is no guarantee on the order of the values in the slice. +func (f *SharedDataObjectUpdateAction) Values() []SharedDataObjectUpdateAction { + return []SharedDataObjectUpdateAction{ + SharedDataObjectUpdateActionAdd, + SharedDataObjectUpdateActionRemove, + SharedDataObjectUpdateActionUpdate, + } +} + // Type always returns SharedDataObjectUpdateAction to satisfy [pflag.Value] interface func (f *SharedDataObjectUpdateAction) Type() string { return "SharedDataObjectUpdateAction" @@ -1565,6 +1738,17 @@ func (f *SharedSecurableKind) Set(v string) error { } } +// Values returns all possible values of SharedSecurableKind. +// +// There is no guarantee on the order of the values in the slice. +func (f *SharedSecurableKind) Values() []SharedSecurableKind { + return []SharedSecurableKind{ + SharedSecurableKindFunctionFeatureSpec, + SharedSecurableKindFunctionRegisteredModel, + SharedSecurableKindFunctionStandard, + } +} + // Type always returns SharedSecurableKind to satisfy [pflag.Value] interface func (f *SharedSecurableKind) Type() string { return "SharedSecurableKind" @@ -1665,6 +1849,20 @@ func (f *TableInternalAttributesSharedTableType) Set(v string) error { } } +// Values returns all possible values of TableInternalAttributesSharedTableType. +// +// There is no guarantee on the order of the values in the slice. +func (f *TableInternalAttributesSharedTableType) Values() []TableInternalAttributesSharedTableType { + return []TableInternalAttributesSharedTableType{ + TableInternalAttributesSharedTableTypeDirectoryBasedTable, + TableInternalAttributesSharedTableTypeFileBasedTable, + TableInternalAttributesSharedTableTypeForeignTable, + TableInternalAttributesSharedTableTypeMaterializedView, + TableInternalAttributesSharedTableTypeStreamingTable, + TableInternalAttributesSharedTableTypeView, + } +} + // Type always returns TableInternalAttributesSharedTableType to satisfy [pflag.Value] interface func (f *TableInternalAttributesSharedTableType) Type() string { return "TableInternalAttributesSharedTableType" diff --git a/service/sql/interface.go b/service/sql/interface.go index 631bccb98..247afc79c 100755 --- a/service/sql/interface.go +++ b/service/sql/interface.go @@ -11,6 +11,8 @@ import ( // of its result, and notifies one or more users and/or notification // destinations if the condition was met. Alerts can be scheduled using the // `sql_task` type of the Jobs API, e.g. :method:jobs/create. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AlertsService interface { // Create an alert. @@ -36,8 +38,6 @@ type AlertsService interface { // Gets a list of alerts accessible to the user, ordered by creation time. // **Warning:** Calling this API concurrently 10 or more times could result // in throttling, service degradation, or a temporary ban. - // - // Use ListAll() to get all ListAlertsResponseAlert instances, which will iterate over every result page. List(ctx context.Context, request ListAlertsRequest) (*ListAlertsResponse, error) // Update an alert. @@ -55,6 +55,8 @@ type AlertsService interface { // **Note**: A new version of the Databricks SQL API is now available. Please // see the latest version. [Learn more] // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html type AlertsLegacyService interface { @@ -114,6 +116,8 @@ type AlertsLegacyService interface { } // TODO: Add description +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AlertsV2Service interface { // Create an alert. @@ -129,8 +133,6 @@ type AlertsV2Service interface { // List alerts. // // Gets a list of alerts accessible to the user, ordered by creation time. - // - // Use ListAlertsAll() to get all AlertV2 instances, which will iterate over every result page. ListAlerts(ctx context.Context, request ListAlertsV2Request) (*ListAlertsV2Response, error) // Delete an alert. @@ -149,6 +151,8 @@ type AlertsV2Service interface { // This is an evolving API that facilitates the addition and removal of widgets // from existing dashboards within the Databricks Workspace. Data structures may // change over time. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type DashboardWidgetsService interface { // Add widget to a dashboard. @@ -167,6 +171,8 @@ type DashboardWidgetsService interface { // since you can get a dashboard definition with a GET request and then POST it // to create a new one. Dashboards can be scheduled using the `sql_task` type of // the Jobs API, e.g. :method:jobs/create. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type DashboardsService interface { // Create a dashboard object. @@ -190,8 +196,6 @@ type DashboardsService interface { // // **Warning**: Calling this API concurrently 10 or more times could result // in throttling, service degradation, or a temporary ban. - // - // Use ListAll() to get all Dashboard instances, which will iterate over every result page. List(ctx context.Context, request ListDashboardsRequest) (*ListResponse, error) // Restore a dashboard. @@ -223,6 +227,8 @@ type DashboardsService interface { // **Note**: A new version of the Databricks SQL API is now available. [Learn // more] // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html type DataSourcesService interface { @@ -257,6 +263,8 @@ type DataSourcesService interface { // **Note**: A new version of the Databricks SQL API is now available. [Learn // more] // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html type DbsqlPermissionsService interface { @@ -299,6 +307,8 @@ type DbsqlPermissionsService interface { // a Databricks SQL object that includes the target SQL warehouse, query text, // name, description, tags, and parameters. Queries can be scheduled using the // `sql_task` type of the Jobs API, e.g. :method:jobs/create. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type QueriesService interface { // Create a query. @@ -324,15 +334,11 @@ type QueriesService interface { // Gets a list of queries accessible to the user, ordered by creation time. // **Warning:** Calling this API concurrently 10 or more times could result // in throttling, service degradation, or a temporary ban. - // - // Use ListAll() to get all ListQueryObjectsResponseQuery instances, which will iterate over every result page. List(ctx context.Context, request ListQueriesRequest) (*ListQueryObjectsResponse, error) // List visualizations on a query. // // Gets a list of visualizations on a query. - // - // Use ListVisualizationsAll() to get all Visualization instances, which will iterate over every result page. ListVisualizations(ctx context.Context, request ListVisualizationsForQueryRequest) (*ListVisualizationsForQueryResponse, error) // Update a query. @@ -349,6 +355,8 @@ type QueriesService interface { // **Note**: A new version of the Databricks SQL API is now available. Please // see the latest version. [Learn more] // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html type QueriesLegacyService interface { @@ -405,8 +413,6 @@ type QueriesLegacyService interface { // Please use :method:queries/list instead. [Learn more] // // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html - // - // Use ListAll() to get all LegacyQuery instances, which will iterate over every result page. List(ctx context.Context, request ListQueriesLegacyRequest) (*QueryList, error) // Restore a query. @@ -436,6 +442,8 @@ type QueriesLegacyService interface { // A service responsible for storing and retrieving the list of queries run // against SQL endpoints and serverless compute. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type QueryHistoryService interface { // List Queries. @@ -453,6 +461,8 @@ type QueryHistoryService interface { // This is an evolving API that facilitates the addition and removal of // visualizations from existing queries in the Databricks Workspace. Data // structures can change over time. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type QueryVisualizationsService interface { // Add a visualization to a query. @@ -478,6 +488,8 @@ type QueryVisualizationsService interface { // **Note**: A new version of the Databricks SQL API is now available. Please // see the latest version. [Learn more] // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html type QueryVisualizationsLegacyService interface { @@ -513,6 +525,8 @@ type QueryVisualizationsLegacyService interface { } // Redash V2 service for workspace configurations (internal) +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type RedashConfigService interface { // Read workspace configuration for Redash-v2. @@ -622,6 +636,8 @@ type RedashConfigService interface { // For example, you cannot use the Jobs API to execute the command, and then the // SQL Execution API to cancel it. // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [Apache Arrow Columnar]: https://arrow.apache.org/overview/ // [Databricks SQL Statement Execution API tutorial]: https://docs.databricks.com/sql/api/sql-execution-tutorial.html type StatementExecutionService interface { @@ -666,6 +682,8 @@ type StatementExecutionService interface { // A SQL warehouse is a compute resource that lets you run SQL commands on data // objects within Databricks SQL. Compute resources are infrastructure resources // that provide processing capabilities in the cloud. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type WarehousesService interface { // Create a warehouse. @@ -708,8 +726,6 @@ type WarehousesService interface { // List warehouses. // // Lists all SQL warehouses that a user has manager permissions on. - // - // Use ListAll() to get all EndpointInfo instances List(ctx context.Context, request ListWarehousesRequest) (*ListWarehousesResponse, error) // Set SQL warehouse permissions. diff --git a/service/sql/model.go b/service/sql/model.go index 5ae6fd898..093b9e6c9 100755 --- a/service/sql/model.go +++ b/service/sql/model.go @@ -61,6 +61,22 @@ func (f *Aggregation) Set(v string) error { } } +// Values returns all possible values of Aggregation. +// +// There is no guarantee on the order of the values in the slice. +func (f *Aggregation) Values() []Aggregation { + return []Aggregation{ + AggregationAvg, + AggregationCount, + AggregationCountDistinct, + AggregationMax, + AggregationMedian, + AggregationMin, + AggregationStddev, + AggregationSum, + } +} + // Type always returns Aggregation to satisfy [pflag.Value] interface func (f *Aggregation) Type() string { return "Aggregation" @@ -171,6 +187,18 @@ func (f *AlertEvaluationState) Set(v string) error { } } +// Values returns all possible values of AlertEvaluationState. +// +// There is no guarantee on the order of the values in the slice. +func (f *AlertEvaluationState) Values() []AlertEvaluationState { + return []AlertEvaluationState{ + AlertEvaluationStateError, + AlertEvaluationStateOk, + AlertEvaluationStateTriggered, + AlertEvaluationStateUnknown, + } +} + // Type always returns AlertEvaluationState to satisfy [pflag.Value] interface func (f *AlertEvaluationState) Type() string { return "AlertEvaluationState" @@ -240,6 +268,21 @@ func (f *AlertOperator) Set(v string) error { } } +// Values returns all possible values of AlertOperator. +// +// There is no guarantee on the order of the values in the slice. +func (f *AlertOperator) Values() []AlertOperator { + return []AlertOperator{ + AlertOperatorEqual, + AlertOperatorGreaterThan, + AlertOperatorGreaterThanOrEqual, + AlertOperatorIsNull, + AlertOperatorLessThan, + AlertOperatorLessThanOrEqual, + AlertOperatorNotEqual, + } +} + // Type always returns AlertOperator to satisfy [pflag.Value] interface func (f *AlertOperator) Type() string { return "AlertOperator" @@ -308,6 +351,17 @@ func (f *AlertOptionsEmptyResultState) Set(v string) error { } } +// Values returns all possible values of AlertOptionsEmptyResultState. +// +// There is no guarantee on the order of the values in the slice. +func (f *AlertOptionsEmptyResultState) Values() []AlertOptionsEmptyResultState { + return []AlertOptionsEmptyResultState{ + AlertOptionsEmptyResultStateOk, + AlertOptionsEmptyResultStateTriggered, + AlertOptionsEmptyResultStateUnknown, + } +} + // Type always returns AlertOptionsEmptyResultState to satisfy [pflag.Value] interface func (f *AlertOptionsEmptyResultState) Type() string { return "AlertOptionsEmptyResultState" @@ -389,6 +443,17 @@ func (f *AlertState) Set(v string) error { } } +// Values returns all possible values of AlertState. +// +// There is no guarantee on the order of the values in the slice. +func (f *AlertState) Values() []AlertState { + return []AlertState{ + AlertStateOk, + AlertStateTriggered, + AlertStateUnknown, + } +} + // Type always returns AlertState to satisfy [pflag.Value] interface func (f *AlertState) Type() string { return "AlertState" @@ -641,6 +706,18 @@ func (f *ChannelName) Set(v string) error { } } +// Values returns all possible values of ChannelName. +// +// There is no guarantee on the order of the values in the slice. +func (f *ChannelName) Values() []ChannelName { + return []ChannelName{ + ChannelNameChannelNameCurrent, + ChannelNameChannelNameCustom, + ChannelNameChannelNamePreview, + ChannelNameChannelNamePrevious, + } +} + // Type always returns ChannelName to satisfy [pflag.Value] interface func (f *ChannelName) Type() string { return "ChannelName" @@ -766,6 +843,33 @@ func (f *ColumnInfoTypeName) Set(v string) error { } } +// Values returns all possible values of ColumnInfoTypeName. +// +// There is no guarantee on the order of the values in the slice. +func (f *ColumnInfoTypeName) Values() []ColumnInfoTypeName { + return []ColumnInfoTypeName{ + ColumnInfoTypeNameArray, + ColumnInfoTypeNameBinary, + ColumnInfoTypeNameBoolean, + ColumnInfoTypeNameByte, + ColumnInfoTypeNameChar, + ColumnInfoTypeNameDate, + ColumnInfoTypeNameDecimal, + ColumnInfoTypeNameDouble, + ColumnInfoTypeNameFloat, + ColumnInfoTypeNameInt, + ColumnInfoTypeNameInterval, + ColumnInfoTypeNameLong, + ColumnInfoTypeNameMap, + ColumnInfoTypeNameNull, + ColumnInfoTypeNameShort, + ColumnInfoTypeNameString, + ColumnInfoTypeNameStruct, + ColumnInfoTypeNameTimestamp, + ColumnInfoTypeNameUserDefinedType, + } +} + // Type always returns ColumnInfoTypeName to satisfy [pflag.Value] interface func (f *ColumnInfoTypeName) Type() string { return "ColumnInfoTypeName" @@ -805,6 +909,22 @@ func (f *ComparisonOperator) Set(v string) error { } } +// Values returns all possible values of ComparisonOperator. +// +// There is no guarantee on the order of the values in the slice. +func (f *ComparisonOperator) Values() []ComparisonOperator { + return []ComparisonOperator{ + ComparisonOperatorEqual, + ComparisonOperatorGreaterThan, + ComparisonOperatorGreaterThanOrEqual, + ComparisonOperatorIsNotNull, + ComparisonOperatorIsNull, + ComparisonOperatorLessThan, + ComparisonOperatorLessThanOrEqual, + ComparisonOperatorNotEqual, + } +} + // Type always returns ComparisonOperator to satisfy [pflag.Value] interface func (f *ComparisonOperator) Type() string { return "ComparisonOperator" @@ -1112,6 +1232,17 @@ func (f *CreateWarehouseRequestWarehouseType) Set(v string) error { } } +// Values returns all possible values of CreateWarehouseRequestWarehouseType. +// +// There is no guarantee on the order of the values in the slice. +func (f *CreateWarehouseRequestWarehouseType) Values() []CreateWarehouseRequestWarehouseType { + return []CreateWarehouseRequestWarehouseType{ + CreateWarehouseRequestWarehouseTypeClassic, + CreateWarehouseRequestWarehouseTypePro, + CreateWarehouseRequestWarehouseTypeTypeUnspecified, + } +} + // Type always returns CreateWarehouseRequestWarehouseType to satisfy [pflag.Value] interface func (f *CreateWarehouseRequestWarehouseType) Type() string { return "CreateWarehouseRequestWarehouseType" @@ -1374,6 +1505,17 @@ func (f *DatePrecision) Set(v string) error { } } +// Values returns all possible values of DatePrecision. +// +// There is no guarantee on the order of the values in the slice. +func (f *DatePrecision) Values() []DatePrecision { + return []DatePrecision{ + DatePrecisionDayPrecision, + DatePrecisionMinutePrecision, + DatePrecisionSecondPrecision, + } +} + // Type always returns DatePrecision to satisfy [pflag.Value] interface func (f *DatePrecision) Type() string { return "DatePrecision" @@ -1459,6 +1601,31 @@ func (f *DateRangeValueDynamicDateRange) Set(v string) error { } } +// Values returns all possible values of DateRangeValueDynamicDateRange. +// +// There is no guarantee on the order of the values in the slice. +func (f *DateRangeValueDynamicDateRange) Values() []DateRangeValueDynamicDateRange { + return []DateRangeValueDynamicDateRange{ + DateRangeValueDynamicDateRangeLast12Months, + DateRangeValueDynamicDateRangeLast14Days, + DateRangeValueDynamicDateRangeLast24Hours, + DateRangeValueDynamicDateRangeLast30Days, + DateRangeValueDynamicDateRangeLast60Days, + DateRangeValueDynamicDateRangeLast7Days, + DateRangeValueDynamicDateRangeLast8Hours, + DateRangeValueDynamicDateRangeLast90Days, + DateRangeValueDynamicDateRangeLastHour, + DateRangeValueDynamicDateRangeLastMonth, + DateRangeValueDynamicDateRangeLastWeek, + DateRangeValueDynamicDateRangeLastYear, + DateRangeValueDynamicDateRangeThisMonth, + DateRangeValueDynamicDateRangeThisWeek, + DateRangeValueDynamicDateRangeThisYear, + DateRangeValueDynamicDateRangeToday, + DateRangeValueDynamicDateRangeYesterday, + } +} + // Type always returns DateRangeValueDynamicDateRange to satisfy [pflag.Value] interface func (f *DateRangeValueDynamicDateRange) Type() string { return "DateRangeValueDynamicDateRange" @@ -1506,6 +1673,16 @@ func (f *DateValueDynamicDate) Set(v string) error { } } +// Values returns all possible values of DateValueDynamicDate. +// +// There is no guarantee on the order of the values in the slice. +func (f *DateValueDynamicDate) Values() []DateValueDynamicDate { + return []DateValueDynamicDate{ + DateValueDynamicDateNow, + DateValueDynamicDateYesterday, + } +} + // Type always returns DateValueDynamicDate to satisfy [pflag.Value] interface func (f *DateValueDynamicDate) Type() string { return "DateValueDynamicDate" @@ -1577,6 +1754,16 @@ func (f *Disposition) Set(v string) error { } } +// Values returns all possible values of Disposition. +// +// There is no guarantee on the order of the values in the slice. +func (f *Disposition) Values() []Disposition { + return []Disposition{ + DispositionExternalLinks, + DispositionInline, + } +} + // Type always returns Disposition to satisfy [pflag.Value] interface func (f *Disposition) Type() string { return "Disposition" @@ -1707,6 +1894,17 @@ func (f *EditWarehouseRequestWarehouseType) Set(v string) error { } } +// Values returns all possible values of EditWarehouseRequestWarehouseType. +// +// There is no guarantee on the order of the values in the slice. +func (f *EditWarehouseRequestWarehouseType) Values() []EditWarehouseRequestWarehouseType { + return []EditWarehouseRequestWarehouseType{ + EditWarehouseRequestWarehouseTypeClassic, + EditWarehouseRequestWarehouseTypePro, + EditWarehouseRequestWarehouseTypeTypeUnspecified, + } +} + // Type always returns EditWarehouseRequestWarehouseType to satisfy [pflag.Value] interface func (f *EditWarehouseRequestWarehouseType) Type() string { return "EditWarehouseRequestWarehouseType" @@ -1875,6 +2073,17 @@ func (f *EndpointInfoWarehouseType) Set(v string) error { } } +// Values returns all possible values of EndpointInfoWarehouseType. +// +// There is no guarantee on the order of the values in the slice. +func (f *EndpointInfoWarehouseType) Values() []EndpointInfoWarehouseType { + return []EndpointInfoWarehouseType{ + EndpointInfoWarehouseTypeClassic, + EndpointInfoWarehouseTypePro, + EndpointInfoWarehouseTypeTypeUnspecified, + } +} + // Type always returns EndpointInfoWarehouseType to satisfy [pflag.Value] interface func (f *EndpointInfoWarehouseType) Type() string { return "EndpointInfoWarehouseType" @@ -2084,6 +2293,16 @@ func (f *ExecuteStatementRequestOnWaitTimeout) Set(v string) error { } } +// Values returns all possible values of ExecuteStatementRequestOnWaitTimeout. +// +// There is no guarantee on the order of the values in the slice. +func (f *ExecuteStatementRequestOnWaitTimeout) Values() []ExecuteStatementRequestOnWaitTimeout { + return []ExecuteStatementRequestOnWaitTimeout{ + ExecuteStatementRequestOnWaitTimeoutCancel, + ExecuteStatementRequestOnWaitTimeoutContinue, + } +} + // Type always returns ExecuteStatementRequestOnWaitTimeout to satisfy [pflag.Value] interface func (f *ExecuteStatementRequestOnWaitTimeout) Type() string { return "ExecuteStatementRequestOnWaitTimeout" @@ -2203,6 +2422,17 @@ func (f *Format) Set(v string) error { } } +// Values returns all possible values of Format. +// +// There is no guarantee on the order of the values in the slice. +func (f *Format) Values() []Format { + return []Format{ + FormatArrowStream, + FormatCsv, + FormatJsonArray, + } +} + // Type always returns Format to satisfy [pflag.Value] interface func (f *Format) Type() string { return "Format" @@ -2416,6 +2646,17 @@ func (f *GetWarehouseResponseWarehouseType) Set(v string) error { } } +// Values returns all possible values of GetWarehouseResponseWarehouseType. +// +// There is no guarantee on the order of the values in the slice. +func (f *GetWarehouseResponseWarehouseType) Values() []GetWarehouseResponseWarehouseType { + return []GetWarehouseResponseWarehouseType{ + GetWarehouseResponseWarehouseTypeClassic, + GetWarehouseResponseWarehouseTypePro, + GetWarehouseResponseWarehouseTypeTypeUnspecified, + } +} + // Type always returns GetWarehouseResponseWarehouseType to satisfy [pflag.Value] interface func (f *GetWarehouseResponseWarehouseType) Type() string { return "GetWarehouseResponseWarehouseType" @@ -2484,6 +2725,17 @@ func (f *GetWorkspaceWarehouseConfigResponseSecurityPolicy) Set(v string) error } } +// Values returns all possible values of GetWorkspaceWarehouseConfigResponseSecurityPolicy. +// +// There is no guarantee on the order of the values in the slice. +func (f *GetWorkspaceWarehouseConfigResponseSecurityPolicy) Values() []GetWorkspaceWarehouseConfigResponseSecurityPolicy { + return []GetWorkspaceWarehouseConfigResponseSecurityPolicy{ + GetWorkspaceWarehouseConfigResponseSecurityPolicyDataAccessControl, + GetWorkspaceWarehouseConfigResponseSecurityPolicyNone, + GetWorkspaceWarehouseConfigResponseSecurityPolicyPassthrough, + } +} + // Type always returns GetWorkspaceWarehouseConfigResponseSecurityPolicy to satisfy [pflag.Value] interface func (f *GetWorkspaceWarehouseConfigResponseSecurityPolicy) Type() string { return "GetWorkspaceWarehouseConfigResponseSecurityPolicy" @@ -2555,6 +2807,17 @@ func (f *LegacyAlertState) Set(v string) error { } } +// Values returns all possible values of LegacyAlertState. +// +// There is no guarantee on the order of the values in the slice. +func (f *LegacyAlertState) Values() []LegacyAlertState { + return []LegacyAlertState{ + LegacyAlertStateOk, + LegacyAlertStateTriggered, + LegacyAlertStateUnknown, + } +} + // Type always returns LegacyAlertState to satisfy [pflag.Value] interface func (f *LegacyAlertState) Type() string { return "LegacyAlertState" @@ -2700,6 +2963,16 @@ func (f *LifecycleState) Set(v string) error { } } +// Values returns all possible values of LifecycleState. +// +// There is no guarantee on the order of the values in the slice. +func (f *LifecycleState) Values() []LifecycleState { + return []LifecycleState{ + LifecycleStateActive, + LifecycleStateTrashed, + } +} + // Type always returns LifecycleState to satisfy [pflag.Value] interface func (f *LifecycleState) Type() string { return "LifecycleState" @@ -2869,6 +3142,16 @@ func (f *ListOrder) Set(v string) error { } } +// Values returns all possible values of ListOrder. +// +// There is no guarantee on the order of the values in the slice. +func (f *ListOrder) Values() []ListOrder { + return []ListOrder{ + ListOrderCreatedAt, + ListOrderName, + } +} + // Type always returns ListOrder to satisfy [pflag.Value] interface func (f *ListOrder) Type() string { return "ListOrder" @@ -3174,6 +3457,18 @@ func (f *ObjectType) Set(v string) error { } } +// Values returns all possible values of ObjectType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ObjectType) Values() []ObjectType { + return []ObjectType{ + ObjectTypeAlert, + ObjectTypeDashboard, + ObjectTypeDataSource, + ObjectTypeQuery, + } +} + // Type always returns ObjectType to satisfy [pflag.Value] interface func (f *ObjectType) Type() string { return "ObjectType" @@ -3206,6 +3501,18 @@ func (f *ObjectTypePlural) Set(v string) error { } } +// Values returns all possible values of ObjectTypePlural. +// +// There is no guarantee on the order of the values in the slice. +func (f *ObjectTypePlural) Values() []ObjectTypePlural { + return []ObjectTypePlural{ + ObjectTypePluralAlerts, + ObjectTypePluralDashboards, + ObjectTypePluralDataSources, + ObjectTypePluralQueries, + } +} + // Type always returns ObjectTypePlural to satisfy [pflag.Value] interface func (f *ObjectTypePlural) Type() string { return "ObjectTypePlural" @@ -3256,6 +3563,17 @@ func (f *OwnableObjectType) Set(v string) error { } } +// Values returns all possible values of OwnableObjectType. +// +// There is no guarantee on the order of the values in the slice. +func (f *OwnableObjectType) Values() []OwnableObjectType { + return []OwnableObjectType{ + OwnableObjectTypeAlert, + OwnableObjectTypeDashboard, + OwnableObjectTypeQuery, + } +} + // Type always returns OwnableObjectType to satisfy [pflag.Value] interface func (f *OwnableObjectType) Type() string { return "OwnableObjectType" @@ -3321,6 +3639,19 @@ func (f *ParameterType) Set(v string) error { } } +// Values returns all possible values of ParameterType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ParameterType) Values() []ParameterType { + return []ParameterType{ + ParameterTypeDatetime, + ParameterTypeEnum, + ParameterTypeNumber, + ParameterTypeQuery, + ParameterTypeText, + } +} + // Type always returns ParameterType to satisfy [pflag.Value] interface func (f *ParameterType) Type() string { return "ParameterType" @@ -3358,6 +3689,18 @@ func (f *PermissionLevel) Set(v string) error { } } +// Values returns all possible values of PermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *PermissionLevel) Values() []PermissionLevel { + return []PermissionLevel{ + PermissionLevelCanEdit, + PermissionLevelCanManage, + PermissionLevelCanRun, + PermissionLevelCanView, + } +} + // Type always returns PermissionLevel to satisfy [pflag.Value] interface func (f *PermissionLevel) Type() string { return "PermissionLevel" @@ -3394,6 +3737,20 @@ func (f *PlansState) Set(v string) error { } } +// Values returns all possible values of PlansState. +// +// There is no guarantee on the order of the values in the slice. +func (f *PlansState) Values() []PlansState { + return []PlansState{ + PlansStateEmpty, + PlansStateExists, + PlansStateIgnoredLargePlansSize, + PlansStateIgnoredSmallDuration, + PlansStateIgnoredSparkPlanType, + PlansStateUnknown, + } +} + // Type always returns PlansState to satisfy [pflag.Value] interface func (f *PlansState) Type() string { return "PlansState" @@ -3837,6 +4194,36 @@ func (f *QueryStatementType) Set(v string) error { } } +// Values returns all possible values of QueryStatementType. +// +// There is no guarantee on the order of the values in the slice. +func (f *QueryStatementType) Values() []QueryStatementType { + return []QueryStatementType{ + QueryStatementTypeAlter, + QueryStatementTypeAnalyze, + QueryStatementTypeCopy, + QueryStatementTypeCreate, + QueryStatementTypeDelete, + QueryStatementTypeDescribe, + QueryStatementTypeDrop, + QueryStatementTypeExplain, + QueryStatementTypeGrant, + QueryStatementTypeInsert, + QueryStatementTypeMerge, + QueryStatementTypeOptimize, + QueryStatementTypeOther, + QueryStatementTypeRefresh, + QueryStatementTypeReplace, + QueryStatementTypeRevoke, + QueryStatementTypeSelect, + QueryStatementTypeSet, + QueryStatementTypeShow, + QueryStatementTypeTruncate, + QueryStatementTypeUpdate, + QueryStatementTypeUse, + } +} + // Type always returns QueryStatementType to satisfy [pflag.Value] interface func (f *QueryStatementType) Type() string { return "QueryStatementType" @@ -3877,6 +4264,22 @@ func (f *QueryStatus) Set(v string) error { } } +// Values returns all possible values of QueryStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *QueryStatus) Values() []QueryStatus { + return []QueryStatus{ + QueryStatusCanceled, + QueryStatusCompiled, + QueryStatusCompiling, + QueryStatusFailed, + QueryStatusFinished, + QueryStatusQueued, + QueryStatusRunning, + QueryStatusStarted, + } +} + // Type always returns QueryStatus to satisfy [pflag.Value] interface func (f *QueryStatus) Type() string { return "QueryStatus" @@ -4008,6 +4411,16 @@ func (f *RunAsMode) Set(v string) error { } } +// Values returns all possible values of RunAsMode. +// +// There is no guarantee on the order of the values in the slice. +func (f *RunAsMode) Values() []RunAsMode { + return []RunAsMode{ + RunAsModeOwner, + RunAsModeViewer, + } +} + // Type always returns RunAsMode to satisfy [pflag.Value] interface func (f *RunAsMode) Type() string { return "RunAsMode" @@ -4038,6 +4451,16 @@ func (f *RunAsRole) Set(v string) error { } } +// Values returns all possible values of RunAsRole. +// +// There is no guarantee on the order of the values in the slice. +func (f *RunAsRole) Values() []RunAsRole { + return []RunAsRole{ + RunAsRoleOwner, + RunAsRoleViewer, + } +} + // Type always returns RunAsRole to satisfy [pflag.Value] interface func (f *RunAsRole) Type() string { return "RunAsRole" @@ -4065,6 +4488,16 @@ func (f *SchedulePauseStatus) Set(v string) error { } } +// Values returns all possible values of SchedulePauseStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *SchedulePauseStatus) Values() []SchedulePauseStatus { + return []SchedulePauseStatus{ + SchedulePauseStatusPaused, + SchedulePauseStatusUnpaused, + } +} + // Type always returns SchedulePauseStatus to satisfy [pflag.Value] interface func (f *SchedulePauseStatus) Type() string { return "SchedulePauseStatus" @@ -4132,6 +4565,28 @@ func (f *ServiceErrorCode) Set(v string) error { } } +// Values returns all possible values of ServiceErrorCode. +// +// There is no guarantee on the order of the values in the slice. +func (f *ServiceErrorCode) Values() []ServiceErrorCode { + return []ServiceErrorCode{ + ServiceErrorCodeAborted, + ServiceErrorCodeAlreadyExists, + ServiceErrorCodeBadRequest, + ServiceErrorCodeCancelled, + ServiceErrorCodeDeadlineExceeded, + ServiceErrorCodeInternalError, + ServiceErrorCodeIoError, + ServiceErrorCodeNotFound, + ServiceErrorCodeResourceExhausted, + ServiceErrorCodeServiceUnderMaintenance, + ServiceErrorCodeTemporarilyUnavailable, + ServiceErrorCodeUnauthenticated, + ServiceErrorCodeUnknown, + ServiceErrorCodeWorkspaceTemporarilyUnavailable, + } +} + // Type always returns ServiceErrorCode to satisfy [pflag.Value] interface func (f *ServiceErrorCode) Type() string { return "ServiceErrorCode" @@ -4228,6 +4683,17 @@ func (f *SetWorkspaceWarehouseConfigRequestSecurityPolicy) Set(v string) error { } } +// Values returns all possible values of SetWorkspaceWarehouseConfigRequestSecurityPolicy. +// +// There is no guarantee on the order of the values in the slice. +func (f *SetWorkspaceWarehouseConfigRequestSecurityPolicy) Values() []SetWorkspaceWarehouseConfigRequestSecurityPolicy { + return []SetWorkspaceWarehouseConfigRequestSecurityPolicy{ + SetWorkspaceWarehouseConfigRequestSecurityPolicyDataAccessControl, + SetWorkspaceWarehouseConfigRequestSecurityPolicyNone, + SetWorkspaceWarehouseConfigRequestSecurityPolicyPassthrough, + } +} + // Type always returns SetWorkspaceWarehouseConfigRequestSecurityPolicy to satisfy [pflag.Value] interface func (f *SetWorkspaceWarehouseConfigRequestSecurityPolicy) Type() string { return "SetWorkspaceWarehouseConfigRequestSecurityPolicy" @@ -4261,6 +4727,17 @@ func (f *SpotInstancePolicy) Set(v string) error { } } +// Values returns all possible values of SpotInstancePolicy. +// +// There is no guarantee on the order of the values in the slice. +func (f *SpotInstancePolicy) Values() []SpotInstancePolicy { + return []SpotInstancePolicy{ + SpotInstancePolicyCostOptimized, + SpotInstancePolicyPolicyUnspecified, + SpotInstancePolicyReliabilityOptimized, + } +} + // Type always returns SpotInstancePolicy to satisfy [pflag.Value] interface func (f *SpotInstancePolicy) Type() string { return "SpotInstancePolicy" @@ -4306,6 +4783,20 @@ func (f *State) Set(v string) error { } } +// Values returns all possible values of State. +// +// There is no guarantee on the order of the values in the slice. +func (f *State) Values() []State { + return []State{ + StateDeleted, + StateDeleting, + StateRunning, + StateStarting, + StateStopped, + StateStopping, + } +} + // Type always returns State to satisfy [pflag.Value] interface func (f *State) Type() string { return "State" @@ -4404,6 +4895,20 @@ func (f *StatementState) Set(v string) error { } } +// Values returns all possible values of StatementState. +// +// There is no guarantee on the order of the values in the slice. +func (f *StatementState) Values() []StatementState { + return []StatementState{ + StatementStateCanceled, + StatementStateClosed, + StatementStateFailed, + StatementStatePending, + StatementStateRunning, + StatementStateSucceeded, + } +} + // Type always returns StatementState to satisfy [pflag.Value] interface func (f *StatementState) Type() string { return "StatementState" @@ -4450,6 +4955,18 @@ func (f *Status) Set(v string) error { } } +// Values returns all possible values of Status. +// +// There is no guarantee on the order of the values in the slice. +func (f *Status) Values() []Status { + return []Status{ + StatusDegraded, + StatusFailed, + StatusHealthy, + StatusStatusUnspecified, + } +} + // Type always returns Status to satisfy [pflag.Value] interface func (f *Status) Type() string { return "Status" @@ -4488,6 +5005,15 @@ func (f *SuccessMessage) Set(v string) error { } } +// Values returns all possible values of SuccessMessage. +// +// There is no guarantee on the order of the values in the slice. +func (f *SuccessMessage) Values() []SuccessMessage { + return []SuccessMessage{ + SuccessMessageSuccess, + } +} + // Type always returns SuccessMessage to satisfy [pflag.Value] interface func (f *SuccessMessage) Type() string { return "SuccessMessage" @@ -4680,6 +5206,93 @@ func (f *TerminationReasonCode) Set(v string) error { } } +// Values returns all possible values of TerminationReasonCode. +// +// There is no guarantee on the order of the values in the slice. +func (f *TerminationReasonCode) Values() []TerminationReasonCode { + return []TerminationReasonCode{ + TerminationReasonCodeAbuseDetected, + TerminationReasonCodeAttachProjectFailure, + TerminationReasonCodeAwsAuthorizationFailure, + TerminationReasonCodeAwsInsufficientFreeAddressesInSubnetFailure, + TerminationReasonCodeAwsInsufficientInstanceCapacityFailure, + TerminationReasonCodeAwsMaxSpotInstanceCountExceededFailure, + TerminationReasonCodeAwsRequestLimitExceeded, + TerminationReasonCodeAwsUnsupportedFailure, + TerminationReasonCodeAzureByokKeyPermissionFailure, + TerminationReasonCodeAzureEphemeralDiskFailure, + TerminationReasonCodeAzureInvalidDeploymentTemplate, + TerminationReasonCodeAzureOperationNotAllowedException, + TerminationReasonCodeAzureQuotaExceededException, + TerminationReasonCodeAzureResourceManagerThrottling, + TerminationReasonCodeAzureResourceProviderThrottling, + TerminationReasonCodeAzureUnexpectedDeploymentTemplateFailure, + TerminationReasonCodeAzureVmExtensionFailure, + TerminationReasonCodeAzureVnetConfigurationFailure, + TerminationReasonCodeBootstrapTimeout, + TerminationReasonCodeBootstrapTimeoutCloudProviderException, + TerminationReasonCodeCloudProviderDiskSetupFailure, + TerminationReasonCodeCloudProviderLaunchFailure, + TerminationReasonCodeCloudProviderResourceStockout, + TerminationReasonCodeCloudProviderShutdown, + TerminationReasonCodeCommunicationLost, + TerminationReasonCodeContainerLaunchFailure, + TerminationReasonCodeControlPlaneRequestFailure, + TerminationReasonCodeDatabaseConnectionFailure, + TerminationReasonCodeDbfsComponentUnhealthy, + TerminationReasonCodeDockerImagePullFailure, + TerminationReasonCodeDriverUnreachable, + TerminationReasonCodeDriverUnresponsive, + TerminationReasonCodeExecutionComponentUnhealthy, + TerminationReasonCodeGcpQuotaExceeded, + TerminationReasonCodeGcpServiceAccountDeleted, + TerminationReasonCodeGlobalInitScriptFailure, + TerminationReasonCodeHiveMetastoreProvisioningFailure, + TerminationReasonCodeImagePullPermissionDenied, + TerminationReasonCodeInactivity, + TerminationReasonCodeInitScriptFailure, + TerminationReasonCodeInstancePoolClusterFailure, + TerminationReasonCodeInstanceUnreachable, + TerminationReasonCodeInternalError, + TerminationReasonCodeInvalidArgument, + TerminationReasonCodeInvalidSparkImage, + TerminationReasonCodeIpExhaustionFailure, + TerminationReasonCodeJobFinished, + TerminationReasonCodeK8sAutoscalingFailure, + TerminationReasonCodeK8sDbrClusterLaunchTimeout, + TerminationReasonCodeMetastoreComponentUnhealthy, + TerminationReasonCodeNephosResourceManagement, + TerminationReasonCodeNetworkConfigurationFailure, + TerminationReasonCodeNfsMountFailure, + TerminationReasonCodeNpipTunnelSetupFailure, + TerminationReasonCodeNpipTunnelTokenFailure, + TerminationReasonCodeRequestRejected, + TerminationReasonCodeRequestThrottled, + TerminationReasonCodeSecretResolutionError, + TerminationReasonCodeSecurityDaemonRegistrationException, + TerminationReasonCodeSelfBootstrapFailure, + TerminationReasonCodeSkippedSlowNodes, + TerminationReasonCodeSlowImageDownload, + TerminationReasonCodeSparkError, + TerminationReasonCodeSparkImageDownloadFailure, + TerminationReasonCodeSparkStartupFailure, + TerminationReasonCodeSpotInstanceTermination, + TerminationReasonCodeStorageDownloadFailure, + TerminationReasonCodeStsClientSetupFailure, + TerminationReasonCodeSubnetExhaustedFailure, + TerminationReasonCodeTemporarilyUnavailable, + TerminationReasonCodeTrialExpired, + TerminationReasonCodeUnexpectedLaunchFailure, + TerminationReasonCodeUnknown, + TerminationReasonCodeUnsupportedInstanceType, + TerminationReasonCodeUpdateInstanceProfileFailure, + TerminationReasonCodeUserRequest, + TerminationReasonCodeWorkerSetupFailure, + TerminationReasonCodeWorkspaceCancelledError, + TerminationReasonCodeWorkspaceConfigurationError, + } +} + // Type always returns TerminationReasonCode to satisfy [pflag.Value] interface func (f *TerminationReasonCode) Type() string { return "TerminationReasonCode" @@ -4712,6 +5325,18 @@ func (f *TerminationReasonType) Set(v string) error { } } +// Values returns all possible values of TerminationReasonType. +// +// There is no guarantee on the order of the values in the slice. +func (f *TerminationReasonType) Values() []TerminationReasonType { + return []TerminationReasonType{ + TerminationReasonTypeClientError, + TerminationReasonTypeCloudFailure, + TerminationReasonTypeServiceFault, + TerminationReasonTypeSuccess, + } +} + // Type always returns TerminationReasonType to satisfy [pflag.Value] interface func (f *TerminationReasonType) Type() string { return "TerminationReasonType" @@ -5146,6 +5771,19 @@ func (f *WarehousePermissionLevel) Set(v string) error { } } +// Values returns all possible values of WarehousePermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *WarehousePermissionLevel) Values() []WarehousePermissionLevel { + return []WarehousePermissionLevel{ + WarehousePermissionLevelCanManage, + WarehousePermissionLevelCanMonitor, + WarehousePermissionLevelCanUse, + WarehousePermissionLevelCanView, + WarehousePermissionLevelIsOwner, + } +} + // Type always returns WarehousePermissionLevel to satisfy [pflag.Value] interface func (f *WarehousePermissionLevel) Type() string { return "WarehousePermissionLevel" @@ -5234,6 +5872,17 @@ func (f *WarehouseTypePairWarehouseType) Set(v string) error { } } +// Values returns all possible values of WarehouseTypePairWarehouseType. +// +// There is no guarantee on the order of the values in the slice. +func (f *WarehouseTypePairWarehouseType) Values() []WarehouseTypePairWarehouseType { + return []WarehouseTypePairWarehouseType{ + WarehouseTypePairWarehouseTypeClassic, + WarehouseTypePairWarehouseTypePro, + WarehouseTypePairWarehouseTypeTypeUnspecified, + } +} + // Type always returns WarehouseTypePairWarehouseType to satisfy [pflag.Value] interface func (f *WarehouseTypePairWarehouseType) Type() string { return "WarehouseTypePairWarehouseType" diff --git a/service/vectorsearch/interface.go b/service/vectorsearch/interface.go index e165c8042..15134c6ce 100755 --- a/service/vectorsearch/interface.go +++ b/service/vectorsearch/interface.go @@ -7,6 +7,8 @@ import ( ) // **Endpoint**: Represents the compute resources to host vector search indexes. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type VectorSearchEndpointsService interface { // Create an endpoint. @@ -27,8 +29,6 @@ type VectorSearchEndpointsService interface { // List all endpoints. // // List all vector search endpoints in the workspace. - // - // Use ListEndpointsAll() to get all EndpointInfo instances, which will iterate over every result page. ListEndpoints(ctx context.Context, request ListEndpointsRequest) (*ListEndpointResponse, error) // Update the budget policy of an endpoint. @@ -50,6 +50,8 @@ type VectorSearchEndpointsService interface { // changes. - **Direct Vector Access Index**: An index that supports direct read // and write of vectors and metadata through our REST and SDK APIs. With this // model, the user manages index updates. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type VectorSearchIndexesService interface { // Create an index. @@ -75,8 +77,6 @@ type VectorSearchIndexesService interface { // List indexes. // // List all indexes in the given endpoint. - // - // Use ListIndexesAll() to get all MiniVectorIndex instances, which will iterate over every result page. ListIndexes(ctx context.Context, request ListIndexesRequest) (*ListVectorIndexesResponse, error) // Query an index. diff --git a/service/vectorsearch/model.go b/service/vectorsearch/model.go index 868b235e8..8ac2a83c6 100755 --- a/service/vectorsearch/model.go +++ b/service/vectorsearch/model.go @@ -122,6 +122,17 @@ func (f *DeleteDataStatus) Set(v string) error { } } +// Values returns all possible values of DeleteDataStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *DeleteDataStatus) Values() []DeleteDataStatus { + return []DeleteDataStatus{ + DeleteDataStatusFailure, + DeleteDataStatusPartialSuccess, + DeleteDataStatusSuccess, + } +} + // Type always returns DeleteDataStatus to satisfy [pflag.Value] interface func (f *DeleteDataStatus) Type() string { return "DeleteDataStatus" @@ -363,6 +374,17 @@ func (f *EndpointStatusState) Set(v string) error { } } +// Values returns all possible values of EndpointStatusState. +// +// There is no guarantee on the order of the values in the slice. +func (f *EndpointStatusState) Values() []EndpointStatusState { + return []EndpointStatusState{ + EndpointStatusStateOffline, + EndpointStatusStateOnline, + EndpointStatusStateProvisioning, + } +} + // Type always returns EndpointStatusState to satisfy [pflag.Value] interface func (f *EndpointStatusState) Type() string { return "EndpointStatusState" @@ -389,6 +411,15 @@ func (f *EndpointType) Set(v string) error { } } +// Values returns all possible values of EndpointType. +// +// There is no guarantee on the order of the values in the slice. +func (f *EndpointType) Values() []EndpointType { + return []EndpointType{ + EndpointTypeStandard, + } +} + // Type always returns EndpointType to satisfy [pflag.Value] interface func (f *EndpointType) Type() string { return "EndpointType" @@ -583,6 +614,16 @@ func (f *PipelineType) Set(v string) error { } } +// Values returns all possible values of PipelineType. +// +// There is no guarantee on the order of the values in the slice. +func (f *PipelineType) Values() []PipelineType { + return []PipelineType{ + PipelineTypeContinuous, + PipelineTypeTriggered, + } +} + // Type always returns PipelineType to satisfy [pflag.Value] interface func (f *PipelineType) Type() string { return "PipelineType" @@ -822,6 +863,17 @@ func (f *UpsertDataStatus) Set(v string) error { } } +// Values returns all possible values of UpsertDataStatus. +// +// There is no guarantee on the order of the values in the slice. +func (f *UpsertDataStatus) Values() []UpsertDataStatus { + return []UpsertDataStatus{ + UpsertDataStatusFailure, + UpsertDataStatusPartialSuccess, + UpsertDataStatusSuccess, + } +} + // Type always returns UpsertDataStatus to satisfy [pflag.Value] interface func (f *UpsertDataStatus) Type() string { return "UpsertDataStatus" @@ -952,6 +1004,16 @@ func (f *VectorIndexType) Set(v string) error { } } +// Values returns all possible values of VectorIndexType. +// +// There is no guarantee on the order of the values in the slice. +func (f *VectorIndexType) Values() []VectorIndexType { + return []VectorIndexType{ + VectorIndexTypeDeltaSync, + VectorIndexTypeDirectAccess, + } +} + // Type always returns VectorIndexType to satisfy [pflag.Value] interface func (f *VectorIndexType) Type() string { return "VectorIndexType" diff --git a/service/workspace/interface.go b/service/workspace/interface.go index 022dc43fa..c38ef7c8e 100755 --- a/service/workspace/interface.go +++ b/service/workspace/interface.go @@ -11,6 +11,8 @@ import ( // // See [more info]. // +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. +// // [more info]: https://docs.databricks.com/repos/get-access-tokens-from-git-provider.html type GitCredentialsService interface { @@ -36,8 +38,6 @@ type GitCredentialsService interface { // // Lists the calling user's Git credentials. One credential per user is // supported. - // - // Use ListAll() to get all CredentialInfo instances List(ctx context.Context) (*ListCredentialsResponse, error) // Update a credential. @@ -56,6 +56,8 @@ type GitCredentialsService interface { // Within Repos you can develop code in notebooks or other files and follow data // science and engineering code development best practices using Git for version // control, collaboration, and CI/CD. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type ReposService interface { // Create a repo. @@ -90,8 +92,6 @@ type ReposService interface { // // Returns repos that the calling user has Manage permissions on. Use // `next_page_token` to iterate through additional pages. - // - // Use ListAll() to get all RepoInfo instances, which will iterate over every result page. List(ctx context.Context, request ListReposRequest) (*ListReposResponse, error) // Set repo permissions. @@ -126,6 +126,8 @@ type ReposService interface { // Databricks secrets. While Databricks makes an effort to redact secret values // that might be displayed in notebooks, it is not possible to prevent such // users from reading secrets. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type SecretsService interface { // Create a new secret scope. @@ -197,8 +199,6 @@ type SecretsService interface { // Throws `RESOURCE_DOES_NOT_EXIST` if no such secret scope exists. Throws // `PERMISSION_DENIED` if the user does not have permission to make this API // call. - // - // Use ListAclsAll() to get all AclItem instances ListAcls(ctx context.Context, request ListAclsRequest) (*ListAclsResponse, error) // List all scopes. @@ -207,8 +207,6 @@ type SecretsService interface { // // Throws `PERMISSION_DENIED` if the user does not have permission to make // this API call. - // - // Use ListScopesAll() to get all SecretScope instances ListScopes(ctx context.Context) (*ListScopesResponse, error) // List secret keys. @@ -221,8 +219,6 @@ type SecretsService interface { // `RESOURCE_DOES_NOT_EXIST` if no such secret scope exists. Throws // `PERMISSION_DENIED` if the user does not have permission to make this API // call. - // - // Use ListSecretsAll() to get all SecretMetadata instances ListSecrets(ctx context.Context, request ListSecretsRequest) (*ListSecretsResponse, error) // Create/update an ACL. @@ -286,6 +282,8 @@ type SecretsService interface { // // A notebook is a web-based interface to a document that contains runnable // code, visualizations, and explanatory text. +// +// Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type WorkspaceService interface { // Delete a workspace object. @@ -344,8 +342,6 @@ type WorkspaceService interface { // Lists the contents of a directory, or the object if it is not a // directory. If the input path does not exist, this call returns an error // `RESOURCE_DOES_NOT_EXIST`. - // - // Use ListAll() to get all ObjectInfo instances List(ctx context.Context, request ListWorkspaceRequest) (*ListResponse, error) // Create a directory. diff --git a/service/workspace/model.go b/service/workspace/model.go index 82e7bad67..31202a995 100755 --- a/service/workspace/model.go +++ b/service/workspace/model.go @@ -39,6 +39,17 @@ func (f *AclPermission) Set(v string) error { } } +// Values returns all possible values of AclPermission. +// +// There is no guarantee on the order of the values in the slice. +func (f *AclPermission) Values() []AclPermission { + return []AclPermission{ + AclPermissionManage, + AclPermissionRead, + AclPermissionWrite, + } +} + // Type always returns AclPermission to satisfy [pflag.Value] interface func (f *AclPermission) Type() string { return "AclPermission" @@ -307,6 +318,21 @@ func (f *ExportFormat) Set(v string) error { } } +// Values returns all possible values of ExportFormat. +// +// There is no guarantee on the order of the values in the slice. +func (f *ExportFormat) Values() []ExportFormat { + return []ExportFormat{ + ExportFormatAuto, + ExportFormatDbc, + ExportFormatHtml, + ExportFormatJupyter, + ExportFormatRaw, + ExportFormatRMarkdown, + ExportFormatSource, + } +} + // Type always returns ExportFormat to satisfy [pflag.Value] interface func (f *ExportFormat) Type() string { return "ExportFormat" @@ -566,6 +592,21 @@ func (f *ImportFormat) Set(v string) error { } } +// Values returns all possible values of ImportFormat. +// +// There is no guarantee on the order of the values in the slice. +func (f *ImportFormat) Values() []ImportFormat { + return []ImportFormat{ + ImportFormatAuto, + ImportFormatDbc, + ImportFormatHtml, + ImportFormatJupyter, + ImportFormatRaw, + ImportFormatRMarkdown, + ImportFormatSource, + } +} + // Type always returns ImportFormat to satisfy [pflag.Value] interface func (f *ImportFormat) Type() string { return "ImportFormat" @@ -601,6 +642,18 @@ func (f *Language) Set(v string) error { } } +// Values returns all possible values of Language. +// +// There is no guarantee on the order of the values in the slice. +func (f *Language) Values() []Language { + return []Language{ + LanguagePython, + LanguageR, + LanguageScala, + LanguageSql, + } +} + // Type always returns Language to satisfy [pflag.Value] interface func (f *Language) Type() string { return "Language" @@ -779,6 +832,20 @@ func (f *ObjectType) Set(v string) error { } } +// Values returns all possible values of ObjectType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ObjectType) Values() []ObjectType { + return []ObjectType{ + ObjectTypeDashboard, + ObjectTypeDirectory, + ObjectTypeFile, + ObjectTypeLibrary, + ObjectTypeNotebook, + ObjectTypeRepo, + } +} + // Type always returns ObjectType to satisfy [pflag.Value] interface func (f *ObjectType) Type() string { return "ObjectType" @@ -937,6 +1004,18 @@ func (f *RepoPermissionLevel) Set(v string) error { } } +// Values returns all possible values of RepoPermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *RepoPermissionLevel) Values() []RepoPermissionLevel { + return []RepoPermissionLevel{ + RepoPermissionLevelCanEdit, + RepoPermissionLevelCanManage, + RepoPermissionLevelCanRead, + RepoPermissionLevelCanRun, + } +} + // Type always returns RepoPermissionLevel to satisfy [pflag.Value] interface func (f *RepoPermissionLevel) Type() string { return "RepoPermissionLevel" @@ -1004,6 +1083,16 @@ func (f *ScopeBackendType) Set(v string) error { } } +// Values returns all possible values of ScopeBackendType. +// +// There is no guarantee on the order of the values in the slice. +func (f *ScopeBackendType) Values() []ScopeBackendType { + return []ScopeBackendType{ + ScopeBackendTypeAzureKeyvault, + ScopeBackendTypeDatabricks, + } +} + // Type always returns ScopeBackendType to satisfy [pflag.Value] interface func (f *ScopeBackendType) Type() string { return "ScopeBackendType" @@ -1217,6 +1306,18 @@ func (f *WorkspaceObjectPermissionLevel) Set(v string) error { } } +// Values returns all possible values of WorkspaceObjectPermissionLevel. +// +// There is no guarantee on the order of the values in the slice. +func (f *WorkspaceObjectPermissionLevel) Values() []WorkspaceObjectPermissionLevel { + return []WorkspaceObjectPermissionLevel{ + WorkspaceObjectPermissionLevelCanEdit, + WorkspaceObjectPermissionLevelCanManage, + WorkspaceObjectPermissionLevelCanRead, + WorkspaceObjectPermissionLevelCanRun, + } +} + // Type always returns WorkspaceObjectPermissionLevel to satisfy [pflag.Value] interface func (f *WorkspaceObjectPermissionLevel) Type() string { return "WorkspaceObjectPermissionLevel" From f9774a9402a677f57a26cfa6c1041356d08c828e Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 3 Jun 2025 14:55:17 +0000 Subject: [PATCH 2/2] Update changelogs --- NEXT_CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index f7c830eeb..50d76d465 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -4,6 +4,9 @@ ### New Features and Improvements +- Enums now have a `Values` function that returns the list of all possible + enum values ([PR #1228](https://github.com/databricks/databricks-sdk-go/pull/1228)) + ### Bug Fixes ### Documentation