diff --git a/apps/v2/model.go b/apps/v2/model.go index 5e5ac380a..df31bea1e 100755 --- a/apps/v2/model.go +++ b/apps/v2/model.go @@ -15,6 +15,8 @@ type App struct { AppStatus *ApplicationStatus `json:"app_status,omitempty"` + BudgetPolicyId string `json:"budget_policy_id,omitempty"` + ComputeStatus *ComputeStatus `json:"compute_status,omitempty"` // The creation time of the app. Formatted timestamp in ISO 6801. CreateTime string `json:"create_time,omitempty"` @@ -26,6 +28,8 @@ type App struct { DefaultSourceCodePath string `json:"default_source_code_path,omitempty"` // The description of the app. Description string `json:"description,omitempty"` + + EffectiveBudgetPolicyId string `json:"effective_budget_policy_id,omitempty"` // The unique identifier of the app. Id string `json:"id,omitempty"` // The name of the app. The name must contain only lowercase alphanumeric @@ -49,7 +53,7 @@ type App struct { // The URL of the app once it is deployed. Url string `json:"url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *App) UnmarshalJSON(b []byte) error { @@ -70,7 +74,7 @@ type AppAccessControlRequest struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AppAccessControlRequest) UnmarshalJSON(b []byte) error { @@ -93,7 +97,7 @@ type AppAccessControlResponse struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AppAccessControlResponse) UnmarshalJSON(b []byte) error { @@ -128,7 +132,7 @@ type AppDeployment struct { // The update time of the deployment. Formatted timestamp in ISO 6801. UpdateTime string `json:"update_time,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AppDeployment) UnmarshalJSON(b []byte) error { @@ -144,7 +148,7 @@ type AppDeploymentArtifacts struct { // the deployed app. SourceCodePath string `json:"source_code_path,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AppDeploymentArtifacts) UnmarshalJSON(b []byte) error { @@ -219,7 +223,7 @@ type AppDeploymentStatus struct { // State of the deployment. State AppDeploymentState `json:"state,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AppDeploymentStatus) UnmarshalJSON(b []byte) error { @@ -237,7 +241,7 @@ type AppPermission struct { // Permission level PermissionLevel AppPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AppPermission) UnmarshalJSON(b []byte) error { @@ -283,7 +287,7 @@ type AppPermissions struct { ObjectType string `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AppPermissions) UnmarshalJSON(b []byte) error { @@ -299,7 +303,7 @@ type AppPermissionsDescription struct { // Permission level PermissionLevel AppPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AppPermissionsDescription) UnmarshalJSON(b []byte) error { @@ -330,7 +334,7 @@ type AppResource struct { SqlWarehouse *AppResourceSqlWarehouse `json:"sql_warehouse,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AppResource) UnmarshalJSON(b []byte) error { @@ -532,7 +536,7 @@ type ApplicationStatus struct { // State of the application. State ApplicationState `json:"state,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ApplicationStatus) UnmarshalJSON(b []byte) error { @@ -586,7 +590,7 @@ type ComputeStatus struct { // State of the app compute. State ComputeState `json:"state,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ComputeStatus) UnmarshalJSON(b []byte) error { @@ -610,7 +614,7 @@ type CreateAppRequest struct { // If true, the app will not be started after creation. NoCompute bool `json:"-" url:"no_compute,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateAppRequest) UnmarshalJSON(b []byte) error { @@ -668,7 +672,7 @@ type ListAppDeploymentsRequest struct { // absent. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAppDeploymentsRequest) UnmarshalJSON(b []byte) error { @@ -685,7 +689,7 @@ type ListAppDeploymentsResponse struct { // Pagination token to request the next page of apps. NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAppDeploymentsResponse) UnmarshalJSON(b []byte) error { @@ -704,7 +708,7 @@ type ListAppsRequest struct { // absent. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAppsRequest) UnmarshalJSON(b []byte) error { @@ -720,7 +724,7 @@ type ListAppsResponse struct { // Pagination token to request the next page of apps. NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAppsResponse) UnmarshalJSON(b []byte) error { diff --git a/billing/v2/model.go b/billing/v2/model.go index 11aaed236..ef51b0b03 100755 --- a/billing/v2/model.go +++ b/billing/v2/model.go @@ -17,7 +17,7 @@ type ActionConfiguration struct { // Target for the action. For example, an email address. Target string `json:"target,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ActionConfiguration) UnmarshalJSON(b []byte) error { @@ -71,7 +71,7 @@ type AlertConfiguration struct { // triggered state. TriggerType AlertConfigurationTriggerType `json:"trigger_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AlertConfiguration) UnmarshalJSON(b []byte) error { @@ -177,7 +177,7 @@ type BudgetConfiguration struct { // Update time of this budget configuration. UpdateTime int64 `json:"update_time,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *BudgetConfiguration) UnmarshalJSON(b []byte) error { @@ -233,7 +233,7 @@ type BudgetConfigurationFilterTagClause struct { Value *BudgetConfigurationFilterClause `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *BudgetConfigurationFilterTagClause) UnmarshalJSON(b []byte) error { @@ -257,12 +257,12 @@ type BudgetPolicy struct { CustomTags []CustomPolicyTag `json:"custom_tags,omitempty"` // The Id of the policy. This field is generated by Databricks and globally // unique. - PolicyId string `json:"policy_id"` + PolicyId string `json:"policy_id,omitempty"` // The name of the policy. - Must be unique among active policies. - Can // contain only characters from the ISO 8859-1 (latin1) set. PolicyName string `json:"policy_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *BudgetPolicy) UnmarshalJSON(b []byte) error { @@ -282,7 +282,7 @@ type CreateBillingUsageDashboardRequest struct { // created. WorkspaceId int64 `json:"workspace_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateBillingUsageDashboardRequest) UnmarshalJSON(b []byte) error { @@ -297,7 +297,7 @@ type CreateBillingUsageDashboardResponse struct { // The unique id of the usage dashboard. DashboardId string `json:"dashboard_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateBillingUsageDashboardResponse) UnmarshalJSON(b []byte) error { @@ -322,7 +322,7 @@ type CreateBudgetConfigurationBudget struct { // matched for usage to be included. Filter *BudgetConfigurationFilter `json:"filter,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateBudgetConfigurationBudget) UnmarshalJSON(b []byte) error { @@ -339,7 +339,7 @@ type CreateBudgetConfigurationBudgetActionConfigurations struct { // Target for the action. For example, an email address. Target string `json:"target,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateBudgetConfigurationBudgetActionConfigurations) UnmarshalJSON(b []byte) error { @@ -366,7 +366,7 @@ type CreateBudgetConfigurationBudgetAlertConfigurations struct { // triggered state. TriggerType AlertConfigurationTriggerType `json:"trigger_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateBudgetConfigurationBudgetAlertConfigurations) UnmarshalJSON(b []byte) error { @@ -389,19 +389,16 @@ type CreateBudgetConfigurationResponse struct { // A request to create a BudgetPolicy. type CreateBudgetPolicyRequest struct { - // A list of tags defined by the customer. At most 40 entries are allowed - // per policy. - CustomTags []CustomPolicyTag `json:"custom_tags,omitempty"` - // The name of the policy. - Must be unique among active policies. - Can - // contain only characters of 0-9, a-z, A-Z, -, =, ., :, /, @, _, +, - // whitespace. - PolicyName string `json:"policy_name,omitempty"` + // The policy to create. `policy_id` needs to be empty as it will be + // generated `policy_name` must be provided, custom_tags may need to be + // provided depending on the cloud provider. All other fields are optional. + Policy *BudgetPolicy `json:"policy,omitempty"` // A unique identifier for this request. Restricted to 36 ASCII characters. // A random UUID is recommended. This request is only idempotent if a // `request_id` is provided. RequestId string `json:"request_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateBudgetPolicyRequest) UnmarshalJSON(b []byte) error { @@ -483,7 +480,7 @@ type CreateLogDeliveryConfigurationParams struct { // unnecessary. WorkspaceIdsFilter []int64 `json:"workspace_ids_filter,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateLogDeliveryConfigurationParams) UnmarshalJSON(b []byte) error { @@ -510,7 +507,7 @@ type CustomPolicyTag struct { // (https://src.dev.databricks.com/databricks/universe@1647196627c8dc7b4152ad098a94b86484b93a6c/-/blob/cluster-common/conf/src/ClusterTagConstraints.scala?L24) Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CustomPolicyTag) UnmarshalJSON(b []byte) error { @@ -602,7 +599,7 @@ type DownloadRequest struct { // field is required. StartMonth string `json:"-" url:"start_month"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DownloadRequest) UnmarshalJSON(b []byte) error { @@ -630,7 +627,7 @@ type Filter struct { // policies will be returned. PolicyName string `json:"policy_name,omitempty" url:"policy_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Filter) UnmarshalJSON(b []byte) error { @@ -651,7 +648,7 @@ type GetBillingUsageDashboardRequest struct { // created. WorkspaceId int64 `json:"-" url:"workspace_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetBillingUsageDashboardRequest) UnmarshalJSON(b []byte) error { @@ -668,7 +665,7 @@ type GetBillingUsageDashboardResponse struct { // The URL of the usage dashboard. DashboardUrl string `json:"dashboard_url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetBillingUsageDashboardResponse) UnmarshalJSON(b []byte) error { @@ -713,7 +710,7 @@ type ListBudgetConfigurationsRequest struct { // page if absent. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListBudgetConfigurationsRequest) UnmarshalJSON(b []byte) error { @@ -730,7 +727,7 @@ type ListBudgetConfigurationsResponse struct { // results. If this field is omitted, there are no subsequent budgets. NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListBudgetConfigurationsResponse) UnmarshalJSON(b []byte) error { @@ -760,7 +757,7 @@ type ListBudgetPoliciesRequest struct { // The sort specification. SortSpec *SortSpec `json:"-" url:"sort_spec,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListBudgetPoliciesRequest) UnmarshalJSON(b []byte) error { @@ -782,7 +779,7 @@ type ListBudgetPoliciesResponse struct { // In this field is omitted, there are no previous pages. PreviousPageToken string `json:"previous_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListBudgetPoliciesResponse) UnmarshalJSON(b []byte) error { @@ -802,7 +799,7 @@ type ListLogDeliveryRequest struct { // Filter by storage configuration ID. StorageConfigurationId string `json:"-" url:"storage_configuration_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListLogDeliveryRequest) UnmarshalJSON(b []byte) error { @@ -928,7 +925,7 @@ type LogDeliveryConfiguration struct { // unnecessary. WorkspaceIdsFilter []int64 `json:"workspace_ids_filter,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *LogDeliveryConfiguration) UnmarshalJSON(b []byte) error { @@ -961,7 +958,7 @@ type LogDeliveryStatus struct { // the account. Status DeliveryStatus `json:"status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *LogDeliveryStatus) UnmarshalJSON(b []byte) error { @@ -1057,7 +1054,7 @@ type SortSpec struct { // The filed to sort by Field SortSpecField `json:"field,omitempty" url:"field,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SortSpec) UnmarshalJSON(b []byte) error { @@ -1109,7 +1106,7 @@ type UpdateBudgetConfigurationBudget struct { // matched for usage to be included. Filter *BudgetConfigurationFilter `json:"filter,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateBudgetConfigurationBudget) UnmarshalJSON(b []byte) error { diff --git a/catalog/v2/model.go b/catalog/v2/model.go index 942162c2d..8c9ff861b 100755 --- a/catalog/v2/model.go +++ b/catalog/v2/model.go @@ -71,7 +71,7 @@ type ArtifactAllowlistInfo struct { // Unique identifier of parent metastore. MetastoreId string `json:"metastore_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ArtifactAllowlistInfo) UnmarshalJSON(b []byte) error { @@ -136,7 +136,7 @@ type AwsCredentials struct { // credentials. SessionToken string `json:"session_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AwsCredentials) UnmarshalJSON(b []byte) error { @@ -159,7 +159,7 @@ type AwsIamRole struct { // This is the identity that is going to assume the AWS IAM role. UnityCatalogIamArn string `json:"unity_catalog_iam_arn,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AwsIamRole) UnmarshalJSON(b []byte) error { @@ -185,7 +185,7 @@ type AwsIamRoleResponse struct { // This is the identity that is going to assume the AWS IAM role. UnityCatalogIamArn string `json:"unity_catalog_iam_arn,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AwsIamRoleResponse) UnmarshalJSON(b []byte) error { @@ -204,7 +204,7 @@ type AzureActiveDirectoryToken struct { // Directory to access cloud services. AadToken string `json:"aad_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AzureActiveDirectoryToken) UnmarshalJSON(b []byte) error { @@ -234,7 +234,7 @@ type AzureManagedIdentity struct { // using the system-assigned identity. ManagedIdentityId string `json:"managed_identity_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AzureManagedIdentity) UnmarshalJSON(b []byte) error { @@ -258,7 +258,7 @@ type AzureManagedIdentityRequest struct { // for a system-assigned identity. ManagedIdentityId string `json:"managed_identity_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AzureManagedIdentityRequest) UnmarshalJSON(b []byte) error { @@ -284,7 +284,7 @@ type AzureManagedIdentityResponse struct { // for a system-assigned identity. ManagedIdentityId string `json:"managed_identity_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AzureManagedIdentityResponse) UnmarshalJSON(b []byte) error { @@ -314,7 +314,7 @@ type AzureUserDelegationSas struct { // The signed URI (SAS Token) used to access blob services for a given path SasToken string `json:"sas_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AzureUserDelegationSas) UnmarshalJSON(b []byte) error { @@ -391,7 +391,7 @@ type CatalogInfo struct { // Username of user who last modified catalog. UpdatedBy string `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CatalogInfo) UnmarshalJSON(b []byte) error { @@ -496,7 +496,7 @@ type ColumnInfo struct { // Full data type specification as SQL/catalogString text. TypeText string `json:"type_text,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ColumnInfo) UnmarshalJSON(b []byte) error { @@ -516,7 +516,7 @@ type ColumnMask struct { // match the types of columns in 'using_column_names'. UsingColumnNames []string `json:"using_column_names,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ColumnMask) UnmarshalJSON(b []byte) error { @@ -633,7 +633,7 @@ type ConnectionInfo struct { // URL of the remote data source, extracted from options. Url string `json:"url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ConnectionInfo) UnmarshalJSON(b []byte) error { @@ -659,6 +659,8 @@ const ConnectionTypeHttp ConnectionType = `HTTP` const ConnectionTypeMysql ConnectionType = `MYSQL` +const ConnectionTypeOracle ConnectionType = `ORACLE` + const ConnectionTypePostgresql ConnectionType = `POSTGRESQL` const ConnectionTypeRedshift ConnectionType = `REDSHIFT` @@ -669,6 +671,8 @@ const ConnectionTypeSqldw ConnectionType = `SQLDW` const ConnectionTypeSqlserver ConnectionType = `SQLSERVER` +const ConnectionTypeTeradata ConnectionType = `TERADATA` + // String representation for [fmt.Print] func (f *ConnectionType) String() string { return string(*f) @@ -677,11 +681,11 @@ func (f *ConnectionType) String() string { // Set raw string value and validate it against allowed values func (f *ConnectionType) Set(v string) error { switch v { - case `BIGQUERY`, `DATABRICKS`, `GLUE`, `HIVE_METASTORE`, `HTTP`, `MYSQL`, `POSTGRESQL`, `REDSHIFT`, `SNOWFLAKE`, `SQLDW`, `SQLSERVER`: + case `BIGQUERY`, `DATABRICKS`, `GLUE`, `HIVE_METASTORE`, `HTTP`, `MYSQL`, `ORACLE`, `POSTGRESQL`, `REDSHIFT`, `SNOWFLAKE`, `SQLDW`, `SQLSERVER`, `TERADATA`: *f = ConnectionType(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "BIGQUERY", "DATABRICKS", "GLUE", "HIVE_METASTORE", "HTTP", "MYSQL", "POSTGRESQL", "REDSHIFT", "SNOWFLAKE", "SQLDW", "SQLSERVER"`, v) + return fmt.Errorf(`value "%s" is not one of "BIGQUERY", "DATABRICKS", "GLUE", "HIVE_METASTORE", "HTTP", "MYSQL", "ORACLE", "POSTGRESQL", "REDSHIFT", "SNOWFLAKE", "SQLDW", "SQLSERVER", "TERADATA"`, v) } } @@ -703,7 +707,7 @@ type ContinuousUpdateStatus struct { // table to the online table. Timestamp string `json:"timestamp,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ContinuousUpdateStatus) UnmarshalJSON(b []byte) error { @@ -735,7 +739,7 @@ type CreateCatalog struct { // Storage root URL for managed tables within catalog. StorageRoot string `json:"storage_root,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateCatalog) UnmarshalJSON(b []byte) error { @@ -761,7 +765,7 @@ type CreateConnection struct { // If the connection is read only. ReadOnly bool `json:"read_only,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateConnection) UnmarshalJSON(b []byte) error { @@ -797,7 +801,7 @@ type CreateCredentialRequest struct { // set of credentials. SkipValidation bool `json:"skip_validation,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateCredentialRequest) UnmarshalJSON(b []byte) error { @@ -831,7 +835,7 @@ type CreateExternalLocation struct { // Path URL of the external location. Url string `json:"url"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateExternalLocation) UnmarshalJSON(b []byte) error { @@ -890,7 +894,7 @@ type CreateFunction struct { // List of schemes whose objects can be referenced without qualification. SqlPath string `json:"sql_path,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateFunction) UnmarshalJSON(b []byte) error { @@ -1030,7 +1034,7 @@ type CreateMetastore struct { // The storage root URL for metastore StorageRoot string `json:"storage_root,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateMetastore) UnmarshalJSON(b []byte) error { @@ -1092,7 +1096,7 @@ type CreateMonitor struct { // specified, the first running warehouse will be used. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateMonitor) UnmarshalJSON(b []byte) error { @@ -1122,7 +1126,7 @@ type CreateRegisteredModelRequest struct { // are stored StorageLocation string `json:"storage_location,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateRegisteredModelRequest) UnmarshalJSON(b []byte) error { @@ -1148,7 +1152,7 @@ type CreateSchema struct { // Storage root URL for managed tables within schema. StorageRoot string `json:"storage_root,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateSchema) UnmarshalJSON(b []byte) error { @@ -1180,7 +1184,7 @@ type CreateStorageCredential struct { // credential. SkipValidation bool `json:"skip_validation,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateStorageCredential) UnmarshalJSON(b []byte) error { @@ -1214,7 +1218,7 @@ type CreateVolumeRequestContent struct { VolumeType VolumeType `json:"volume_type"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateVolumeRequestContent) UnmarshalJSON(b []byte) error { @@ -1269,7 +1273,7 @@ type CredentialInfo struct { // credential. Only applicable when purpose is **STORAGE**. UsedForManagedStorage bool `json:"used_for_managed_storage,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CredentialInfo) UnmarshalJSON(b []byte) error { @@ -1341,7 +1345,7 @@ type CredentialValidationResult struct { // The results of the tested operation. Result ValidateCredentialResult `json:"result,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CredentialValidationResult) UnmarshalJSON(b []byte) error { @@ -1441,7 +1445,7 @@ type DatabricksGcpServiceAccount struct { // The ID that represents the private key for this Service Account PrivateKeyId string `json:"private_key_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DatabricksGcpServiceAccount) UnmarshalJSON(b []byte) error { @@ -1462,7 +1466,7 @@ type DatabricksGcpServiceAccountResponse struct { // The email of the service account. This is an output-only field. Email string `json:"email,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DatabricksGcpServiceAccountResponse) UnmarshalJSON(b []byte) error { @@ -1488,7 +1492,7 @@ type DeleteAccountMetastoreRequest struct { // Unity Catalog metastore ID MetastoreId string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteAccountMetastoreRequest) UnmarshalJSON(b []byte) error { @@ -1509,7 +1513,7 @@ type DeleteAccountStorageCredentialRequest struct { // Name of the storage credential. StorageCredentialName string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteAccountStorageCredentialRequest) UnmarshalJSON(b []byte) error { @@ -1538,7 +1542,7 @@ type DeleteCatalogRequest struct { // The name of the catalog. Name string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteCatalogRequest) UnmarshalJSON(b []byte) error { @@ -1564,7 +1568,7 @@ type DeleteCredentialRequest struct { // Name of the credential. NameArg string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteCredentialRequest) UnmarshalJSON(b []byte) error { @@ -1585,7 +1589,7 @@ type DeleteExternalLocationRequest struct { // Name of the external location. Name string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteExternalLocationRequest) UnmarshalJSON(b []byte) error { @@ -1604,7 +1608,7 @@ type DeleteFunctionRequest struct { // __catalog_name__.__schema_name__.__function__name__). Name string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteFunctionRequest) UnmarshalJSON(b []byte) error { @@ -1622,7 +1626,7 @@ type DeleteMetastoreRequest struct { // Unique ID of the metastore. Id string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteMetastoreRequest) UnmarshalJSON(b []byte) error { @@ -1669,7 +1673,7 @@ type DeleteSchemaRequest struct { // Full name of the schema. FullName string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteSchemaRequest) UnmarshalJSON(b []byte) error { @@ -1688,7 +1692,7 @@ type DeleteStorageCredentialRequest struct { // Name of the storage credential. Name string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteStorageCredentialRequest) UnmarshalJSON(b []byte) error { @@ -1774,7 +1778,7 @@ type EffectivePredictiveOptimizationFlag struct { // objects under it. Value EnablePredictiveOptimization `json:"value"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EffectivePredictiveOptimizationFlag) UnmarshalJSON(b []byte) error { @@ -1826,7 +1830,7 @@ type EffectivePrivilege struct { // The privilege assigned to the principal. Privilege Privilege `json:"privilege,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EffectivePrivilege) UnmarshalJSON(b []byte) error { @@ -1844,7 +1848,7 @@ type EffectivePrivilegeAssignment struct { // inheritance). Privileges []EffectivePrivilege `json:"privileges,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EffectivePrivilegeAssignment) UnmarshalJSON(b []byte) error { @@ -1950,7 +1954,7 @@ type ExternalLocationInfo struct { // Path URL of the external location. Url string `json:"url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExternalLocationInfo) UnmarshalJSON(b []byte) error { @@ -1974,7 +1978,7 @@ type FailedStatus struct { // and available for serving. Timestamp string `json:"timestamp,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *FailedStatus) UnmarshalJSON(b []byte) error { @@ -2072,7 +2076,7 @@ type FunctionInfo struct { // Username of user who last modified function. UpdatedBy string `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *FunctionInfo) UnmarshalJSON(b []byte) error { @@ -2222,7 +2226,7 @@ type FunctionParameterInfo struct { // Full data type spec, SQL/catalogString text. TypeText string `json:"type_text"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *FunctionParameterInfo) UnmarshalJSON(b []byte) error { @@ -2298,7 +2302,7 @@ func (f *FunctionParameterType) Type() string { type GcpOauthToken struct { OauthToken string `json:"oauth_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GcpOauthToken) UnmarshalJSON(b []byte) error { @@ -2343,7 +2347,7 @@ type GenerateTemporaryTableCredentialRequest struct { // UUID of the table to read or write. TableId string `json:"table_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GenerateTemporaryTableCredentialRequest) UnmarshalJSON(b []byte) error { @@ -2377,7 +2381,7 @@ type GenerateTemporaryTableCredentialResponse struct { // The URL of the storage path accessible by the temporary credential. Url string `json:"url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GenerateTemporaryTableCredentialResponse) UnmarshalJSON(b []byte) error { @@ -2430,7 +2434,7 @@ type GetBindingsRequest struct { // The type of the securable to bind to a workspace. SecurableType GetBindingsSecurableType `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetBindingsRequest) UnmarshalJSON(b []byte) error { @@ -2482,7 +2486,7 @@ type GetByAliasRequest struct { // response IncludeAliases bool `json:"-" url:"include_aliases,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetByAliasRequest) UnmarshalJSON(b []byte) error { @@ -2501,7 +2505,7 @@ type GetCatalogRequest struct { // The name of the catalog. Name string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetCatalogRequest) UnmarshalJSON(b []byte) error { @@ -2534,7 +2538,7 @@ type GetEffectiveRequest struct { // Type of securable. SecurableType SecurableType `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetEffectiveRequest) UnmarshalJSON(b []byte) error { @@ -2553,7 +2557,7 @@ type GetExternalLocationRequest struct { // Name of the external location. Name string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetExternalLocationRequest) UnmarshalJSON(b []byte) error { @@ -2573,7 +2577,7 @@ type GetFunctionRequest struct { // __catalog_name__.__schema_name__.__function__name__). Name string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetFunctionRequest) UnmarshalJSON(b []byte) error { @@ -2594,7 +2598,7 @@ type GetGrantRequest struct { // Type of securable. SecurableType SecurableType `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetGrantRequest) UnmarshalJSON(b []byte) error { @@ -2655,7 +2659,7 @@ type GetMetastoreSummaryResponse struct { // Username of user who last modified the metastore. UpdatedBy string `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetMetastoreSummaryResponse) UnmarshalJSON(b []byte) error { @@ -2707,7 +2711,7 @@ type GetModelVersionRequest struct { // The integer version number of the model version Version int `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetModelVersionRequest) UnmarshalJSON(b []byte) error { @@ -2765,7 +2769,7 @@ type GetRegisteredModelRequest struct { // principal can only access selective metadata for IncludeBrowse bool `json:"-" url:"include_browse,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetRegisteredModelRequest) UnmarshalJSON(b []byte) error { @@ -2784,7 +2788,7 @@ type GetSchemaRequest struct { // only access selective metadata for IncludeBrowse bool `json:"-" url:"include_browse,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetSchemaRequest) UnmarshalJSON(b []byte) error { @@ -2813,7 +2817,7 @@ type GetTableRequest struct { // Whether to include a manifest containing capabilities the table has. IncludeManifestCapabilities bool `json:"-" url:"include_manifest_capabilities,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetTableRequest) UnmarshalJSON(b []byte) error { @@ -2897,7 +2901,7 @@ type ListCatalogsRequest struct { // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListCatalogsRequest) UnmarshalJSON(b []byte) error { @@ -2916,7 +2920,7 @@ type ListCatalogsResponse struct { // request (for the next page of results). NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListCatalogsResponse) UnmarshalJSON(b []byte) error { @@ -2939,7 +2943,7 @@ type ListConnectionsRequest struct { // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListConnectionsRequest) UnmarshalJSON(b []byte) error { @@ -2958,7 +2962,7 @@ type ListConnectionsResponse struct { // request (for the next page of results). NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListConnectionsResponse) UnmarshalJSON(b []byte) error { @@ -2982,7 +2986,7 @@ type ListCredentialsRequest struct { // Return only credentials for the specified purpose. Purpose CredentialPurpose `json:"-" url:"purpose,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListCredentialsRequest) UnmarshalJSON(b []byte) error { @@ -3000,7 +3004,7 @@ type ListCredentialsResponse struct { // request (for the next page of results). NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListCredentialsResponse) UnmarshalJSON(b []byte) error { @@ -3026,7 +3030,7 @@ type ListExternalLocationsRequest struct { // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListExternalLocationsRequest) UnmarshalJSON(b []byte) error { @@ -3045,7 +3049,7 @@ type ListExternalLocationsResponse struct { // request (for the next page of results). NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListExternalLocationsResponse) UnmarshalJSON(b []byte) error { @@ -3075,7 +3079,7 @@ type ListFunctionsRequest struct { // Parent schema of functions. SchemaName string `json:"-" url:"schema_name"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListFunctionsRequest) UnmarshalJSON(b []byte) error { @@ -3094,7 +3098,7 @@ type ListFunctionsResponse struct { // request (for the next page of results). NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListFunctionsResponse) UnmarshalJSON(b []byte) error { @@ -3129,7 +3133,7 @@ type ListModelVersionsRequest struct { // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListModelVersionsRequest) UnmarshalJSON(b []byte) error { @@ -3147,7 +3151,7 @@ type ListModelVersionsResponse struct { // request (for the next page of results). NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListModelVersionsResponse) UnmarshalJSON(b []byte) error { @@ -3165,7 +3169,7 @@ type ListQuotasRequest struct { // Opaque token for the next page of results. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListQuotasRequest) UnmarshalJSON(b []byte) error { @@ -3184,7 +3188,7 @@ type ListQuotasResponse struct { // An array of returned QuotaInfos. Quotas []QuotaInfo `json:"quotas,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListQuotasResponse) UnmarshalJSON(b []byte) error { @@ -3233,7 +3237,7 @@ type ListRegisteredModelsRequest struct { // specified, catalog_name must be specified. SchemaName string `json:"-" url:"schema_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListRegisteredModelsRequest) UnmarshalJSON(b []byte) error { @@ -3251,7 +3255,7 @@ type ListRegisteredModelsResponse struct { RegisteredModels []RegisteredModelInfo `json:"registered_models,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListRegisteredModelsResponse) UnmarshalJSON(b []byte) error { @@ -3279,7 +3283,7 @@ type ListSchemasRequest struct { // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListSchemasRequest) UnmarshalJSON(b []byte) error { @@ -3298,7 +3302,7 @@ type ListSchemasResponse struct { // An array of schema information objects. Schemas []SchemaInfo `json:"schemas,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListSchemasResponse) UnmarshalJSON(b []byte) error { @@ -3321,7 +3325,7 @@ type ListStorageCredentialsRequest struct { // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListStorageCredentialsRequest) UnmarshalJSON(b []byte) error { @@ -3340,7 +3344,7 @@ type ListStorageCredentialsResponse struct { StorageCredentials []StorageCredentialInfo `json:"storage_credentials,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListStorageCredentialsResponse) UnmarshalJSON(b []byte) error { @@ -3374,7 +3378,7 @@ type ListSummariesRequest struct { // if not set or empty. TableNamePattern string `json:"-" url:"table_name_pattern,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListSummariesRequest) UnmarshalJSON(b []byte) error { @@ -3399,7 +3403,7 @@ type ListSystemSchemasRequest struct { // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListSystemSchemasRequest) UnmarshalJSON(b []byte) error { @@ -3418,7 +3422,7 @@ type ListSystemSchemasResponse struct { // An array of system schema information objects. Schemas []SystemSchemaInfo `json:"schemas,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListSystemSchemasResponse) UnmarshalJSON(b []byte) error { @@ -3437,7 +3441,7 @@ type ListTableSummariesResponse struct { // List of table summaries. Tables []TableSummary `json:"tables,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListTableSummariesResponse) UnmarshalJSON(b []byte) error { @@ -3478,7 +3482,7 @@ type ListTablesRequest struct { // Parent schema of tables. SchemaName string `json:"-" url:"schema_name"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListTablesRequest) UnmarshalJSON(b []byte) error { @@ -3497,7 +3501,7 @@ type ListTablesResponse struct { // An array of table information objects. Tables []TableInfo `json:"tables,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListTablesResponse) UnmarshalJSON(b []byte) error { @@ -3534,7 +3538,7 @@ type ListVolumesRequest struct { // The identifier of the schema SchemaName string `json:"-" url:"schema_name"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListVolumesRequest) UnmarshalJSON(b []byte) error { @@ -3553,7 +3557,7 @@ type ListVolumesResponseContent struct { Volumes []VolumeInfo `json:"volumes,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListVolumesResponseContent) UnmarshalJSON(b []byte) error { @@ -3598,7 +3602,7 @@ type MetastoreAssignment struct { // The unique ID of the Databricks workspace. WorkspaceId int64 `json:"workspace_id"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MetastoreAssignment) UnmarshalJSON(b []byte) error { @@ -3653,7 +3657,7 @@ type MetastoreInfo struct { // Username of user who last modified the metastore. UpdatedBy string `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MetastoreInfo) UnmarshalJSON(b []byte) error { @@ -3744,7 +3748,7 @@ type ModelVersionInfo struct { // requests. Version int `json:"version,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ModelVersionInfo) UnmarshalJSON(b []byte) error { @@ -3832,7 +3836,7 @@ type MonitorDataClassificationConfig struct { // Whether data classification is enabled. Enabled bool `json:"enabled,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MonitorDataClassificationConfig) UnmarshalJSON(b []byte) error { @@ -3879,7 +3883,7 @@ type MonitorInferenceLog struct { // [function]: https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.to_timestamp.html TimestampCol string `json:"timestamp_col"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MonitorInferenceLog) UnmarshalJSON(b []byte) error { @@ -3970,7 +3974,7 @@ type MonitorInfo struct { // Configuration for monitoring time series tables. TimeSeries *MonitorTimeSeries `json:"time_series,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MonitorInfo) UnmarshalJSON(b []byte) error { @@ -4106,7 +4110,7 @@ type MonitorRefreshInfo struct { // The method by which the refresh was triggered. Trigger MonitorRefreshInfoTrigger `json:"trigger,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MonitorRefreshInfo) UnmarshalJSON(b []byte) error { @@ -4223,7 +4227,7 @@ type OnlineTable struct { // runs asynchronously). UnityCatalogProvisioningState ProvisioningInfoState `json:"unity_catalog_provisioning_state,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *OnlineTable) UnmarshalJSON(b []byte) error { @@ -4260,7 +4264,7 @@ type OnlineTableSpec struct { // key. TimeseriesKey string `json:"timeseries_key,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *OnlineTableSpec) UnmarshalJSON(b []byte) error { @@ -4343,7 +4347,7 @@ type OnlineTableStatus struct { // ONLINE_TRIGGERED_UPDATE or the ONLINE_NO_PENDING_UPDATE state. TriggeredUpdateStatus *TriggeredUpdateStatus `json:"triggered_update_status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *OnlineTableStatus) UnmarshalJSON(b []byte) error { @@ -4362,7 +4366,7 @@ type PermissionsChange struct { // The set of privileges to remove. Remove []Privilege `json:"remove,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PermissionsChange) UnmarshalJSON(b []byte) error { @@ -4393,7 +4397,7 @@ type PipelineProgress struct { // number may be an estimate. TotalRowCount int64 `json:"total_row_count,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PipelineProgress) UnmarshalJSON(b []byte) error { @@ -4530,7 +4534,7 @@ type PrivilegeAssignment struct { // The privileges assigned to the principal. Privileges []Privilege `json:"privileges,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PrivilegeAssignment) UnmarshalJSON(b []byte) error { @@ -4607,7 +4611,7 @@ type QuotaInfo struct { // The name of the quota. QuotaName string `json:"quota_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QuotaInfo) UnmarshalJSON(b []byte) error { @@ -4628,7 +4632,7 @@ type R2Credentials struct { // The generated JWT that users must pass to use the temporary credentials. SessionToken string `json:"session_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *R2Credentials) UnmarshalJSON(b []byte) error { @@ -4647,7 +4651,7 @@ type ReadVolumeRequest struct { // The three-level (fully qualified) name of the volume Name string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ReadVolumeRequest) UnmarshalJSON(b []byte) error { @@ -4665,7 +4669,7 @@ type RegenerateDashboardRequest struct { // not specified, the first running warehouse will be used. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RegenerateDashboardRequest) UnmarshalJSON(b []byte) error { @@ -4682,7 +4686,7 @@ type RegenerateDashboardResponse struct { // The directory where the regenerated dashboard is stored. ParentFolder string `json:"parent_folder,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RegenerateDashboardResponse) UnmarshalJSON(b []byte) error { @@ -4700,7 +4704,7 @@ type RegisteredModelAlias struct { // Integer version number of the model version to which this alias points. VersionNum int `json:"version_num,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RegisteredModelAlias) UnmarshalJSON(b []byte) error { @@ -4746,7 +4750,7 @@ type RegisteredModelInfo struct { // The identifier of the user who updated the registered model last time UpdatedBy string `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RegisteredModelInfo) UnmarshalJSON(b []byte) error { @@ -4804,7 +4808,7 @@ type SchemaInfo struct { // Username of user who last modified schema. UpdatedBy string `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SchemaInfo) UnmarshalJSON(b []byte) error { @@ -4899,7 +4903,7 @@ type SseEncryptionDetails struct { // key to use. AwsKmsKeyArn string `json:"aws_kms_key_arn,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SseEncryptionDetails) UnmarshalJSON(b []byte) error { @@ -4977,7 +4981,7 @@ type StorageCredentialInfo struct { // credential. UsedForManagedStorage bool `json:"used_for_managed_storage,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *StorageCredentialInfo) UnmarshalJSON(b []byte) error { @@ -4995,7 +4999,7 @@ type SystemSchemaInfo struct { // means the system schema is available and ready for opt-in. State SystemSchemaInfoState `json:"state,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SystemSchemaInfo) UnmarshalJSON(b []byte) error { @@ -5063,7 +5067,7 @@ type TableExistsResponse struct { // Whether the table exists or not. TableExists bool `json:"table_exists,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TableExistsResponse) UnmarshalJSON(b []byte) error { @@ -5153,7 +5157,7 @@ type TableInfo struct { // dependencies are provided and recorded. ViewDependencies *DependencyList `json:"view_dependencies,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TableInfo) UnmarshalJSON(b []byte) error { @@ -5206,7 +5210,7 @@ type TableSummary struct { TableType TableType `json:"table_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TableSummary) UnmarshalJSON(b []byte) error { @@ -5271,7 +5275,7 @@ type TemporaryCredentials struct { // https://developers.google.com/identity/protocols/oauth2/service-account GcpOauthToken *GcpOauthToken `json:"gcp_oauth_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TemporaryCredentials) UnmarshalJSON(b []byte) error { @@ -5295,7 +5299,7 @@ type TriggeredUpdateStatus struct { // Progress of the active data synchronization pipeline. TriggeredUpdateProgress *PipelineProgress `json:"triggered_update_progress,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TriggeredUpdateStatus) UnmarshalJSON(b []byte) error { @@ -5371,7 +5375,7 @@ type UpdateCatalog struct { // A map of key-value properties attached to the securable. Properties map[string]string `json:"properties,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateCatalog) UnmarshalJSON(b []byte) error { @@ -5392,7 +5396,7 @@ type UpdateConnection struct { // Username of current owner of the connection. Owner string `json:"owner,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateConnection) UnmarshalJSON(b []byte) error { @@ -5436,7 +5440,7 @@ type UpdateCredentialRequest struct { // credential. SkipValidation bool `json:"skip_validation,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateCredentialRequest) UnmarshalJSON(b []byte) error { @@ -5479,7 +5483,7 @@ type UpdateExternalLocation struct { // Path URL of the external location. Url string `json:"url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateExternalLocation) UnmarshalJSON(b []byte) error { @@ -5497,7 +5501,7 @@ type UpdateFunction struct { // Username of current owner of function. Owner string `json:"owner,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateFunction) UnmarshalJSON(b []byte) error { @@ -5528,7 +5532,7 @@ type UpdateMetastore struct { // UUID of storage credential to access the metastore storage_root. StorageRootCredentialId string `json:"storage_root_credential_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateMetastore) UnmarshalJSON(b []byte) error { @@ -5549,7 +5553,7 @@ type UpdateMetastoreAssignment struct { // A workspace ID. WorkspaceId int64 `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateMetastoreAssignment) UnmarshalJSON(b []byte) error { @@ -5596,7 +5600,7 @@ type UpdateModelVersionRequest struct { // The integer version number of the model version Version int `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateModelVersionRequest) UnmarshalJSON(b []byte) error { @@ -5642,7 +5646,7 @@ type UpdateMonitor struct { // Configuration for monitoring time series tables. TimeSeries *MonitorTimeSeries `json:"time_series,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateMonitor) UnmarshalJSON(b []byte) error { @@ -5672,7 +5676,7 @@ type UpdateRegisteredModelRequest struct { // The identifier of the user who owns the registered model Owner string `json:"owner,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateRegisteredModelRequest) UnmarshalJSON(b []byte) error { @@ -5701,7 +5705,7 @@ type UpdateSchema struct { // A map of key-value properties attached to the securable. Properties map[string]string `json:"properties,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateSchema) UnmarshalJSON(b []byte) error { @@ -5742,7 +5746,7 @@ type UpdateStorageCredential struct { // credential. SkipValidation bool `json:"skip_validation,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateStorageCredential) UnmarshalJSON(b []byte) error { @@ -5760,7 +5764,7 @@ type UpdateTableRequest struct { Owner string `json:"owner,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateTableRequest) UnmarshalJSON(b []byte) error { @@ -5781,7 +5785,7 @@ type UpdateVolumeRequestContent struct { // The identifier of the user who owns the volume Owner string `json:"owner,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateVolumeRequestContent) UnmarshalJSON(b []byte) error { @@ -5833,7 +5837,7 @@ type ValidateCredentialRequest struct { // **STORAGE**. Url string `json:"url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ValidateCredentialRequest) UnmarshalJSON(b []byte) error { @@ -5851,7 +5855,7 @@ type ValidateCredentialResponse struct { // The results of the validation check. Results []CredentialValidationResult `json:"results,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ValidateCredentialResponse) UnmarshalJSON(b []byte) error { @@ -5912,7 +5916,7 @@ type ValidateStorageCredential struct { // The external location url to validate. Url string `json:"url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ValidateStorageCredential) UnmarshalJSON(b []byte) error { @@ -5929,7 +5933,7 @@ type ValidateStorageCredentialResponse struct { // The results of the validation check. Results []ValidationResult `json:"results,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ValidateStorageCredentialResponse) UnmarshalJSON(b []byte) error { @@ -5948,7 +5952,7 @@ type ValidationResult struct { // The results of the tested operation. Result ValidationResultResult `json:"result,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ValidationResult) UnmarshalJSON(b []byte) error { @@ -6061,7 +6065,7 @@ type VolumeInfo struct { VolumeType VolumeType `json:"volume_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *VolumeInfo) UnmarshalJSON(b []byte) error { @@ -6104,7 +6108,7 @@ type WorkspaceBinding struct { WorkspaceId int64 `json:"workspace_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *WorkspaceBinding) UnmarshalJSON(b []byte) error { @@ -6151,7 +6155,7 @@ type WorkspaceBindingsResponse struct { // request (for the next page of results). NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *WorkspaceBindingsResponse) UnmarshalJSON(b []byte) error { diff --git a/cleanrooms/v2/model.go b/cleanrooms/v2/model.go index 116138f7d..fd07e6df1 100755 --- a/cleanrooms/v2/model.go +++ b/cleanrooms/v2/model.go @@ -40,7 +40,7 @@ type CleanRoom struct { // When the clean room was last updated, in epoch milliseconds. UpdatedAt int64 `json:"updated_at,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CleanRoom) UnmarshalJSON(b []byte) error { @@ -121,7 +121,7 @@ type CleanRoomAsset struct { // if and only if **asset_type** is **VOLUME** VolumeLocalDetails *CleanRoomAssetVolumeLocalDetails `json:"volume_local_details,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CleanRoomAsset) UnmarshalJSON(b []byte) error { @@ -175,7 +175,7 @@ type CleanRoomAssetForeignTableLocalDetails struct { // metastore, in the format of *catalog*.*schema*.*foreign_table_name* LocalName string `json:"local_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CleanRoomAssetForeignTableLocalDetails) UnmarshalJSON(b []byte) error { @@ -193,7 +193,7 @@ type CleanRoomAssetNotebook struct { // as returned by :method:workspace/export with the format of **HTML**. NotebookContent string `json:"notebook_content,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CleanRoomAssetNotebook) UnmarshalJSON(b []byte) error { @@ -243,9 +243,9 @@ type CleanRoomAssetTableLocalDetails struct { // the format of *catalog*.*schema*.*table_name* LocalName string `json:"local_name,omitempty"` // Partition filtering specification for a shared table. - Partitions []PartitionSpecificationPartition `json:"partitions,omitempty"` + Partitions []Partition `json:"partitions,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CleanRoomAssetTableLocalDetails) UnmarshalJSON(b []byte) error { @@ -266,7 +266,7 @@ type CleanRoomAssetViewLocalDetails struct { // the format of *catalog*.*schema*.*view_name* LocalName string `json:"local_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CleanRoomAssetViewLocalDetails) UnmarshalJSON(b []byte) error { @@ -282,7 +282,7 @@ type CleanRoomAssetVolumeLocalDetails struct { // the format of *catalog*.*schema*.*volume_name* LocalName string `json:"local_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CleanRoomAssetVolumeLocalDetails) UnmarshalJSON(b []byte) error { @@ -325,7 +325,7 @@ type CleanRoomCollaborator struct { // configured in the metastore OrganizationName string `json:"organization_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CleanRoomCollaborator) UnmarshalJSON(b []byte) error { @@ -358,7 +358,7 @@ type CleanRoomNotebookTaskRun struct { // When the task run started, in epoch milliseconds. StartTime int64 `json:"start_time,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CleanRoomNotebookTaskRun) UnmarshalJSON(b []byte) error { @@ -378,7 +378,7 @@ type CleanRoomOutputCatalog struct { Status CleanRoomOutputCatalogOutputCatalogStatus `json:"status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CleanRoomOutputCatalog) UnmarshalJSON(b []byte) error { @@ -442,7 +442,7 @@ type CleanRoomRemoteDetail struct { // Region of the central clean room. Region string `json:"region,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CleanRoomRemoteDetail) UnmarshalJSON(b []byte) error { @@ -602,7 +602,7 @@ type CollaboratorJobRunInfo struct { // ID of the collaborator's workspace that triggered the task run. CollaboratorWorkspaceId int64 `json:"collaborator_workspace_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CollaboratorJobRunInfo) UnmarshalJSON(b []byte) error { @@ -639,7 +639,7 @@ type ColumnInfo struct { // Full data type specification as SQL/catalogString text. TypeText string `json:"type_text,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ColumnInfo) UnmarshalJSON(b []byte) error { @@ -659,7 +659,7 @@ type ColumnMask struct { // match the types of columns in 'using_column_names'. UsingColumnNames []string `json:"using_column_names,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ColumnMask) UnmarshalJSON(b []byte) error { @@ -746,7 +746,7 @@ type ComplianceSecurityProfile struct { // Whether the compliance security profile is enabled. IsEnabled bool `json:"is_enabled,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ComplianceSecurityProfile) UnmarshalJSON(b []byte) error { @@ -894,7 +894,7 @@ type EgressNetworkPolicyInternetAccessPolicyInternetDestination struct { Type EgressNetworkPolicyInternetAccessPolicyInternetDestinationInternetDestinationType `json:"type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EgressNetworkPolicyInternetAccessPolicyInternetDestination) UnmarshalJSON(b []byte) error { @@ -1074,7 +1074,7 @@ type EgressNetworkPolicyInternetAccessPolicyStorageDestination struct { Type EgressNetworkPolicyInternetAccessPolicyStorageDestinationStorageDestinationType `json:"type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EgressNetworkPolicyInternetAccessPolicyStorageDestination) UnmarshalJSON(b []byte) error { @@ -1139,7 +1139,7 @@ type ListCleanRoomAssetsRequest struct { // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListCleanRoomAssetsRequest) UnmarshalJSON(b []byte) error { @@ -1158,7 +1158,7 @@ type ListCleanRoomAssetsResponse struct { // (for the next page of results). NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListCleanRoomAssetsResponse) UnmarshalJSON(b []byte) error { @@ -1180,7 +1180,7 @@ type ListCleanRoomNotebookTaskRunsRequest struct { // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListCleanRoomNotebookTaskRunsRequest) UnmarshalJSON(b []byte) error { @@ -1199,7 +1199,7 @@ type ListCleanRoomNotebookTaskRunsResponse struct { // Name of the clean room. Runs []CleanRoomNotebookTaskRun `json:"runs,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListCleanRoomNotebookTaskRunsResponse) UnmarshalJSON(b []byte) error { @@ -1218,7 +1218,7 @@ type ListCleanRoomsRequest struct { // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListCleanRoomsRequest) UnmarshalJSON(b []byte) error { @@ -1236,7 +1236,7 @@ type ListCleanRoomsResponse struct { // (for the next page of results). NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListCleanRoomsResponse) UnmarshalJSON(b []byte) error { @@ -1247,7 +1247,7 @@ func (s ListCleanRoomsResponse) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -type PartitionSpecificationPartition struct { +type Partition struct { // An array of partition values. Values []PartitionValue `json:"values,omitempty"` } @@ -1266,7 +1266,7 @@ type PartitionValue struct { // not be set. Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PartitionValue) UnmarshalJSON(b []byte) error { diff --git a/compute/v2/model.go b/compute/v2/model.go index a2cbbb831..711792546 100755 --- a/compute/v2/model.go +++ b/compute/v2/model.go @@ -36,7 +36,7 @@ type AddInstanceProfile struct { // forcibly add the instance profile. SkipValidation bool `json:"skip_validation,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AddInstanceProfile) UnmarshalJSON(b []byte) error { @@ -66,7 +66,7 @@ type AutoScale struct { // have after creation. MinWorkers int `json:"min_workers,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AutoScale) UnmarshalJSON(b []byte) error { @@ -162,7 +162,7 @@ type AwsAttributes struct { // as the default value can be found by using the `List Zones` method. ZoneId string `json:"zone_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AwsAttributes) UnmarshalJSON(b []byte) error { @@ -232,7 +232,7 @@ type AzureAttributes struct { // availability. Further, the value should > 0 or -1. SpotBidMaxPrice float64 `json:"spot_bid_max_price,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AzureAttributes) UnmarshalJSON(b []byte) error { @@ -282,7 +282,7 @@ type CancelCommand struct { ContextId string `json:"contextId,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CancelCommand) UnmarshalJSON(b []byte) error { @@ -312,7 +312,7 @@ type ClientsTypes struct { // With notebooks set, this cluster can be used for notebooks Notebooks bool `json:"notebooks,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClientsTypes) UnmarshalJSON(b []byte) error { @@ -369,7 +369,7 @@ type ClusterAccessControlRequest struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterAccessControlRequest) UnmarshalJSON(b []byte) error { @@ -392,7 +392,7 @@ type ClusterAccessControlResponse struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterAccessControlResponse) UnmarshalJSON(b []byte) error { @@ -439,7 +439,7 @@ type ClusterAttributes struct { // Data security mode decides what data governance model to use when // accessing data from a cluster. // - // The following modes can only be used with `kind`. * + // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate // access mode depending on your compute configuration. * // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * @@ -493,7 +493,7 @@ type ClusterAttributes struct { InitScripts []InitScriptInfo `json:"init_scripts,omitempty"` // The optional ID of the instance pool to which the cluster belongs. InstancePoolId string `json:"instance_pool_id,omitempty"` - // This field can only be used with `kind`. + // This field can only be used when `kind = CLASSIC_PREVIEW`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` @@ -503,8 +503,18 @@ type ClusterAttributes struct { // Depending on `kind`, different validations and default values will be // applied. // - // The first usage of this value is for the simple cluster form where it - // sets `kind = CLASSIC_PREVIEW`. + // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, + // whereas clusters with no specified `kind` do not. * + // [is_single_node](/api/workspace/clusters/create#is_single_node) * + // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * + // [data_security_mode](/api/workspace/clusters/create#data_security_mode) + // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or + // `DATA_SECURITY_MODE_STANDARD` + // + // By using the [simple form], your clusters are automatically using `kind = + // CLASSIC_PREVIEW`. + // + // [simple form]: https://docs.databricks.com/compute/simple-form.html Kind Kind `json:"kind,omitempty"` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can @@ -553,7 +563,7 @@ type ClusterAttributes struct { // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys []string `json:"ssh_public_keys,omitempty"` - // This field can only be used with `kind`. + // This field can only be used when `kind = CLASSIC_PREVIEW`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or @@ -562,7 +572,7 @@ type ClusterAttributes struct { WorkloadType *WorkloadType `json:"workload_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterAttributes) UnmarshalJSON(b []byte) error { @@ -585,7 +595,7 @@ type ClusterCompliance struct { // policy validation error. Violations map[string]string `json:"violations,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterCompliance) UnmarshalJSON(b []byte) error { @@ -654,7 +664,7 @@ type ClusterDetails struct { // Data security mode decides what data governance model to use when // accessing data from a cluster. // - // The following modes can only be used with `kind`. * + // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate // access mode depending on your compute configuration. * // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * @@ -727,7 +737,7 @@ type ClusterDetails struct { InitScripts []InitScriptInfo `json:"init_scripts,omitempty"` // The optional ID of the instance pool to which the cluster belongs. InstancePoolId string `json:"instance_pool_id,omitempty"` - // This field can only be used with `kind`. + // This field can only be used when `kind = CLASSIC_PREVIEW`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` @@ -740,8 +750,18 @@ type ClusterDetails struct { // Depending on `kind`, different validations and default values will be // applied. // - // The first usage of this value is for the simple cluster form where it - // sets `kind = CLASSIC_PREVIEW`. + // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, + // whereas clusters with no specified `kind` do not. * + // [is_single_node](/api/workspace/clusters/create#is_single_node) * + // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * + // [data_security_mode](/api/workspace/clusters/create#data_security_mode) + // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or + // `DATA_SECURITY_MODE_STANDARD` + // + // By using the [simple form], your clusters are automatically using `kind = + // CLASSIC_PREVIEW`. + // + // [simple form]: https://docs.databricks.com/compute/simple-form.html Kind Kind `json:"kind,omitempty"` // the timestamp that the cluster was started/restarted LastRestartedTime int64 `json:"last_restarted_time,omitempty"` @@ -829,7 +849,7 @@ type ClusterDetails struct { // Information about why the cluster was terminated. This field only appears // when the cluster is in a `TERMINATING` or `TERMINATED` state. TerminationReason *TerminationReason `json:"termination_reason,omitempty"` - // This field can only be used with `kind`. + // This field can only be used when `kind = CLASSIC_PREVIEW`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or @@ -838,7 +858,7 @@ type ClusterDetails struct { WorkloadType *WorkloadType `json:"workload_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterDetails) UnmarshalJSON(b []byte) error { @@ -863,7 +883,7 @@ type ClusterEvent struct { Type EventType `json:"type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterEvent) UnmarshalJSON(b []byte) error { @@ -880,7 +900,7 @@ type ClusterLibraryStatuses struct { // Status of all libraries on the cluster. LibraryStatuses []LibraryFullStatus `json:"library_statuses,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterLibraryStatuses) UnmarshalJSON(b []byte) error { @@ -913,7 +933,7 @@ type ClusterPermission struct { // Permission level PermissionLevel ClusterPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterPermission) UnmarshalJSON(b []byte) error { @@ -961,7 +981,7 @@ type ClusterPermissions struct { ObjectType string `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterPermissions) UnmarshalJSON(b []byte) error { @@ -977,7 +997,7 @@ type ClusterPermissionsDescription struct { // Permission level PermissionLevel ClusterPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterPermissionsDescription) UnmarshalJSON(b []byte) error { @@ -1004,7 +1024,7 @@ type ClusterPolicyAccessControlRequest struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterPolicyAccessControlRequest) UnmarshalJSON(b []byte) error { @@ -1027,7 +1047,7 @@ type ClusterPolicyAccessControlResponse struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterPolicyAccessControlResponse) UnmarshalJSON(b []byte) error { @@ -1045,7 +1065,7 @@ type ClusterPolicyPermission struct { // Permission level PermissionLevel ClusterPolicyPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterPolicyPermission) UnmarshalJSON(b []byte) error { @@ -1089,7 +1109,7 @@ type ClusterPolicyPermissions struct { ObjectType string `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterPolicyPermissions) UnmarshalJSON(b []byte) error { @@ -1105,7 +1125,7 @@ type ClusterPolicyPermissionsDescription struct { // Permission level PermissionLevel ClusterPolicyPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterPolicyPermissionsDescription) UnmarshalJSON(b []byte) error { @@ -1138,7 +1158,7 @@ type ClusterSettingsChange struct { // reading the settings field in the API response. PreviousValue string `json:"previous_value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterSettingsChange) UnmarshalJSON(b []byte) error { @@ -1166,7 +1186,7 @@ type ClusterSize struct { // increase from 5 to 10 as the new nodes are provisioned. NumWorkers int `json:"num_workers,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterSize) UnmarshalJSON(b []byte) error { @@ -1261,7 +1281,7 @@ type ClusterSpec struct { // Data security mode decides what data governance model to use when // accessing data from a cluster. // - // The following modes can only be used with `kind`. * + // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate // access mode depending on your compute configuration. * // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * @@ -1315,7 +1335,7 @@ type ClusterSpec struct { InitScripts []InitScriptInfo `json:"init_scripts,omitempty"` // The optional ID of the instance pool to which the cluster belongs. InstancePoolId string `json:"instance_pool_id,omitempty"` - // This field can only be used with `kind`. + // This field can only be used when `kind = CLASSIC_PREVIEW`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` @@ -1325,8 +1345,18 @@ type ClusterSpec struct { // Depending on `kind`, different validations and default values will be // applied. // - // The first usage of this value is for the simple cluster form where it - // sets `kind = CLASSIC_PREVIEW`. + // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, + // whereas clusters with no specified `kind` do not. * + // [is_single_node](/api/workspace/clusters/create#is_single_node) * + // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * + // [data_security_mode](/api/workspace/clusters/create#data_security_mode) + // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or + // `DATA_SECURITY_MODE_STANDARD` + // + // By using the [simple form], your clusters are automatically using `kind = + // CLASSIC_PREVIEW`. + // + // [simple form]: https://docs.databricks.com/compute/simple-form.html Kind Kind `json:"kind,omitempty"` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can @@ -1386,7 +1416,7 @@ type ClusterSpec struct { // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys []string `json:"ssh_public_keys,omitempty"` - // This field can only be used with `kind`. + // This field can only be used when `kind = CLASSIC_PREVIEW`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or @@ -1395,7 +1425,7 @@ type ClusterSpec struct { WorkloadType *WorkloadType `json:"workload_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterSpec) UnmarshalJSON(b []byte) error { @@ -1422,7 +1452,7 @@ type Command struct { Language Language `json:"language,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Command) UnmarshalJSON(b []byte) error { @@ -1484,7 +1514,7 @@ type CommandStatusResponse struct { Status CommandStatus `json:"status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CommandStatusResponse) UnmarshalJSON(b []byte) error { @@ -1536,7 +1566,7 @@ type ContextStatusResponse struct { Status ContextStatus `json:"status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ContextStatusResponse) UnmarshalJSON(b []byte) error { @@ -1594,7 +1624,7 @@ type CreateCluster struct { // Data security mode decides what data governance model to use when // accessing data from a cluster. // - // The following modes can only be used with `kind`. * + // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate // access mode depending on your compute configuration. * // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * @@ -1648,7 +1678,7 @@ type CreateCluster struct { InitScripts []InitScriptInfo `json:"init_scripts,omitempty"` // The optional ID of the instance pool to which the cluster belongs. InstancePoolId string `json:"instance_pool_id,omitempty"` - // This field can only be used with `kind`. + // This field can only be used when `kind = CLASSIC_PREVIEW`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` @@ -1658,8 +1688,18 @@ type CreateCluster struct { // Depending on `kind`, different validations and default values will be // applied. // - // The first usage of this value is for the simple cluster form where it - // sets `kind = CLASSIC_PREVIEW`. + // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, + // whereas clusters with no specified `kind` do not. * + // [is_single_node](/api/workspace/clusters/create#is_single_node) * + // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * + // [data_security_mode](/api/workspace/clusters/create#data_security_mode) + // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or + // `DATA_SECURITY_MODE_STANDARD` + // + // By using the [simple form], your clusters are automatically using `kind = + // CLASSIC_PREVIEW`. + // + // [simple form]: https://docs.databricks.com/compute/simple-form.html Kind Kind `json:"kind,omitempty"` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can @@ -1719,7 +1759,7 @@ type CreateCluster struct { // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys []string `json:"ssh_public_keys,omitempty"` - // This field can only be used with `kind`. + // This field can only be used when `kind = CLASSIC_PREVIEW`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or @@ -1728,7 +1768,7 @@ type CreateCluster struct { WorkloadType *WorkloadType `json:"workload_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateCluster) UnmarshalJSON(b []byte) error { @@ -1742,7 +1782,7 @@ func (s CreateCluster) MarshalJSON() ([]byte, error) { type CreateClusterResponse struct { ClusterId string `json:"cluster_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateClusterResponse) UnmarshalJSON(b []byte) error { @@ -1759,7 +1799,7 @@ type CreateContext struct { Language Language `json:"language,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateContext) UnmarshalJSON(b []byte) error { @@ -1826,7 +1866,7 @@ type CreateInstancePool struct { // :method:clusters/sparkVersions API call. PreloadedSparkVersions []string `json:"preloaded_spark_versions,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateInstancePool) UnmarshalJSON(b []byte) error { @@ -1841,7 +1881,7 @@ type CreateInstancePoolResponse struct { // The ID of the created instance pool. InstancePoolId string `json:"instance_pool_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateInstancePoolResponse) UnmarshalJSON(b []byte) error { @@ -1887,7 +1927,7 @@ type CreatePolicy struct { // definition. PolicyFamilyId string `json:"policy_family_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreatePolicy) UnmarshalJSON(b []byte) error { @@ -1902,7 +1942,7 @@ type CreatePolicyResponse struct { // Canonical unique identifier for the cluster policy. PolicyId string `json:"policy_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreatePolicyResponse) UnmarshalJSON(b []byte) error { @@ -1917,7 +1957,7 @@ type CreateResponse struct { // The global init script ID. ScriptId string `json:"script_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateResponse) UnmarshalJSON(b []byte) error { @@ -1931,7 +1971,7 @@ func (s CreateResponse) MarshalJSON() ([]byte, error) { type Created struct { Id string `json:"id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Created) UnmarshalJSON(b []byte) error { @@ -1952,7 +1992,7 @@ type DataPlaneEventDetails struct { // Timestamp int64 `json:"timestamp,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DataPlaneEventDetails) UnmarshalJSON(b []byte) error { @@ -1994,7 +2034,7 @@ func (f *DataPlaneEventDetailsEventType) Type() string { // Data security mode decides what data governance model to use when accessing // data from a cluster. // -// The following modes can only be used with `kind`. * +// The following modes can only be used when `kind = CLASSIC_PREVIEW`. * // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate access // mode depending on your compute configuration. * // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * @@ -2163,7 +2203,7 @@ type DiskSpec struct { // The type of disks that will be launched with this cluster. DiskType *DiskType `json:"disk_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DiskSpec) UnmarshalJSON(b []byte) error { @@ -2240,7 +2280,7 @@ type DockerBasicAuth struct { // Name of the user Username string `json:"username,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DockerBasicAuth) UnmarshalJSON(b []byte) error { @@ -2256,7 +2296,7 @@ type DockerImage struct { // URL of the docker image. Url string `json:"url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DockerImage) UnmarshalJSON(b []byte) error { @@ -2341,7 +2381,7 @@ type EditCluster struct { // Data security mode decides what data governance model to use when // accessing data from a cluster. // - // The following modes can only be used with `kind`. * + // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate // access mode depending on your compute configuration. * // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * @@ -2395,7 +2435,7 @@ type EditCluster struct { InitScripts []InitScriptInfo `json:"init_scripts,omitempty"` // The optional ID of the instance pool to which the cluster belongs. InstancePoolId string `json:"instance_pool_id,omitempty"` - // This field can only be used with `kind`. + // This field can only be used when `kind = CLASSIC_PREVIEW`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` @@ -2405,8 +2445,18 @@ type EditCluster struct { // Depending on `kind`, different validations and default values will be // applied. // - // The first usage of this value is for the simple cluster form where it - // sets `kind = CLASSIC_PREVIEW`. + // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, + // whereas clusters with no specified `kind` do not. * + // [is_single_node](/api/workspace/clusters/create#is_single_node) * + // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * + // [data_security_mode](/api/workspace/clusters/create#data_security_mode) + // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or + // `DATA_SECURITY_MODE_STANDARD` + // + // By using the [simple form], your clusters are automatically using `kind = + // CLASSIC_PREVIEW`. + // + // [simple form]: https://docs.databricks.com/compute/simple-form.html Kind Kind `json:"kind,omitempty"` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can @@ -2466,7 +2516,7 @@ type EditCluster struct { // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys []string `json:"ssh_public_keys,omitempty"` - // This field can only be used with `kind`. + // This field can only be used when `kind = CLASSIC_PREVIEW`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or @@ -2475,7 +2525,7 @@ type EditCluster struct { WorkloadType *WorkloadType `json:"workload_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EditCluster) UnmarshalJSON(b []byte) error { @@ -2522,7 +2572,7 @@ type EditInstancePool struct { // :method:clusters/listNodeTypes API call. NodeTypeId string `json:"node_type_id"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EditInstancePool) UnmarshalJSON(b []byte) error { @@ -2573,7 +2623,7 @@ type EditPolicy struct { // The ID of the policy to update. PolicyId string `json:"policy_id"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EditPolicy) UnmarshalJSON(b []byte) error { @@ -2597,7 +2647,7 @@ type EnforceClusterComplianceRequest struct { // compliance but does not update the cluster. ValidateOnly bool `json:"validate_only,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EnforceClusterComplianceRequest) UnmarshalJSON(b []byte) error { @@ -2616,7 +2666,7 @@ type EnforceClusterComplianceResponse struct { // cluster to become compliant with its policy. HasChanges bool `json:"has_changes,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EnforceClusterComplianceResponse) UnmarshalJSON(b []byte) error { @@ -2677,7 +2727,7 @@ type EventDetails struct { // control plane.) User string `json:"user,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EventDetails) UnmarshalJSON(b []byte) error { @@ -2834,7 +2884,7 @@ type GcpAttributes struct { // https://cloud.google.com/compute/docs/regions-zones. ZoneId string `json:"zone_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GcpAttributes) UnmarshalJSON(b []byte) error { @@ -2899,7 +2949,7 @@ type GetClusterComplianceResponse struct { // policy validation error. Violations map[string]string `json:"violations,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetClusterComplianceResponse) UnmarshalJSON(b []byte) error { @@ -2978,7 +3028,7 @@ type GetEvents struct { // from the beginning of time. StartTime int64 `json:"start_time,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetEvents) UnmarshalJSON(b []byte) error { @@ -3027,7 +3077,7 @@ type GetEventsResponse struct { // event_types. TotalCount int64 `json:"total_count,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetEventsResponse) UnmarshalJSON(b []byte) error { @@ -3119,7 +3169,7 @@ type GetInstancePool struct { // Status of failed pending instances in the pool. Status *InstancePoolStatus `json:"status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetInstancePool) UnmarshalJSON(b []byte) error { @@ -3161,7 +3211,7 @@ type GetPolicyFamilyRequest struct { // version. Version int64 `json:"-" url:"version,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetPolicyFamilyRequest) UnmarshalJSON(b []byte) error { @@ -3197,7 +3247,7 @@ type GlobalInitScriptCreateRequest struct { // The Base64-encoded content of the script. Script string `json:"script"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GlobalInitScriptCreateRequest) UnmarshalJSON(b []byte) error { @@ -3229,7 +3279,7 @@ type GlobalInitScriptDetails struct { // The username of the user who last updated the script UpdatedBy string `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GlobalInitScriptDetails) UnmarshalJSON(b []byte) error { @@ -3263,7 +3313,7 @@ type GlobalInitScriptDetailsWithContent struct { // The username of the user who last updated the script UpdatedBy string `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GlobalInitScriptDetailsWithContent) UnmarshalJSON(b []byte) error { @@ -3297,7 +3347,7 @@ type GlobalInitScriptUpdateRequest struct { // The ID of the global init script. ScriptId string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GlobalInitScriptUpdateRequest) UnmarshalJSON(b []byte) error { @@ -3316,7 +3366,7 @@ type InitScriptEventDetails struct { // The private ip address of the node where the init scripts were run. ReportedForNode string `json:"reported_for_node,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *InitScriptEventDetails) UnmarshalJSON(b []byte) error { @@ -3335,7 +3385,7 @@ type InitScriptExecutionDetails struct { // The current status of the script Status InitScriptExecutionDetailsStatus `json:"status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *InitScriptExecutionDetails) UnmarshalJSON(b []byte) error { @@ -3437,7 +3487,7 @@ type InstancePoolAccessControlRequest struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *InstancePoolAccessControlRequest) UnmarshalJSON(b []byte) error { @@ -3460,7 +3510,7 @@ type InstancePoolAccessControlResponse struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *InstancePoolAccessControlResponse) UnmarshalJSON(b []byte) error { @@ -3546,7 +3596,7 @@ type InstancePoolAndStats struct { // Status of failed pending instances in the pool. Status *InstancePoolStatus `json:"status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *InstancePoolAndStats) UnmarshalJSON(b []byte) error { @@ -3588,7 +3638,7 @@ type InstancePoolAwsAttributes struct { // can be found by using the `List Zones` method. ZoneId string `json:"zone_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *InstancePoolAwsAttributes) UnmarshalJSON(b []byte) error { @@ -3640,7 +3690,7 @@ type InstancePoolAzureAttributes struct { // CommonConf.defaultSpotBidMaxPrice. SpotBidMaxPrice float64 `json:"spot_bid_max_price,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *InstancePoolAzureAttributes) UnmarshalJSON(b []byte) error { @@ -3712,7 +3762,7 @@ type InstancePoolGcpAttributes struct { // on. ZoneId string `json:"zone_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *InstancePoolGcpAttributes) UnmarshalJSON(b []byte) error { @@ -3730,7 +3780,7 @@ type InstancePoolPermission struct { // Permission level PermissionLevel InstancePoolPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *InstancePoolPermission) UnmarshalJSON(b []byte) error { @@ -3776,7 +3826,7 @@ type InstancePoolPermissions struct { ObjectType string `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *InstancePoolPermissions) UnmarshalJSON(b []byte) error { @@ -3792,7 +3842,7 @@ type InstancePoolPermissionsDescription struct { // Permission level PermissionLevel InstancePoolPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *InstancePoolPermissionsDescription) UnmarshalJSON(b []byte) error { @@ -3849,7 +3899,7 @@ type InstancePoolStats struct { // Number of active instances in the pool that are part of a cluster. UsedCount int `json:"used_count,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *InstancePoolStats) UnmarshalJSON(b []byte) error { @@ -3888,7 +3938,7 @@ type InstanceProfile struct { // is optional, the default value is `false`. IsMetaInstanceProfile bool `json:"is_meta_instance_profile,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *InstanceProfile) UnmarshalJSON(b []byte) error { @@ -3904,8 +3954,18 @@ func (s InstanceProfile) MarshalJSON() ([]byte, error) { // Depending on `kind`, different validations and default values will be // applied. // -// The first usage of this value is for the simple cluster form where it sets -// `kind = CLASSIC_PREVIEW`. +// Clusters with `kind = CLASSIC_PREVIEW` support the following fields, whereas +// clusters with no specified `kind` do not. * +// [is_single_node](/api/workspace/clusters/create#is_single_node) * +// [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * +// [data_security_mode](/api/workspace/clusters/create#data_security_mode) set +// to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or +// `DATA_SECURITY_MODE_STANDARD` +// +// By using the [simple form], your clusters are automatically using `kind = +// CLASSIC_PREVIEW`. +// +// [simple form]: https://docs.databricks.com/compute/simple-form.html type Kind string const KindClassicPreview Kind = `CLASSIC_PREVIEW` @@ -3995,7 +4055,7 @@ type Library struct { // cluster with an IAM role to access the S3 URI. Whl string `json:"whl,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Library) UnmarshalJSON(b []byte) error { @@ -4019,7 +4079,7 @@ type LibraryFullStatus struct { // Status of installing the library on the cluster. Status LibraryInstallStatus `json:"status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *LibraryFullStatus) UnmarshalJSON(b []byte) error { @@ -4082,7 +4142,7 @@ type ListAvailableZonesResponse struct { // The list of available zones (e.g., ['us-west-2c', 'us-east-2']). Zones []string `json:"zones,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAvailableZonesResponse) UnmarshalJSON(b []byte) error { @@ -4105,7 +4165,7 @@ type ListClusterCompliancesRequest struct { // Canonical unique identifier for the cluster policy. PolicyId string `json:"-" url:"policy_id"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListClusterCompliancesRequest) UnmarshalJSON(b []byte) error { @@ -4127,7 +4187,7 @@ type ListClusterCompliancesResponse struct { // request. PrevPageToken string `json:"prev_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListClusterCompliancesResponse) UnmarshalJSON(b []byte) error { @@ -4159,7 +4219,7 @@ type ListClustersFilterBy struct { // The ID of the cluster policy used to create the cluster if applicable. PolicyId string `json:"policy_id,omitempty" url:"policy_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListClustersFilterBy) UnmarshalJSON(b []byte) error { @@ -4184,7 +4244,7 @@ type ListClustersRequest struct { // Sort the list of clusters by a specific criteria. SortBy *ListClustersSortBy `json:"-" url:"sort_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListClustersRequest) UnmarshalJSON(b []byte) error { @@ -4206,7 +4266,7 @@ type ListClustersResponse struct { // request. PrevPageToken string `json:"prev_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListClustersResponse) UnmarshalJSON(b []byte) error { @@ -4314,7 +4374,7 @@ type ListPolicyFamiliesRequest struct { // A token that can be used to get the next page of results. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListPolicyFamiliesRequest) UnmarshalJSON(b []byte) error { @@ -4332,7 +4392,7 @@ type ListPolicyFamiliesResponse struct { // List of policy families. PolicyFamilies []PolicyFamily `json:"policy_families,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListPolicyFamiliesResponse) UnmarshalJSON(b []byte) error { @@ -4409,7 +4469,7 @@ type LogAnalyticsInfo struct { // LogAnalyticsWorkspaceId string `json:"log_analytics_workspace_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *LogAnalyticsInfo) UnmarshalJSON(b []byte) error { @@ -4428,7 +4488,7 @@ type LogSyncStatus struct { // the response) if there is no exception in last attempted. LastException string `json:"last_exception,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *LogSyncStatus) UnmarshalJSON(b []byte) error { @@ -4452,7 +4512,7 @@ type MavenLibrary struct { // Central Repository and Spark Packages are searched. Repo string `json:"repo,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MavenLibrary) UnmarshalJSON(b []byte) error { @@ -4474,7 +4534,7 @@ type NodeInstanceType struct { LocalNvmeDisks int `json:"local_nvme_disks,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *NodeInstanceType) UnmarshalJSON(b []byte) error { @@ -4534,7 +4594,7 @@ type NodeType struct { // with elastic disk enabled. This is true for most node types. SupportsElasticDisk bool `json:"supports_elastic_disk,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *NodeType) UnmarshalJSON(b []byte) error { @@ -4550,7 +4610,7 @@ type PendingInstanceError struct { Message string `json:"message,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PendingInstanceError) UnmarshalJSON(b []byte) error { @@ -4625,7 +4685,7 @@ type Policy struct { // Canonical unique identifier for the Cluster Policy. PolicyId string `json:"policy_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Policy) UnmarshalJSON(b []byte) error { @@ -4649,7 +4709,7 @@ type PolicyFamily struct { // Unique identifier for the policy family. PolicyFamilyId string `json:"policy_family_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PolicyFamily) UnmarshalJSON(b []byte) error { @@ -4669,7 +4729,7 @@ type PythonPyPiLibrary struct { // default pip index is used. Repo string `json:"repo,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PythonPyPiLibrary) UnmarshalJSON(b []byte) error { @@ -4687,7 +4747,7 @@ type RCranLibrary struct { // default CRAN repo is used. Repo string `json:"repo,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RCranLibrary) UnmarshalJSON(b []byte) error { @@ -4725,7 +4785,7 @@ type ResizeCluster struct { // increase from 5 to 10 as the new nodes are provisioned. NumWorkers int `json:"num_workers,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ResizeCluster) UnmarshalJSON(b []byte) error { @@ -4745,7 +4805,7 @@ type RestartCluster struct { // RestartUser string `json:"restart_user,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RestartCluster) UnmarshalJSON(b []byte) error { @@ -4815,7 +4875,7 @@ type Results struct { // true if partial results are returned. Truncated bool `json:"truncated,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Results) UnmarshalJSON(b []byte) error { @@ -4895,7 +4955,7 @@ type S3StorageInfo struct { // If both are set, endpoint will be used. Region string `json:"region,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *S3StorageInfo) UnmarshalJSON(b []byte) error { @@ -4933,7 +4993,7 @@ type SparkNode struct { // creation timestamp in the database. StartTimestamp int64 `json:"start_timestamp,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SparkNode) UnmarshalJSON(b []byte) error { @@ -4948,7 +5008,7 @@ type SparkNodeAwsAttributes struct { // Whether this node is on an Amazon spot instance. IsSpot bool `json:"is_spot,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SparkNodeAwsAttributes) UnmarshalJSON(b []byte) error { @@ -4969,7 +5029,7 @@ type SparkVersion struct { // A descriptive name for this Spark version, for example "Spark 2.1". Name string `json:"name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SparkVersion) UnmarshalJSON(b []byte) error { @@ -5323,7 +5383,7 @@ type UpdateClusterResource struct { // Data security mode decides what data governance model to use when // accessing data from a cluster. // - // The following modes can only be used with `kind`. * + // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate // access mode depending on your compute configuration. * // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * @@ -5377,7 +5437,7 @@ type UpdateClusterResource struct { InitScripts []InitScriptInfo `json:"init_scripts,omitempty"` // The optional ID of the instance pool to which the cluster belongs. InstancePoolId string `json:"instance_pool_id,omitempty"` - // This field can only be used with `kind`. + // This field can only be used when `kind = CLASSIC_PREVIEW`. // // When set to true, Databricks will automatically set single node related // `custom_tags`, `spark_conf`, and `num_workers` @@ -5387,8 +5447,18 @@ type UpdateClusterResource struct { // Depending on `kind`, different validations and default values will be // applied. // - // The first usage of this value is for the simple cluster form where it - // sets `kind = CLASSIC_PREVIEW`. + // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, + // whereas clusters with no specified `kind` do not. * + // [is_single_node](/api/workspace/clusters/create#is_single_node) * + // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * + // [data_security_mode](/api/workspace/clusters/create#data_security_mode) + // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or + // `DATA_SECURITY_MODE_STANDARD` + // + // By using the [simple form], your clusters are automatically using `kind = + // CLASSIC_PREVIEW`. + // + // [simple form]: https://docs.databricks.com/compute/simple-form.html Kind Kind `json:"kind,omitempty"` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can @@ -5448,7 +5518,7 @@ type UpdateClusterResource struct { // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys []string `json:"ssh_public_keys,omitempty"` - // This field can only be used with `kind`. + // This field can only be used when `kind = CLASSIC_PREVIEW`. // // `effective_spark_version` is determined by `spark_version` (DBR release), // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or @@ -5457,7 +5527,7 @@ type UpdateClusterResource struct { WorkloadType *WorkloadType `json:"workload_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateClusterResource) UnmarshalJSON(b []byte) error { diff --git a/dashboards/v2/api.go b/dashboards/v2/api.go index 461e13144..0835ed152 100755 --- a/dashboards/v2/api.go +++ b/dashboards/v2/api.go @@ -14,8 +14,9 @@ type GenieInterface interface { // Create conversation message. // - // Create new message in [conversation](:method:genie/startconversation). The AI - // response uses all previously created messages in the conversation to respond. + // Create new message in a [conversation](:method:genie/startconversation). The + // AI response uses all previously created messages in the conversation to + // respond. CreateMessage(ctx context.Context, request GenieCreateConversationMessageRequest) (*GenieMessage, error) // Execute SQL query in a conversation message. @@ -33,30 +34,32 @@ type GenieInterface interface { // Get message from conversation. GetMessageBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieMessage, error) - // Get conversation message SQL query result. + // [Deprecated] Get conversation message SQL query result. // // Get the result of SQL query if the message has a query attachment. This is // only available if a message has a query attachment and the message status is // `EXECUTING_QUERY`. GetMessageQueryResult(ctx context.Context, request GenieGetMessageQueryResultRequest) (*GenieGetMessageQueryResultResponse, error) - // Get conversation message SQL query result. + // [Deprecated] Get conversation message SQL query result. // // Get the result of SQL query if the message has a query attachment. This is // only available if a message has a query attachment and the message status is // `EXECUTING_QUERY`. GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*GenieGetMessageQueryResultResponse, error) - // Get conversation message SQL query result by attachment id. + // Get conversation message SQL query result. // - // Get the result of SQL query by attachment id This is only available if a - // message has a query attachment and the message status is `EXECUTING_QUERY`. + // Get the result of SQL query if the message has a query attachment. This is + // only available if a message has a query attachment and the message status is + // `EXECUTING_QUERY` OR `COMPLETED`. GetMessageQueryResultByAttachment(ctx context.Context, request GenieGetQueryResultByAttachmentRequest) (*GenieGetMessageQueryResultResponse, error) - // Get conversation message SQL query result by attachment id. + // Get conversation message SQL query result. // - // Get the result of SQL query by attachment id This is only available if a - // message has a query attachment and the message status is `EXECUTING_QUERY`. + // Get the result of SQL query if the message has a query attachment. This is + // only available if a message has a query attachment and the message status is + // `EXECUTING_QUERY` OR `COMPLETED`. GetMessageQueryResultByAttachmentBySpaceIdAndConversationIdAndMessageIdAndAttachmentId(ctx context.Context, spaceId string, conversationId string, messageId string, attachmentId string) (*GenieGetMessageQueryResultResponse, error) // Start conversation. @@ -93,7 +96,7 @@ func (a *GenieAPI) GetMessageBySpaceIdAndConversationIdAndMessageId(ctx context. }) } -// Get conversation message SQL query result. +// [Deprecated] Get conversation message SQL query result. // // Get the result of SQL query if the message has a query attachment. This is // only available if a message has a query attachment and the message status is @@ -106,10 +109,11 @@ func (a *GenieAPI) GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId(c }) } -// Get conversation message SQL query result by attachment id. +// Get conversation message SQL query result. // -// Get the result of SQL query by attachment id This is only available if a -// message has a query attachment and the message status is `EXECUTING_QUERY`. +// Get the result of SQL query if the message has a query attachment. This is +// only available if a message has a query attachment and the message status is +// `EXECUTING_QUERY` OR `COMPLETED`. func (a *GenieAPI) GetMessageQueryResultByAttachmentBySpaceIdAndConversationIdAndMessageIdAndAttachmentId(ctx context.Context, spaceId string, conversationId string, messageId string, attachmentId string) (*GenieGetMessageQueryResultResponse, error) { return a.genieImpl.GetMessageQueryResultByAttachment(ctx, GenieGetQueryResultByAttachmentRequest{ SpaceId: spaceId, diff --git a/dashboards/v2/model.go b/dashboards/v2/model.go index ecca2ecde..842643521 100755 --- a/dashboards/v2/model.go +++ b/dashboards/v2/model.go @@ -22,7 +22,7 @@ type BaseChunkInfo struct { // The starting row offset within the result set. RowOffset int64 `json:"row_offset,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *BaseChunkInfo) UnmarshalJSON(b []byte) error { @@ -78,7 +78,7 @@ type ColumnInfo struct { // The full SQL type specification. TypeText string `json:"type_text,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ColumnInfo) UnmarshalJSON(b []byte) error { @@ -223,7 +223,7 @@ type Dashboard struct { // The warehouse ID used to run the dashboard. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Dashboard) UnmarshalJSON(b []byte) error { @@ -259,63 +259,6 @@ func (f *DashboardView) Type() string { return "DashboardView" } -type DataType string - -const DataTypeDataTypeArray DataType = `DATA_TYPE_ARRAY` - -const DataTypeDataTypeBigInt DataType = `DATA_TYPE_BIG_INT` - -const DataTypeDataTypeBinary DataType = `DATA_TYPE_BINARY` - -const DataTypeDataTypeBoolean DataType = `DATA_TYPE_BOOLEAN` - -const DataTypeDataTypeDate DataType = `DATA_TYPE_DATE` - -const DataTypeDataTypeDecimal DataType = `DATA_TYPE_DECIMAL` - -const DataTypeDataTypeDouble DataType = `DATA_TYPE_DOUBLE` - -const DataTypeDataTypeFloat DataType = `DATA_TYPE_FLOAT` - -const DataTypeDataTypeInt DataType = `DATA_TYPE_INT` - -const DataTypeDataTypeInterval DataType = `DATA_TYPE_INTERVAL` - -const DataTypeDataTypeMap DataType = `DATA_TYPE_MAP` - -const DataTypeDataTypeSmallInt DataType = `DATA_TYPE_SMALL_INT` - -const DataTypeDataTypeString DataType = `DATA_TYPE_STRING` - -const DataTypeDataTypeStruct DataType = `DATA_TYPE_STRUCT` - -const DataTypeDataTypeTimestamp DataType = `DATA_TYPE_TIMESTAMP` - -const DataTypeDataTypeTinyInt DataType = `DATA_TYPE_TINY_INT` - -const DataTypeDataTypeVoid DataType = `DATA_TYPE_VOID` - -// String representation for [fmt.Print] -func (f *DataType) String() string { - return string(*f) -} - -// Set raw string value and validate it against allowed values -func (f *DataType) Set(v string) error { - switch v { - case `DATA_TYPE_ARRAY`, `DATA_TYPE_BIG_INT`, `DATA_TYPE_BINARY`, `DATA_TYPE_BOOLEAN`, `DATA_TYPE_DATE`, `DATA_TYPE_DECIMAL`, `DATA_TYPE_DOUBLE`, `DATA_TYPE_FLOAT`, `DATA_TYPE_INT`, `DATA_TYPE_INTERVAL`, `DATA_TYPE_MAP`, `DATA_TYPE_SMALL_INT`, `DATA_TYPE_STRING`, `DATA_TYPE_STRUCT`, `DATA_TYPE_TIMESTAMP`, `DATA_TYPE_TINY_INT`, `DATA_TYPE_VOID`: - *f = DataType(v) - return nil - default: - return fmt.Errorf(`value "%s" is not one of "DATA_TYPE_ARRAY", "DATA_TYPE_BIG_INT", "DATA_TYPE_BINARY", "DATA_TYPE_BOOLEAN", "DATA_TYPE_DATE", "DATA_TYPE_DECIMAL", "DATA_TYPE_DOUBLE", "DATA_TYPE_FLOAT", "DATA_TYPE_INT", "DATA_TYPE_INTERVAL", "DATA_TYPE_MAP", "DATA_TYPE_SMALL_INT", "DATA_TYPE_STRING", "DATA_TYPE_STRUCT", "DATA_TYPE_TIMESTAMP", "DATA_TYPE_TINY_INT", "DATA_TYPE_VOID"`, v) - } -} - -// Type always returns DataType to satisfy [pflag.Value] interface -func (f *DataType) Type() string { - return "DataType" -} - // Delete dashboard schedule type DeleteScheduleRequest struct { // UUID identifying the dashboard to which the schedule belongs. @@ -326,7 +269,7 @@ type DeleteScheduleRequest struct { // UUID identifying the schedule. ScheduleId string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteScheduleRequest) UnmarshalJSON(b []byte) error { @@ -352,7 +295,7 @@ type DeleteSubscriptionRequest struct { // UUID identifying the subscription. SubscriptionId string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteSubscriptionRequest) UnmarshalJSON(b []byte) error { @@ -386,7 +329,7 @@ type ExecutePublishedDashboardQueryRequest struct { // processing the published dashboard queries OverrideWarehouseId string `json:"override_warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExecutePublishedDashboardQueryRequest) UnmarshalJSON(b []byte) error { @@ -432,7 +375,7 @@ type ExternalLink struct { // The starting row offset within the result set. RowOffset int64 `json:"row_offset,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExternalLink) UnmarshalJSON(b []byte) error { @@ -474,15 +417,30 @@ func (f *Format) Type() string { // Genie AI Response type GenieAttachment struct { - Query *QueryAttachment `json:"query,omitempty"` - + // Attachment ID + AttachmentId string `json:"attachment_id,omitempty"` + // Query Attachment if Genie responds with a SQL query + Query *GenieQueryAttachment `json:"query,omitempty"` + // Text Attachment if Genie responds with text Text *TextAttachment `json:"text,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *GenieAttachment) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s GenieAttachment) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) } type GenieConversation struct { + // Conversation ID + ConversationId string `json:"conversation_id"` // Timestamp when the message was created CreatedTimestamp int64 `json:"created_timestamp,omitempty"` - // Conversation ID + // Conversation ID. Legacy identifier, use conversation_id instead Id string `json:"id"` // Timestamp when the message was last updated LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` @@ -493,7 +451,7 @@ type GenieConversation struct { // ID of the user who created the conversation UserId int `json:"user_id"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GenieConversation) UnmarshalJSON(b []byte) error { @@ -535,7 +493,7 @@ type GenieGetConversationMessageRequest struct { SpaceId string `json:"-" url:"-"` } -// Get conversation message SQL query result +// [Deprecated] Get conversation message SQL query result type GenieGetMessageQueryResultRequest struct { // Conversation ID ConversationId string `json:"-" url:"-"` @@ -551,7 +509,7 @@ type GenieGetMessageQueryResultResponse struct { StatementResponse *StatementResponse `json:"statement_response,omitempty"` } -// Get conversation message SQL query result by attachment id +// Get conversation message SQL query result type GenieGetQueryResultByAttachmentRequest struct { // Attachment ID AttachmentId string `json:"-" url:"-"` @@ -564,7 +522,7 @@ type GenieGetQueryResultByAttachmentRequest struct { } type GenieMessage struct { - // AI produced response to the message + // AI generated response to the message Attachments []GenieAttachment `json:"attachments,omitempty"` // User message content Content string `json:"content"` @@ -574,10 +532,12 @@ type GenieMessage struct { CreatedTimestamp int64 `json:"created_timestamp,omitempty"` // Error message if AI failed to respond to the message Error *MessageError `json:"error,omitempty"` - // Message ID + // Message ID. Legacy identifier, use message_id instead Id string `json:"id"` // Timestamp when the message was last updated LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` + // Message ID + MessageId string `json:"message_id"` // The result of SQL query if the message has a query attachment QueryResult *Result `json:"query_result,omitempty"` // Genie space ID @@ -589,10 +549,7 @@ type GenieMessage struct { // for warehouse before the SQL query can start executing. * // `EXECUTING_QUERY`: Executing AI provided SQL query. Get the SQL query // result by calling - // [getMessageQueryResult](:method:genie/getMessageQueryResult) API. - // **Important: The message status will stay in the `EXECUTING_QUERY` until - // a client calls - // [getMessageQueryResult](:method:genie/getMessageQueryResult)**. * + // [getMessageQueryResult](:method:genie/getMessageQueryResult) API. * // `FAILED`: Generating a response or the executing the query failed. Please // see `error` field. * `COMPLETED`: Message processing is completed. // Results are in the `attachments` field. Get the SQL query result by @@ -604,7 +561,7 @@ type GenieMessage struct { // ID of the user who created the message UserId int64 `json:"user_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GenieMessage) UnmarshalJSON(b []byte) error { @@ -615,6 +572,29 @@ func (s GenieMessage) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +type GenieQueryAttachment struct { + // Description of the query + Description string `json:"description,omitempty"` + + Id string `json:"id,omitempty"` + // Time when the user updated the query last + LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` + // AI generated SQL query + Query string `json:"query,omitempty"` + // Name of the query + Title string `json:"title,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *GenieQueryAttachment) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s GenieQueryAttachment) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + type GenieStartConversationMessageRequest struct { // The text of the message that starts the conversation. Content string `json:"content"` @@ -712,7 +692,7 @@ type ListDashboardsRequest struct { // `DASHBOARD_VIEW_BASIC`only includes summary metadata from the dashboard. View DashboardView `json:"-" url:"view,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListDashboardsRequest) UnmarshalJSON(b []byte) error { @@ -729,7 +709,7 @@ type ListDashboardsResponse struct { // this field is omitted, there are no subsequent dashboards. NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListDashboardsResponse) UnmarshalJSON(b []byte) error { @@ -750,7 +730,7 @@ type ListSchedulesRequest struct { // retrieve the subsequent page. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListSchedulesRequest) UnmarshalJSON(b []byte) error { @@ -769,7 +749,7 @@ type ListSchedulesResponse struct { Schedules []Schedule `json:"schedules,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListSchedulesResponse) UnmarshalJSON(b []byte) error { @@ -792,7 +772,7 @@ type ListSubscriptionsRequest struct { // UUID identifying the schedule which the subscriptions belongs. ScheduleId string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListSubscriptionsRequest) UnmarshalJSON(b []byte) error { @@ -811,7 +791,7 @@ type ListSubscriptionsResponse struct { Subscriptions []Subscription `json:"subscriptions,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListSubscriptionsResponse) UnmarshalJSON(b []byte) error { @@ -827,7 +807,7 @@ type MessageError struct { Type MessageErrorType `json:"type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MessageError) UnmarshalJSON(b []byte) error { @@ -862,6 +842,8 @@ const MessageErrorTypeFunctionArgumentsInvalidException MessageErrorType = `FUNC const MessageErrorTypeFunctionArgumentsInvalidJsonException MessageErrorType = `FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION` +const MessageErrorTypeFunctionArgumentsInvalidTypeException MessageErrorType = `FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION` + const MessageErrorTypeFunctionCallMissingParameterException MessageErrorType = `FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION` const MessageErrorTypeGenericChatCompletionException MessageErrorType = `GENERIC_CHAT_COMPLETION_EXCEPTION` @@ -930,11 +912,11 @@ func (f *MessageErrorType) String() string { // Set raw string value and validate it against allowed values func (f *MessageErrorType) Set(v string) error { switch v { - case `BLOCK_MULTIPLE_EXECUTIONS_EXCEPTION`, `CHAT_COMPLETION_CLIENT_EXCEPTION`, `CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION`, `CHAT_COMPLETION_NETWORK_EXCEPTION`, `CONTENT_FILTER_EXCEPTION`, `CONTEXT_EXCEEDED_EXCEPTION`, `COULD_NOT_GET_UC_SCHEMA_EXCEPTION`, `DEPLOYMENT_NOT_FOUND_EXCEPTION`, `FUNCTIONS_NOT_AVAILABLE_EXCEPTION`, `FUNCTION_ARGUMENTS_INVALID_EXCEPTION`, `FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION`, `FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION`, `GENERIC_CHAT_COMPLETION_EXCEPTION`, `GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION`, `GENERIC_SQL_EXEC_API_CALL_EXCEPTION`, `ILLEGAL_PARAMETER_DEFINITION_EXCEPTION`, `INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION`, `INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION`, `INVALID_CHAT_COMPLETION_JSON_EXCEPTION`, `INVALID_COMPLETION_REQUEST_EXCEPTION`, `INVALID_FUNCTION_CALL_EXCEPTION`, `INVALID_TABLE_IDENTIFIER_EXCEPTION`, `LOCAL_CONTEXT_EXCEEDED_EXCEPTION`, `MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION`, `MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION`, `NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE`, `NO_QUERY_TO_VISUALIZE_EXCEPTION`, `NO_TABLES_TO_QUERY_EXCEPTION`, `RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION`, `RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION`, `REPLY_PROCESS_TIMEOUT_EXCEPTION`, `RETRYABLE_PROCESSING_EXCEPTION`, `SQL_EXECUTION_EXCEPTION`, `STOP_PROCESS_DUE_TO_AUTO_REGENERATE`, `TABLES_MISSING_EXCEPTION`, `TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION`, `TOO_MANY_TABLES_EXCEPTION`, `UNEXPECTED_REPLY_PROCESS_EXCEPTION`, `UNKNOWN_AI_MODEL`, `WAREHOUSE_ACCESS_MISSING_EXCEPTION`, `WAREHOUSE_NOT_FOUND_EXCEPTION`: + case `BLOCK_MULTIPLE_EXECUTIONS_EXCEPTION`, `CHAT_COMPLETION_CLIENT_EXCEPTION`, `CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION`, `CHAT_COMPLETION_NETWORK_EXCEPTION`, `CONTENT_FILTER_EXCEPTION`, `CONTEXT_EXCEEDED_EXCEPTION`, `COULD_NOT_GET_UC_SCHEMA_EXCEPTION`, `DEPLOYMENT_NOT_FOUND_EXCEPTION`, `FUNCTIONS_NOT_AVAILABLE_EXCEPTION`, `FUNCTION_ARGUMENTS_INVALID_EXCEPTION`, `FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION`, `FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION`, `FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION`, `GENERIC_CHAT_COMPLETION_EXCEPTION`, `GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION`, `GENERIC_SQL_EXEC_API_CALL_EXCEPTION`, `ILLEGAL_PARAMETER_DEFINITION_EXCEPTION`, `INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION`, `INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION`, `INVALID_CHAT_COMPLETION_JSON_EXCEPTION`, `INVALID_COMPLETION_REQUEST_EXCEPTION`, `INVALID_FUNCTION_CALL_EXCEPTION`, `INVALID_TABLE_IDENTIFIER_EXCEPTION`, `LOCAL_CONTEXT_EXCEEDED_EXCEPTION`, `MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION`, `MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION`, `NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE`, `NO_QUERY_TO_VISUALIZE_EXCEPTION`, `NO_TABLES_TO_QUERY_EXCEPTION`, `RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION`, `RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION`, `REPLY_PROCESS_TIMEOUT_EXCEPTION`, `RETRYABLE_PROCESSING_EXCEPTION`, `SQL_EXECUTION_EXCEPTION`, `STOP_PROCESS_DUE_TO_AUTO_REGENERATE`, `TABLES_MISSING_EXCEPTION`, `TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION`, `TOO_MANY_TABLES_EXCEPTION`, `UNEXPECTED_REPLY_PROCESS_EXCEPTION`, `UNKNOWN_AI_MODEL`, `WAREHOUSE_ACCESS_MISSING_EXCEPTION`, `WAREHOUSE_NOT_FOUND_EXCEPTION`: *f = MessageErrorType(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "BLOCK_MULTIPLE_EXECUTIONS_EXCEPTION", "CHAT_COMPLETION_CLIENT_EXCEPTION", "CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION", "CHAT_COMPLETION_NETWORK_EXCEPTION", "CONTENT_FILTER_EXCEPTION", "CONTEXT_EXCEEDED_EXCEPTION", "COULD_NOT_GET_UC_SCHEMA_EXCEPTION", "DEPLOYMENT_NOT_FOUND_EXCEPTION", "FUNCTIONS_NOT_AVAILABLE_EXCEPTION", "FUNCTION_ARGUMENTS_INVALID_EXCEPTION", "FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION", "FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION", "GENERIC_CHAT_COMPLETION_EXCEPTION", "GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION", "GENERIC_SQL_EXEC_API_CALL_EXCEPTION", "ILLEGAL_PARAMETER_DEFINITION_EXCEPTION", "INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION", "INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION", "INVALID_CHAT_COMPLETION_JSON_EXCEPTION", "INVALID_COMPLETION_REQUEST_EXCEPTION", "INVALID_FUNCTION_CALL_EXCEPTION", "INVALID_TABLE_IDENTIFIER_EXCEPTION", "LOCAL_CONTEXT_EXCEEDED_EXCEPTION", "MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION", "MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION", "NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE", "NO_QUERY_TO_VISUALIZE_EXCEPTION", "NO_TABLES_TO_QUERY_EXCEPTION", "RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION", "RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION", "REPLY_PROCESS_TIMEOUT_EXCEPTION", "RETRYABLE_PROCESSING_EXCEPTION", "SQL_EXECUTION_EXCEPTION", "STOP_PROCESS_DUE_TO_AUTO_REGENERATE", "TABLES_MISSING_EXCEPTION", "TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION", "TOO_MANY_TABLES_EXCEPTION", "UNEXPECTED_REPLY_PROCESS_EXCEPTION", "UNKNOWN_AI_MODEL", "WAREHOUSE_ACCESS_MISSING_EXCEPTION", "WAREHOUSE_NOT_FOUND_EXCEPTION"`, v) + return fmt.Errorf(`value "%s" is not one of "BLOCK_MULTIPLE_EXECUTIONS_EXCEPTION", "CHAT_COMPLETION_CLIENT_EXCEPTION", "CHAT_COMPLETION_CLIENT_TIMEOUT_EXCEPTION", "CHAT_COMPLETION_NETWORK_EXCEPTION", "CONTENT_FILTER_EXCEPTION", "CONTEXT_EXCEEDED_EXCEPTION", "COULD_NOT_GET_UC_SCHEMA_EXCEPTION", "DEPLOYMENT_NOT_FOUND_EXCEPTION", "FUNCTIONS_NOT_AVAILABLE_EXCEPTION", "FUNCTION_ARGUMENTS_INVALID_EXCEPTION", "FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION", "FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION", "FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION", "GENERIC_CHAT_COMPLETION_EXCEPTION", "GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION", "GENERIC_SQL_EXEC_API_CALL_EXCEPTION", "ILLEGAL_PARAMETER_DEFINITION_EXCEPTION", "INVALID_CERTIFIED_ANSWER_FUNCTION_EXCEPTION", "INVALID_CERTIFIED_ANSWER_IDENTIFIER_EXCEPTION", "INVALID_CHAT_COMPLETION_JSON_EXCEPTION", "INVALID_COMPLETION_REQUEST_EXCEPTION", "INVALID_FUNCTION_CALL_EXCEPTION", "INVALID_TABLE_IDENTIFIER_EXCEPTION", "LOCAL_CONTEXT_EXCEEDED_EXCEPTION", "MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION", "MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION", "NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE", "NO_QUERY_TO_VISUALIZE_EXCEPTION", "NO_TABLES_TO_QUERY_EXCEPTION", "RATE_LIMIT_EXCEEDED_GENERIC_EXCEPTION", "RATE_LIMIT_EXCEEDED_SPECIFIED_WAIT_EXCEPTION", "REPLY_PROCESS_TIMEOUT_EXCEPTION", "RETRYABLE_PROCESSING_EXCEPTION", "SQL_EXECUTION_EXCEPTION", "STOP_PROCESS_DUE_TO_AUTO_REGENERATE", "TABLES_MISSING_EXCEPTION", "TOO_MANY_CERTIFIED_ANSWERS_EXCEPTION", "TOO_MANY_TABLES_EXCEPTION", "UNEXPECTED_REPLY_PROCESS_EXCEPTION", "UNKNOWN_AI_MODEL", "WAREHOUSE_ACCESS_MISSING_EXCEPTION", "WAREHOUSE_NOT_FOUND_EXCEPTION"`, v) } } @@ -949,12 +931,10 @@ func (f *MessageErrorType) Type() string { // respond to the users question. * `PENDING_WAREHOUSE`: Waiting for warehouse // before the SQL query can start executing. * `EXECUTING_QUERY`: Executing AI // provided SQL query. Get the SQL query result by calling -// [getMessageQueryResult](:method:genie/getMessageQueryResult) API. -// **Important: The message status will stay in the `EXECUTING_QUERY` until a -// client calls [getMessageQueryResult](:method:genie/getMessageQueryResult)**. -// * `FAILED`: Generating a response or the executing the query failed. Please -// see `error` field. * `COMPLETED`: Message processing is completed. Results -// are in the `attachments` field. Get the SQL query result by calling +// [getMessageQueryResult](:method:genie/getMessageQueryResult) API. * `FAILED`: +// Generating a response or the executing the query failed. Please see `error` +// field. * `COMPLETED`: Message processing is completed. Results are in the +// `attachments` field. Get the SQL query result by calling // [getMessageQueryResult](:method:genie/getMessageQueryResult) API. * // `SUBMITTED`: Message has been submitted. * `QUERY_RESULT_EXPIRED`: SQL result // is not available anymore. The user needs to execute the query again. * @@ -974,8 +954,6 @@ const MessageStatusCompleted MessageStatus = `COMPLETED` // Executing AI provided SQL query. Get the SQL query result by calling // [getMessageQueryResult](:method:genie/getMessageQueryResult) API. -// **Important: The message status will stay in the `EXECUTING_QUERY` until a -// client calls [getMessageQueryResult](:method:genie/getMessageQueryResult)**. const MessageStatusExecutingQuery MessageStatus = `EXECUTING_QUERY` // Generating a response or the executing the query failed. Please see `error` @@ -1032,7 +1010,7 @@ type MigrateDashboardRequest struct { // dashboard. UpdateParameterSyntax bool `json:"update_parameter_syntax,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MigrateDashboardRequest) UnmarshalJSON(b []byte) error { @@ -1078,7 +1056,7 @@ type PublishRequest struct { // was set in the draft. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PublishRequest) UnmarshalJSON(b []byte) error { @@ -1099,7 +1077,7 @@ type PublishedDashboard struct { // The warehouse ID used to run the published dashboard. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PublishedDashboard) UnmarshalJSON(b []byte) error { @@ -1110,38 +1088,6 @@ func (s PublishedDashboard) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -type QueryAttachment struct { - CachedQuerySchema *QuerySchema `json:"cached_query_schema,omitempty"` - // Description of the query - Description string `json:"description,omitempty"` - - Id string `json:"id,omitempty"` - // If the query was created on an instruction (trusted asset) we link to the - // id - InstructionId string `json:"instruction_id,omitempty"` - // Always store the title next to the id in case the original instruction - // title changes or the instruction is deleted. - InstructionTitle string `json:"instruction_title,omitempty"` - // Time when the user updated the query last - LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` - // AI generated SQL query - Query string `json:"query,omitempty"` - - StatementId string `json:"statement_id,omitempty"` - // Name of the query - Title string `json:"title,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *QueryAttachment) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s QueryAttachment) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - type QueryResponseStatus struct { // Represents an empty message, similar to google.protobuf.Empty, which is // not available in the firm right now. @@ -1159,7 +1105,7 @@ type QueryResponseStatus struct { Success *SuccessStatus `json:"success,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QueryResponseStatus) UnmarshalJSON(b []byte) error { @@ -1170,34 +1116,6 @@ func (s QueryResponseStatus) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -type QuerySchema struct { - Columns []QuerySchemaColumn `json:"columns,omitempty"` - // Used to determine if the stored query schema is compatible with the - // latest run. The service should always clear the schema when the query is - // re-executed. - StatementId string `json:"statement_id,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *QuerySchema) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s QuerySchema) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - -type QuerySchemaColumn struct { - // Populated from - // https://docs.databricks.com/sql/language-manual/sql-ref-datatypes.html - DataType DataType `json:"data_type"` - - Name string `json:"name"` - // Corresponds to type desc - TypeText string `json:"type_text"` -} - type Result struct { // If result is truncated IsTruncated bool `json:"is_truncated,omitempty"` @@ -1208,7 +1126,7 @@ type Result struct { // full result data. StatementId string `json:"statement_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Result) UnmarshalJSON(b []byte) error { @@ -1245,7 +1163,7 @@ type ResultData struct { // The starting row offset within the result set. RowOffset int64 `json:"row_offset,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ResultData) UnmarshalJSON(b []byte) error { @@ -1275,7 +1193,7 @@ type ResultManifest struct { // `byte_limit`. Truncated bool `json:"truncated,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ResultManifest) UnmarshalJSON(b []byte) error { @@ -1292,7 +1210,7 @@ type ResultSchema struct { Columns []ColumnInfo `json:"columns,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ResultSchema) UnmarshalJSON(b []byte) error { @@ -1326,7 +1244,7 @@ type Schedule struct { // The warehouse id to run the dashboard with for the schedule. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Schedule) UnmarshalJSON(b []byte) error { @@ -1369,7 +1287,7 @@ type ServiceError struct { // A brief summary of the error condition. Message string `json:"message,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServiceError) UnmarshalJSON(b []byte) error { @@ -1443,7 +1361,7 @@ type StatementResponse struct { // information. Status *StatementStatus `json:"status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *StatementResponse) UnmarshalJSON(b []byte) error { @@ -1548,7 +1466,7 @@ type Subscription struct { // A timestamp indicating when the subscription was last updated. UpdateTime string `json:"update_time,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Subscription) UnmarshalJSON(b []byte) error { @@ -1577,7 +1495,7 @@ type SuccessStatus struct { // Whether the query result is truncated (either by byte limit or row limit) Truncated bool `json:"truncated,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SuccessStatus) UnmarshalJSON(b []byte) error { @@ -1594,7 +1512,7 @@ type TextAttachment struct { Id string `json:"id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TextAttachment) UnmarshalJSON(b []byte) error { diff --git a/databricks/retries/retries.go b/databricks/retries/retries.go index 100ac017d..b3aba718a 100644 --- a/databricks/retries/retries.go +++ b/databricks/retries/retries.go @@ -11,31 +11,33 @@ import ( "github.com/databricks/databricks-sdk-go/databricks/log" ) -// Deprecated: use return types from non-*AndWait methods -type Info[T any] struct { - Info *T - Timeout time.Duration -} - -// Deprecated: use return types from non-*AndWait methods -type Option[T any] func(*Info[T]) - -// Deprecated: use return types from non-*AndWait methods -func Timeout[T any](dur time.Duration) Option[T] { - return func(i *Info[T]) { - i.Timeout = dur - } -} - -// Deprecated: use return types from non-*AndWait methods -func OnPoll[T any](callback func(*T)) Option[T] { - return func(i *Info[T]) { - if i.Info == nil { - return - } - callback(i.Info) - } -} +// Removed code that is deprecated from the SDK v0 + +// // Deprecated: use return types from non-*AndWait methods +// type Info[T any] struct { +// Info *T +// Timeout time.Duration +// } + +// // Deprecated: use return types from non-*AndWait methods +// type Option[T any] func(*Info[T]) + +// // Deprecated: use return types from non-*AndWait methods +// func Timeout[T any](dur time.Duration) Option[T] { +// return func(i *Info[T]) { +// i.Timeout = dur +// } +// } + +// // Deprecated: use return types from non-*AndWait methods +// func OnPoll[T any](callback func(*T)) Option[T] { +// return func(i *Info[T]) { +// if i.Info == nil { +// return +// } +// callback(i.Info) +// } +// } type Err struct { Err error diff --git a/files/v2/model.go b/files/v2/model.go index 2799e2394..c12eaf02a 100755 --- a/files/v2/model.go +++ b/files/v2/model.go @@ -33,7 +33,7 @@ type Create struct { // The path of the new file. The path should be the absolute DBFS path. Path string `json:"path"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Create) UnmarshalJSON(b []byte) error { @@ -58,7 +58,7 @@ type CreateResponse struct { // calls when writing to a file through a stream. Handle int64 `json:"handle,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateResponse) UnmarshalJSON(b []byte) error { @@ -77,7 +77,7 @@ type Delete struct { // empty directories can be done without providing the recursive flag. Recursive bool `json:"recursive,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Delete) UnmarshalJSON(b []byte) error { @@ -119,7 +119,7 @@ type DirectoryEntry struct { // The absolute path of the file or directory. Path string `json:"path,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DirectoryEntry) UnmarshalJSON(b []byte) error { @@ -145,7 +145,7 @@ type DownloadResponse struct { LastModified string `json:"-" url:"-" header:"last-modified,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DownloadResponse) UnmarshalJSON(b []byte) error { @@ -166,7 +166,7 @@ type FileInfo struct { // The absolute path of the file or directory. Path string `json:"path,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *FileInfo) UnmarshalJSON(b []byte) error { @@ -199,7 +199,7 @@ type GetMetadataResponse struct { LastModified string `json:"-" url:"-" header:"last-modified,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetMetadataResponse) UnmarshalJSON(b []byte) error { @@ -249,7 +249,7 @@ type ListDirectoryContentsRequest struct { // must not be used to determine when the listing is complete. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListDirectoryContentsRequest) UnmarshalJSON(b []byte) error { @@ -266,7 +266,7 @@ type ListDirectoryResponse struct { // A token, which can be sent as `page_token` to retrieve the next page. NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListDirectoryResponse) UnmarshalJSON(b []byte) error { @@ -311,7 +311,7 @@ type Put struct { // The path of the new file. The path should be the absolute DBFS path. Path string `json:"path"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Put) UnmarshalJSON(b []byte) error { @@ -335,7 +335,7 @@ type ReadDbfsRequest struct { // The path of the file to read. The path should be the absolute DBFS path. Path string `json:"-" url:"path"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ReadDbfsRequest) UnmarshalJSON(b []byte) error { @@ -354,7 +354,7 @@ type ReadResponse struct { // The base64-encoded contents of the file read. Data string `json:"data,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ReadResponse) UnmarshalJSON(b []byte) error { @@ -373,7 +373,7 @@ type UploadRequest struct { // If true, an existing file will be overwritten. Overwrite bool `json:"-" url:"overwrite,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UploadRequest) UnmarshalJSON(b []byte) error { diff --git a/iam/v2/model.go b/iam/v2/model.go index 517ceaa98..c7c7ad444 100755 --- a/iam/v2/model.go +++ b/iam/v2/model.go @@ -18,7 +18,7 @@ type AccessControlRequest struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AccessControlRequest) UnmarshalJSON(b []byte) error { @@ -41,7 +41,7 @@ type AccessControlResponse struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AccessControlResponse) UnmarshalJSON(b []byte) error { @@ -58,7 +58,7 @@ func (s AccessControlResponse) MarshalJSON() ([]byte, error) { type Actor struct { ActorId int64 `json:"actor_id,omitempty" url:"actor_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Actor) UnmarshalJSON(b []byte) error { @@ -92,7 +92,7 @@ type CheckPolicyResponse struct { IsPermitted bool `json:"is_permitted,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CheckPolicyResponse) UnmarshalJSON(b []byte) error { @@ -114,7 +114,7 @@ type ComplexValue struct { Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ComplexValue) UnmarshalJSON(b []byte) error { @@ -217,7 +217,7 @@ type GetAccountUserRequest struct { // Specifies the index of the first result. First item is number 1. StartIndex int `json:"-" url:"startIndex,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetAccountUserRequest) UnmarshalJSON(b []byte) error { @@ -348,7 +348,7 @@ type GetUserRequest struct { // Specifies the index of the first result. First item is number 1. StartIndex int `json:"-" url:"startIndex,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetUserRequest) UnmarshalJSON(b []byte) error { @@ -395,7 +395,7 @@ type Group struct { // The schema of the group. Schemas []GroupSchema `json:"schemas,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Group) UnmarshalJSON(b []byte) error { @@ -454,7 +454,7 @@ type ListAccountGroupsRequest struct { // Specifies the index of the first result. First item is number 1. StartIndex int64 `json:"-" url:"startIndex,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAccountGroupsRequest) UnmarshalJSON(b []byte) error { @@ -488,7 +488,7 @@ type ListAccountServicePrincipalsRequest struct { // Specifies the index of the first result. First item is number 1. StartIndex int64 `json:"-" url:"startIndex,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAccountServicePrincipalsRequest) UnmarshalJSON(b []byte) error { @@ -523,7 +523,7 @@ type ListAccountUsersRequest struct { // Specifies the index of the first result. First item is number 1. StartIndex int64 `json:"-" url:"startIndex,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAccountUsersRequest) UnmarshalJSON(b []byte) error { @@ -557,7 +557,7 @@ type ListGroupsRequest struct { // Specifies the index of the first result. First item is number 1. StartIndex int64 `json:"-" url:"startIndex,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListGroupsRequest) UnmarshalJSON(b []byte) error { @@ -581,7 +581,7 @@ type ListGroupsResponse struct { // Total results that match the request filters. TotalResults int64 `json:"totalResults,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListGroupsResponse) UnmarshalJSON(b []byte) error { @@ -630,7 +630,7 @@ type ListServicePrincipalResponse struct { // Total results that match the request filters. TotalResults int64 `json:"totalResults,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListServicePrincipalResponse) UnmarshalJSON(b []byte) error { @@ -664,7 +664,7 @@ type ListServicePrincipalsRequest struct { // Specifies the index of the first result. First item is number 1. StartIndex int64 `json:"-" url:"startIndex,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListServicePrincipalsRequest) UnmarshalJSON(b []byte) error { @@ -726,7 +726,7 @@ type ListUsersRequest struct { // Specifies the index of the first result. First item is number 1. StartIndex int64 `json:"-" url:"startIndex,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListUsersRequest) UnmarshalJSON(b []byte) error { @@ -750,7 +750,7 @@ type ListUsersResponse struct { // Total results that match the request filters. TotalResults int64 `json:"totalResults,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListUsersResponse) UnmarshalJSON(b []byte) error { @@ -778,7 +778,7 @@ type MigratePermissionsRequest struct { // will occur. WorkspaceId int64 `json:"workspace_id"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MigratePermissionsRequest) UnmarshalJSON(b []byte) error { @@ -793,7 +793,7 @@ type MigratePermissionsResponse struct { // Number of permissions migrated. PermissionsMigrated int `json:"permissions_migrated,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MigratePermissionsResponse) UnmarshalJSON(b []byte) error { @@ -810,7 +810,7 @@ type Name struct { // Given name of the Databricks user. GivenName string `json:"givenName,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Name) UnmarshalJSON(b []byte) error { @@ -828,7 +828,7 @@ type ObjectPermissions struct { ObjectType string `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ObjectPermissions) UnmarshalJSON(b []byte) error { @@ -859,7 +859,7 @@ type PasswordAccessControlRequest struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PasswordAccessControlRequest) UnmarshalJSON(b []byte) error { @@ -882,7 +882,7 @@ type PasswordAccessControlResponse struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PasswordAccessControlResponse) UnmarshalJSON(b []byte) error { @@ -900,7 +900,7 @@ type PasswordPermission struct { // Permission level PermissionLevel PasswordPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PasswordPermission) UnmarshalJSON(b []byte) error { @@ -944,7 +944,7 @@ type PasswordPermissions struct { ObjectType string `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PasswordPermissions) UnmarshalJSON(b []byte) error { @@ -960,7 +960,7 @@ type PasswordPermissionsDescription struct { // Permission level PermissionLevel PasswordPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PasswordPermissionsDescription) UnmarshalJSON(b []byte) error { @@ -983,7 +983,7 @@ type Patch struct { // Value to modify Value any `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Patch) UnmarshalJSON(b []byte) error { @@ -1059,7 +1059,7 @@ type Permission struct { // Permission level PermissionLevel PermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Permission) UnmarshalJSON(b []byte) error { @@ -1080,7 +1080,7 @@ type PermissionAssignment struct { // Information about the principal assigned to the workspace. Principal *PrincipalOutput `json:"principal,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PermissionAssignment) UnmarshalJSON(b []byte) error { @@ -1160,7 +1160,7 @@ type PermissionOutput struct { PermissionLevel WorkspacePermission `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PermissionOutput) UnmarshalJSON(b []byte) error { @@ -1176,7 +1176,7 @@ type PermissionsDescription struct { // Permission level PermissionLevel PermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PermissionsDescription) UnmarshalJSON(b []byte) error { @@ -1213,7 +1213,7 @@ type PrincipalOutput struct { // The username of the user. Present only if the principal is a user. UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PrincipalOutput) UnmarshalJSON(b []byte) error { @@ -1262,7 +1262,7 @@ type ResourceInfo struct { // another parent. ParentResourceInfo *ResourceInfo `json:"parent_resource_info,omitempty" url:"parent_resource_info,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ResourceInfo) UnmarshalJSON(b []byte) error { @@ -1278,7 +1278,7 @@ type ResourceMeta struct { // (`WorkspaceGroup`) or account group (`Group`). ResourceType string `json:"resourceType,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ResourceMeta) UnmarshalJSON(b []byte) error { @@ -1302,7 +1302,7 @@ type RuleSetResponse struct { // Name of the rule set. Name string `json:"name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RuleSetResponse) UnmarshalJSON(b []byte) error { @@ -1347,7 +1347,7 @@ type ServicePrincipal struct { // The schema of the List response. Schemas []ServicePrincipalSchema `json:"schemas,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServicePrincipal) UnmarshalJSON(b []byte) error { @@ -1440,7 +1440,7 @@ type User struct { // Email address of the Databricks user. UserName string `json:"userName,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *User) UnmarshalJSON(b []byte) error { diff --git a/jobs/v2/model.go b/jobs/v2/model.go index 4a12a91a8..d4e4bc31e 100755 --- a/jobs/v2/model.go +++ b/jobs/v2/model.go @@ -8,6 +8,231 @@ import ( "github.com/databricks/databricks-sdk-go/databricks/marshal" ) +type Adlsgen2Info struct { + // abfss destination, e.g. + // `abfss://@.dfs.core.windows.net/`. + Destination string `json:"destination"` +} + +type AutoScale struct { + // The maximum number of workers to which the cluster can scale up when + // overloaded. Note that `max_workers` must be strictly greater than + // `min_workers`. + MaxWorkers int `json:"max_workers,omitempty"` + // The minimum number of workers to which the cluster can scale down when + // underutilized. It is also the initial number of workers the cluster will + // have after creation. + MinWorkers int `json:"min_workers,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *AutoScale) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s AutoScale) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type AwsAttributes struct { + // Availability type used for all subsequent nodes past the + // `first_on_demand` ones. + // + // Note: If `first_on_demand` is zero, this availability type will be used + // for the entire cluster. + Availability AwsAvailability `json:"availability,omitempty"` + // The number of volumes launched for each instance. Users can choose up to + // 10 volumes. This feature is only enabled for supported node types. Legacy + // node types cannot specify custom EBS volumes. For node types with no + // instance store, at least one EBS volume needs to be specified; otherwise, + // cluster creation will fail. + // + // These EBS volumes will be mounted at `/ebs0`, `/ebs1`, and etc. Instance + // store volumes will be mounted at `/local_disk0`, `/local_disk1`, and etc. + // + // If EBS volumes are attached, Databricks will configure Spark to use only + // the EBS volumes for scratch storage because heterogenously sized scratch + // devices can lead to inefficient disk utilization. If no EBS volumes are + // attached, Databricks will configure Spark to use instance store volumes. + // + // Please note that if EBS volumes are specified, then the Spark + // configuration `spark.local.dir` will be overridden. + EbsVolumeCount int `json:"ebs_volume_count,omitempty"` + // If using gp3 volumes, what IOPS to use for the disk. If this is not set, + // the maximum performance of a gp2 volume with the same volume size will be + // used. + EbsVolumeIops int `json:"ebs_volume_iops,omitempty"` + // The size of each EBS volume (in GiB) launched for each instance. For + // general purpose SSD, this value must be within the range 100 - 4096. For + // throughput optimized HDD, this value must be within the range 500 - 4096. + EbsVolumeSize int `json:"ebs_volume_size,omitempty"` + // If using gp3 volumes, what throughput to use for the disk. If this is not + // set, the maximum performance of a gp2 volume with the same volume size + // will be used. + EbsVolumeThroughput int `json:"ebs_volume_throughput,omitempty"` + // The type of EBS volumes that will be launched with this cluster. + EbsVolumeType EbsVolumeType `json:"ebs_volume_type,omitempty"` + // The first `first_on_demand` nodes of the cluster will be placed on + // on-demand instances. If this value is greater than 0, the cluster driver + // node in particular will be placed on an on-demand instance. If this value + // is greater than or equal to the current cluster size, all nodes will be + // placed on on-demand instances. If this value is less than the current + // cluster size, `first_on_demand` nodes will be placed on on-demand + // instances and the remainder will be placed on `availability` instances. + // Note that this value does not affect cluster size and cannot currently be + // mutated over the lifetime of a cluster. + FirstOnDemand int `json:"first_on_demand,omitempty"` + // Nodes for this cluster will only be placed on AWS instances with this + // instance profile. If ommitted, nodes will be placed on instances without + // an IAM instance profile. The instance profile must have previously been + // added to the Databricks environment by an account administrator. + // + // This feature may only be available to certain customer plans. + // + // If this field is ommitted, we will pull in the default from the conf if + // it exists. + InstanceProfileArn string `json:"instance_profile_arn,omitempty"` + // The bid price for AWS spot instances, as a percentage of the + // corresponding instance type's on-demand price. For example, if this field + // is set to 50, and the cluster needs a new `r3.xlarge` spot instance, then + // the bid price is half of the price of on-demand `r3.xlarge` instances. + // Similarly, if this field is set to 200, the bid price is twice the price + // of on-demand `r3.xlarge` instances. If not specified, the default value + // is 100. When spot instances are requested for this cluster, only spot + // instances whose bid price percentage matches this field will be + // considered. Note that, for safety, we enforce this field to be no more + // than 10000. + // + // The default value and documentation here should be kept consistent with + // CommonConf.defaultSpotBidPricePercent and + // CommonConf.maxSpotBidPricePercent. + SpotBidPricePercent int `json:"spot_bid_price_percent,omitempty"` + // Identifier for the availability zone/datacenter in which the cluster + // resides. This string will be of a form like "us-west-2a". The provided + // availability zone must be in the same region as the Databricks + // deployment. For example, "us-west-2a" is not a valid zone id if the + // Databricks deployment resides in the "us-east-1" region. This is an + // optional field at cluster creation, and if not specified, a default zone + // will be used. If the zone specified is "auto", will try to place cluster + // in a zone with high availability, and will retry placement in a different + // AZ if there is not enough capacity. The list of available zones as well + // as the default value can be found by using the `List Zones` method. + ZoneId string `json:"zone_id,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *AwsAttributes) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s AwsAttributes) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +// Availability type used for all subsequent nodes past the `first_on_demand` +// ones. +// +// Note: If `first_on_demand` is zero, this availability type will be used for +// the entire cluster. +type AwsAvailability string + +const AwsAvailabilityOnDemand AwsAvailability = `ON_DEMAND` + +const AwsAvailabilitySpot AwsAvailability = `SPOT` + +const AwsAvailabilitySpotWithFallback AwsAvailability = `SPOT_WITH_FALLBACK` + +// String representation for [fmt.Print] +func (f *AwsAvailability) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *AwsAvailability) Set(v string) error { + switch v { + case `ON_DEMAND`, `SPOT`, `SPOT_WITH_FALLBACK`: + *f = AwsAvailability(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "ON_DEMAND", "SPOT", "SPOT_WITH_FALLBACK"`, v) + } +} + +// Type always returns AwsAvailability to satisfy [pflag.Value] interface +func (f *AwsAvailability) Type() string { + return "AwsAvailability" +} + +type AzureAttributes struct { + // Availability type used for all subsequent nodes past the + // `first_on_demand` ones. Note: If `first_on_demand` is zero (which only + // happens on pool clusters), this availability type will be used for the + // entire cluster. + Availability AzureAvailability `json:"availability,omitempty"` + // The first `first_on_demand` nodes of the cluster will be placed on + // on-demand instances. This value should be greater than 0, to make sure + // the cluster driver node is placed on an on-demand instance. If this value + // is greater than or equal to the current cluster size, all nodes will be + // placed on on-demand instances. If this value is less than the current + // cluster size, `first_on_demand` nodes will be placed on on-demand + // instances and the remainder will be placed on `availability` instances. + // Note that this value does not affect cluster size and cannot currently be + // mutated over the lifetime of a cluster. + FirstOnDemand int `json:"first_on_demand,omitempty"` + // Defines values necessary to configure and run Azure Log Analytics agent + LogAnalyticsInfo *LogAnalyticsInfo `json:"log_analytics_info,omitempty"` + // The max bid price to be used for Azure spot instances. The Max price for + // the bid cannot be higher than the on-demand price of the instance. If not + // specified, the default value is -1, which specifies that the instance + // cannot be evicted on the basis of price, and only on the basis of + // availability. Further, the value should > 0 or -1. + SpotBidMaxPrice float64 `json:"spot_bid_max_price,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *AzureAttributes) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s AzureAttributes) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +// Availability type used for all subsequent nodes past the `first_on_demand` +// ones. Note: If `first_on_demand` is zero (which only happens on pool +// clusters), this availability type will be used for the entire cluster. +type AzureAvailability string + +const AzureAvailabilityOnDemandAzure AzureAvailability = `ON_DEMAND_AZURE` + +const AzureAvailabilitySpotAzure AzureAvailability = `SPOT_AZURE` + +const AzureAvailabilitySpotWithFallbackAzure AzureAvailability = `SPOT_WITH_FALLBACK_AZURE` + +// String representation for [fmt.Print] +func (f *AzureAvailability) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *AzureAvailability) Set(v string) error { + switch v { + case `ON_DEMAND_AZURE`, `SPOT_AZURE`, `SPOT_WITH_FALLBACK_AZURE`: + *f = AzureAvailability(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "ON_DEMAND_AZURE", "SPOT_AZURE", "SPOT_WITH_FALLBACK_AZURE"`, v) + } +} + +// Type always returns AzureAvailability to satisfy [pflag.Value] interface +func (f *AzureAvailability) Type() string { + return "AzureAvailability" +} + type BaseJob struct { // The time at which this job was created in epoch milliseconds // (milliseconds since 1/1/1970 UTC). @@ -33,7 +258,7 @@ type BaseJob struct { // using the `resetJob` method. Settings *JobSettings `json:"settings,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *BaseJob) UnmarshalJSON(b []byte) error { @@ -191,7 +416,7 @@ type BaseRun struct { // Additional details about what triggered the run TriggerInfo *TriggerInfo `json:"trigger_info,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *BaseRun) UnmarshalJSON(b []byte) error { @@ -209,7 +434,7 @@ type CancelAllRuns struct { // The canonical identifier of the job to cancel all runs of. JobId int64 `json:"job_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CancelAllRuns) UnmarshalJSON(b []byte) error { @@ -349,7 +574,7 @@ type CleanRoomsNotebookTask struct { // Name of the notebook being run. NotebookName string `json:"notebook_name"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CleanRoomsNotebookTask) UnmarshalJSON(b []byte) error { @@ -369,6 +594,23 @@ type CleanRoomsNotebookTaskCleanRoomsNotebookTaskOutput struct { OutputSchemaInfo *OutputSchemaInfo `json:"output_schema_info,omitempty"` } +type ClientsTypes struct { + // With jobs set, the cluster can be used for jobs + Jobs bool `json:"jobs,omitempty"` + // With notebooks set, this cluster can be used for notebooks + Notebooks bool `json:"notebooks,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *ClientsTypes) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s ClientsTypes) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + type ClusterInstance struct { // The canonical identifier for the cluster used by a run. This field is // always available for runs on existing clusters. For runs on new clusters, @@ -389,7 +631,7 @@ type ClusterInstance struct { // available yet. SparkContextId string `json:"spark_context_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterInstance) UnmarshalJSON(b []byte) error { @@ -400,6 +642,21 @@ func (s ClusterInstance) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +type ClusterLogConf struct { + // destination needs to be provided. e.g. `{ "dbfs" : { "destination" : + // "dbfs:/home/cluster_log" } }` + Dbfs *DbfsStorageInfo `json:"dbfs,omitempty"` + // destination and either the region or endpoint need to be provided. e.g. + // `{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : + // "us-west-2" } }` Cluster iam role is used to access s3, please make sure + // the cluster iam role in `instance_profile_arn` has permission to write + // data to the s3 destination. + S3 *S3StorageInfo `json:"s3,omitempty"` + // destination needs to be provided. e.g. `{ "volumes" : { "destination" : + // "/Volumes/catalog/schema/volume/cluster_log" } }` + Volumes *VolumesStorageInfo `json:"volumes,omitempty"` +} + type ClusterSpec struct { // If existing_cluster_id, the ID of an existing cluster that is used for // all runs. When running jobs or tasks on an existing cluster, you may need @@ -416,7 +673,7 @@ type ClusterSpec struct { // run. NewCluster *ClusterSpec `json:"new_cluster,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterSpec) UnmarshalJSON(b []byte) error { @@ -427,6 +684,26 @@ func (s ClusterSpec) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// Next field: 4 +type ComputeConfig struct { + // IDof the GPU pool to use. + GpuNodePoolId string `json:"gpu_node_pool_id"` + // GPU type. + GpuType string `json:"gpu_type,omitempty"` + // Number of GPUs. + NumGpus int `json:"num_gpus"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *ComputeConfig) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s ComputeConfig) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + type Condition string const ConditionAllUpdated Condition = `ALL_UPDATED` @@ -637,7 +914,7 @@ type CreateJob struct { // begin or complete. WebhookNotifications *WebhookNotifications `json:"webhook_notifications,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateJob) UnmarshalJSON(b []byte) error { @@ -653,7 +930,7 @@ type CreateResponse struct { // The canonical identifier for the newly created job. JobId int64 `json:"job_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateResponse) UnmarshalJSON(b []byte) error { @@ -679,6 +956,102 @@ type CronSchedule struct { TimezoneId string `json:"timezone_id"` } +// Data security mode decides what data governance model to use when accessing +// data from a cluster. +// +// The following modes can only be used when `kind = CLASSIC_PREVIEW`. * +// `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate access +// mode depending on your compute configuration. * +// `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * +// `DATA_SECURITY_MODE_DEDICATED`: Alias for `SINGLE_USER`. +// +// The following modes can be used regardless of `kind`. * `NONE`: No security +// isolation for multiple users sharing the cluster. Data governance features +// are not available in this mode. * `SINGLE_USER`: A secure cluster that can +// only be exclusively used by a single user specified in `single_user_name`. +// Most programming languages, cluster features and data governance features are +// available in this mode. * `USER_ISOLATION`: A secure cluster that can be +// shared by multiple users. Cluster users are fully isolated so that they +// cannot see each other's data and credentials. Most data governance features +// are supported in this mode. But programming languages and cluster features +// might be limited. +// +// The following modes are deprecated starting with Databricks Runtime 15.0 and +// will be removed for future Databricks Runtime versions: +// +// * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table ACL +// clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating from +// legacy Passthrough on high concurrency clusters. * `LEGACY_SINGLE_USER`: This +// mode is for users migrating from legacy Passthrough on standard clusters. * +// `LEGACY_SINGLE_USER_STANDARD`: This mode provides a way that doesn’t have +// UC nor passthrough enabled. +type DataSecurityMode string + +// will choose the most appropriate access mode depending on your +// compute configuration. +const DataSecurityModeDataSecurityModeAuto DataSecurityMode = `DATA_SECURITY_MODE_AUTO` + +// Alias for `SINGLE_USER`. +const DataSecurityModeDataSecurityModeDedicated DataSecurityMode = `DATA_SECURITY_MODE_DEDICATED` + +// Alias for `USER_ISOLATION`. +const DataSecurityModeDataSecurityModeStandard DataSecurityMode = `DATA_SECURITY_MODE_STANDARD` + +// This mode is for users migrating from legacy Passthrough on high concurrency +// clusters. +const DataSecurityModeLegacyPassthrough DataSecurityMode = `LEGACY_PASSTHROUGH` + +// This mode is for users migrating from legacy Passthrough on standard +// clusters. +const DataSecurityModeLegacySingleUser DataSecurityMode = `LEGACY_SINGLE_USER` + +// This mode provides a way that doesn’t have UC nor passthrough enabled. +const DataSecurityModeLegacySingleUserStandard DataSecurityMode = `LEGACY_SINGLE_USER_STANDARD` + +// This mode is for users migrating from legacy Table ACL clusters. +const DataSecurityModeLegacyTableAcl DataSecurityMode = `LEGACY_TABLE_ACL` + +// No security isolation for multiple users sharing the cluster. Data governance +// features are not available in this mode. +const DataSecurityModeNone DataSecurityMode = `NONE` + +// A secure cluster that can only be exclusively used by a single user specified +// in `single_user_name`. Most programming languages, cluster features and data +// governance features are available in this mode. +const DataSecurityModeSingleUser DataSecurityMode = `SINGLE_USER` + +// A secure cluster that can be shared by multiple users. Cluster users are +// fully isolated so that they cannot see each other's data and credentials. +// Most data governance features are supported in this mode. But programming +// languages and cluster features might be limited. +const DataSecurityModeUserIsolation DataSecurityMode = `USER_ISOLATION` + +// String representation for [fmt.Print] +func (f *DataSecurityMode) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *DataSecurityMode) Set(v string) error { + switch v { + case `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, `DATA_SECURITY_MODE_STANDARD`, `LEGACY_PASSTHROUGH`, `LEGACY_SINGLE_USER`, `LEGACY_SINGLE_USER_STANDARD`, `LEGACY_TABLE_ACL`, `NONE`, `SINGLE_USER`, `USER_ISOLATION`: + *f = DataSecurityMode(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "DATA_SECURITY_MODE_AUTO", "DATA_SECURITY_MODE_DEDICATED", "DATA_SECURITY_MODE_STANDARD", "LEGACY_PASSTHROUGH", "LEGACY_SINGLE_USER", "LEGACY_SINGLE_USER_STANDARD", "LEGACY_TABLE_ACL", "NONE", "SINGLE_USER", "USER_ISOLATION"`, v) + } +} + +// Type always returns DataSecurityMode to satisfy [pflag.Value] interface +func (f *DataSecurityMode) Type() string { + return "DataSecurityMode" +} + +type DbfsStorageInfo struct { + // dbfs destination, e.g. `dbfs:/my/path` + Destination string `json:"destination"` +} + type DbtOutput struct { // An optional map of headers to send when retrieving the artifact from the // `artifacts_link`. @@ -688,7 +1061,7 @@ type DbtOutput struct { // after the run has finished. ArtifactsLink string `json:"artifacts_link,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DbtOutput) UnmarshalJSON(b []byte) error { @@ -735,7 +1108,7 @@ type DbtTask struct { // line argument. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DbtTask) UnmarshalJSON(b []byte) error { @@ -762,6 +1135,67 @@ type DeleteRun struct { type DeleteRunResponse struct { } +type DockerBasicAuth struct { + // Password of the user + Password string `json:"password,omitempty"` + // Name of the user + Username string `json:"username,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *DockerBasicAuth) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s DockerBasicAuth) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type DockerImage struct { + BasicAuth *DockerBasicAuth `json:"basic_auth,omitempty"` + // URL of the docker image. + Url string `json:"url,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *DockerImage) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s DockerImage) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +// The type of EBS volumes that will be launched with this cluster. +type EbsVolumeType string + +const EbsVolumeTypeGeneralPurposeSsd EbsVolumeType = `GENERAL_PURPOSE_SSD` + +const EbsVolumeTypeThroughputOptimizedHdd EbsVolumeType = `THROUGHPUT_OPTIMIZED_HDD` + +// String representation for [fmt.Print] +func (f *EbsVolumeType) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *EbsVolumeType) Set(v string) error { + switch v { + case `GENERAL_PURPOSE_SSD`, `THROUGHPUT_OPTIMIZED_HDD`: + *f = EbsVolumeType(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "GENERAL_PURPOSE_SSD", "THROUGHPUT_OPTIMIZED_HDD"`, v) + } +} + +// Type always returns EbsVolumeType to satisfy [pflag.Value] interface +func (f *EbsVolumeType) Type() string { + return "EbsVolumeType" +} + // Represents a change to the job cluster's settings that would be required for // the job clusters to become compliant with their policies. type EnforcePolicyComplianceForJobResponseJobClusterSettingsChange struct { @@ -779,7 +1213,7 @@ type EnforcePolicyComplianceForJobResponseJobClusterSettingsChange struct { // reading the settings field in the API response. PreviousValue string `json:"previous_value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EnforcePolicyComplianceForJobResponseJobClusterSettingsChange) UnmarshalJSON(b []byte) error { @@ -797,7 +1231,7 @@ type EnforcePolicyComplianceRequest struct { // does not update the job. ValidateOnly bool `json:"validate_only,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EnforcePolicyComplianceRequest) UnmarshalJSON(b []byte) error { @@ -824,7 +1258,7 @@ type EnforcePolicyComplianceResponse struct { // requirements. Settings *JobSettings `json:"settings,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EnforcePolicyComplianceResponse) UnmarshalJSON(b []byte) error { @@ -885,7 +1319,7 @@ type FileArrivalTriggerConfiguration struct { // allowed value is 60 seconds. WaitAfterLastChangeSeconds int `json:"wait_after_last_change_seconds,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *FileArrivalTriggerConfiguration) UnmarshalJSON(b []byte) error { @@ -914,7 +1348,7 @@ type ForEachTask struct { // Configuration for the task that will be run for each element in the array Task Task `json:"task"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ForEachTask) UnmarshalJSON(b []byte) error { @@ -934,7 +1368,7 @@ type ForEachTaskErrorMessageStats struct { // Describes the termination reason for the error message. TerminationCategory string `json:"termination_category,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ForEachTaskErrorMessageStats) UnmarshalJSON(b []byte) error { @@ -960,7 +1394,7 @@ type ForEachTaskTaskRunStats struct { // Describes the length of the list of items to iterate over. TotalIterations int `json:"total_iterations,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ForEachTaskTaskRunStats) UnmarshalJSON(b []byte) error { @@ -998,6 +1432,132 @@ func (f *Format) Type() string { return "Format" } +type GcpAttributes struct { + // This field determines whether the instance pool will contain preemptible + // VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs + // if the former is unavailable. + Availability GcpAvailability `json:"availability,omitempty"` + // boot disk size in GB + BootDiskSize int `json:"boot_disk_size,omitempty"` + // If provided, the cluster will impersonate the google service account when + // accessing gcloud services (like GCS). The google service account must + // have previously been added to the Databricks environment by an account + // administrator. + GoogleServiceAccount string `json:"google_service_account,omitempty"` + // If provided, each node (workers and driver) in the cluster will have this + // number of local SSDs attached. Each local SSD is 375GB in size. Refer to + // [GCP documentation] for the supported number of local SSDs for each + // instance type. + // + // [GCP documentation]: https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds + LocalSsdCount int `json:"local_ssd_count,omitempty"` + // This field determines whether the spark executors will be scheduled to + // run on preemptible VMs (when set to true) versus standard compute engine + // VMs (when set to false; default). Note: Soon to be deprecated, use the + // availability field instead. + UsePreemptibleExecutors bool `json:"use_preemptible_executors,omitempty"` + // Identifier for the availability zone in which the cluster resides. This + // can be one of the following: - "HA" => High availability, spread nodes + // across availability zones for a Databricks deployment region [default] - + // "AUTO" => Databricks picks an availability zone to schedule the cluster + // on. - A GCP availability zone => Pick One of the available zones for + // (machine type + region) from + // https://cloud.google.com/compute/docs/regions-zones. + ZoneId string `json:"zone_id,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *GcpAttributes) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s GcpAttributes) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +// This field determines whether the instance pool will contain preemptible VMs, +// on-demand VMs, or preemptible VMs with a fallback to on-demand VMs if the +// former is unavailable. +type GcpAvailability string + +const GcpAvailabilityOnDemandGcp GcpAvailability = `ON_DEMAND_GCP` + +const GcpAvailabilityPreemptibleGcp GcpAvailability = `PREEMPTIBLE_GCP` + +const GcpAvailabilityPreemptibleWithFallbackGcp GcpAvailability = `PREEMPTIBLE_WITH_FALLBACK_GCP` + +// String representation for [fmt.Print] +func (f *GcpAvailability) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *GcpAvailability) Set(v string) error { + switch v { + case `ON_DEMAND_GCP`, `PREEMPTIBLE_GCP`, `PREEMPTIBLE_WITH_FALLBACK_GCP`: + *f = GcpAvailability(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "ON_DEMAND_GCP", "PREEMPTIBLE_GCP", "PREEMPTIBLE_WITH_FALLBACK_GCP"`, v) + } +} + +// Type always returns GcpAvailability to satisfy [pflag.Value] interface +func (f *GcpAvailability) Type() string { + return "GcpAvailability" +} + +type GcsStorageInfo struct { + // GCS destination/URI, e.g. `gs://my-bucket/some-prefix` + Destination string `json:"destination"` +} + +// Next field: 9 +type GenAiComputeTask struct { + // Command launcher to run the actual script, e.g. bash, python etc. + Command string `json:"command,omitempty"` + // Next field: 4 + Compute *ComputeConfig `json:"compute,omitempty"` + // Runtime image + DlRuntimeImage string `json:"dl_runtime_image"` + // Optional string containing the name of the MLflow experiment to log the + // run to. If name is not found, backend will create the mlflow experiment + // using the name. + MlflowExperimentName string `json:"mlflow_experiment_name,omitempty"` + // Optional location type of the training script. When set to `WORKSPACE`, + // the script will be retrieved from the local Databricks workspace. When + // set to `GIT`, the script will be retrieved from a Git repository defined + // in `git_source`. If the value is empty, the task will use `GIT` if + // `git_source` is defined and `WORKSPACE` otherwise. * `WORKSPACE`: Script + // is located in Databricks workspace. * `GIT`: Script is located in cloud + // Git provider. + Source Source `json:"source,omitempty"` + // The training script file path to be executed. Cloud file URIs (such as + // dbfs:/, s3:/, adls:/, gcs:/) and workspace paths are supported. For + // python files stored in the Databricks workspace, the path must be + // absolute and begin with `/`. For files stored in a remote repository, the + // path must be relative. This field is required. + TrainingScriptPath string `json:"training_script_path,omitempty"` + // Optional string containing model parameters passed to the training script + // in yaml format. If present, then the content in yaml_parameters_file_path + // will be ignored. + YamlParameters string `json:"yaml_parameters,omitempty"` + // Optional path to a YAML file containing model parameters passed to the + // training script. + YamlParametersFilePath string `json:"yaml_parameters_file_path,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *GenAiComputeTask) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s GenAiComputeTask) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + // Get job permission levels type GetJobPermissionLevelsRequest struct { // The job for which to get or manage permissions. @@ -1024,7 +1584,7 @@ type GetJobRequest struct { // next page of the job's sub-resources. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetJobRequest) UnmarshalJSON(b []byte) error { @@ -1054,7 +1614,7 @@ type GetPolicyComplianceResponse struct { // validation error. Violations map[string]string `json:"violations,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetPolicyComplianceResponse) UnmarshalJSON(b []byte) error { @@ -1084,7 +1644,7 @@ type GetRunRequest struct { // This field is required. RunId int64 `json:"-" url:"run_id"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetRunRequest) UnmarshalJSON(b []byte) error { @@ -1142,7 +1702,7 @@ type GitSnapshot struct { // was specified, this points to the commit the tag points to. UsedCommit string `json:"used_commit,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GitSnapshot) UnmarshalJSON(b []byte) error { @@ -1185,7 +1745,7 @@ type GitSource struct { // is source controlled. JobSource *JobSource `json:"job_source,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GitSource) UnmarshalJSON(b []byte) error { @@ -1196,6 +1756,34 @@ func (s GitSource) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +type InitScriptInfo struct { + // destination needs to be provided. e.g. `{ "abfss" : { "destination" : + // "abfss://@.dfs.core.windows.net/" + // } } + Abfss *Adlsgen2Info `json:"abfss,omitempty"` + // destination needs to be provided. e.g. `{ "dbfs" : { "destination" : + // "dbfs:/home/cluster_log" } }` + Dbfs *DbfsStorageInfo `json:"dbfs,omitempty"` + // destination needs to be provided. e.g. `{ "file" : { "destination" : + // "file:/my/local/file.sh" } }` + File *LocalFileInfo `json:"file,omitempty"` + // destination needs to be provided. e.g. `{ "gcs": { "destination": + // "gs://my-bucket/file.sh" } }` + Gcs *GcsStorageInfo `json:"gcs,omitempty"` + // destination and either the region or endpoint need to be provided. e.g. + // `{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : + // "us-west-2" } }` Cluster iam role is used to access s3, please make sure + // the cluster iam role in `instance_profile_arn` has permission to write + // data to the s3 destination. + S3 *S3StorageInfo `json:"s3,omitempty"` + // destination needs to be provided. e.g. `{ "volumes" : { "destination" : + // "/Volumes/my-init.sh" } }` + Volumes *VolumesStorageInfo `json:"volumes,omitempty"` + // destination needs to be provided. e.g. `{ "workspace" : { "destination" : + // "/Users/user1@databricks.com/my-init.sh" } }` + Workspace *WorkspaceStorageInfo `json:"workspace,omitempty"` +} + // Job was retrieved successfully. type Job struct { // The time at which this job was created in epoch milliseconds @@ -1232,7 +1820,7 @@ type Job struct { // using the `resetJob` method. Settings *JobSettings `json:"settings,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Job) UnmarshalJSON(b []byte) error { @@ -1253,7 +1841,7 @@ type JobAccessControlRequest struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *JobAccessControlRequest) UnmarshalJSON(b []byte) error { @@ -1276,7 +1864,7 @@ type JobAccessControlResponse struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *JobAccessControlResponse) UnmarshalJSON(b []byte) error { @@ -1293,7 +1881,7 @@ type JobCluster struct { // determine which cluster to launch for the task execution. JobClusterKey string `json:"job_cluster_key"` // If new_cluster, a description of a cluster that is created for each task. - NewCluster ClusterSpec `json:"new_cluster"` + NewCluster JobsClusterSpec `json:"new_cluster"` } type JobCompliance struct { @@ -1308,7 +1896,7 @@ type JobCompliance struct { // validation error. Violations map[string]string `json:"violations,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *JobCompliance) UnmarshalJSON(b []byte) error { @@ -1327,7 +1915,7 @@ type JobDeployment struct { // Path of the file that contains deployment metadata. MetadataFilePath string `json:"metadata_file_path,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *JobDeployment) UnmarshalJSON(b []byte) error { @@ -1433,7 +2021,7 @@ type JobEmailNotifications struct { // notifications are not sent. OnSuccess []string `json:"on_success,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *JobEmailNotifications) UnmarshalJSON(b []byte) error { @@ -1461,7 +2049,7 @@ type JobNotificationSettings struct { // `on_failure` if the run is skipped. NoAlertForSkippedRuns bool `json:"no_alert_for_skipped_runs,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *JobNotificationSettings) UnmarshalJSON(b []byte) error { @@ -1480,7 +2068,7 @@ type JobParameter struct { // The value used in the run Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *JobParameter) UnmarshalJSON(b []byte) error { @@ -1506,7 +2094,7 @@ type JobPermission struct { // Permission level PermissionLevel JobPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *JobPermission) UnmarshalJSON(b []byte) error { @@ -1556,7 +2144,7 @@ type JobPermissions struct { ObjectType string `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *JobPermissions) UnmarshalJSON(b []byte) error { @@ -1572,7 +2160,7 @@ type JobPermissionsDescription struct { // Permission level PermissionLevel JobPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *JobPermissionsDescription) UnmarshalJSON(b []byte) error { @@ -1602,7 +2190,7 @@ type JobRunAs struct { // field to their own email. UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *JobRunAs) UnmarshalJSON(b []byte) error { @@ -1723,7 +2311,7 @@ type JobSettings struct { // begin or complete. WebhookNotifications *WebhookNotifications `json:"webhook_notifications,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *JobSettings) UnmarshalJSON(b []byte) error { @@ -1793,6 +2381,205 @@ func (f *JobSourceDirtyState) Type() string { return "JobSourceDirtyState" } +type JobsClusterSpec struct { + // When set to true, fixed and default values from the policy will be used + // for fields that are omitted. When set to false, only fixed values from + // the policy will be applied. + ApplyPolicyDefaultValues bool `json:"apply_policy_default_values,omitempty"` + // Parameters needed in order to automatically scale clusters up and down + // based on load. Note: autoscaling works best with DB runtime versions 3.0 + // or later. + Autoscale *AutoScale `json:"autoscale,omitempty"` + // Automatically terminates the cluster after it is inactive for this time + // in minutes. If not set, this cluster will not be automatically + // terminated. If specified, the threshold must be between 10 and 10000 + // minutes. Users can also set this value to 0 to explicitly disable + // automatic termination. + AutoterminationMinutes int `json:"autotermination_minutes,omitempty"` + // Attributes related to clusters running on Amazon Web Services. If not + // specified at cluster creation, a set of default values will be used. + AwsAttributes *AwsAttributes `json:"aws_attributes,omitempty"` + // Attributes related to clusters running on Microsoft Azure. If not + // specified at cluster creation, a set of default values will be used. + AzureAttributes *AzureAttributes `json:"azure_attributes,omitempty"` + // The configuration for delivering spark logs to a long-term storage + // destination. Three kinds of destinations (DBFS, S3 and Unity Catalog + // volumes) are supported. Only one destination can be specified for one + // cluster. If the conf is given, the logs will be delivered to the + // destination every `5 mins`. The destination of driver logs is + // `$destination/$clusterId/driver`, while the destination of executor logs + // is `$destination/$clusterId/executor`. + ClusterLogConf *ClusterLogConf `json:"cluster_log_conf,omitempty"` + // Cluster name requested by the user. This doesn't have to be unique. If + // not specified at creation, the cluster name will be an empty string. + ClusterName string `json:"cluster_name,omitempty"` + // Additional tags for cluster resources. Databricks will tag all cluster + // resources (e.g., AWS instances and EBS volumes) with these tags in + // addition to `default_tags`. Notes: + // + // - Currently, Databricks allows at most 45 custom tags + // + // - Clusters can only reuse cloud resources if the resources' tags are a + // subset of the cluster tags + CustomTags map[string]string `json:"custom_tags,omitempty"` + // Data security mode decides what data governance model to use when + // accessing data from a cluster. + // + // The following modes can only be used when `kind = CLASSIC_PREVIEW`. * + // `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate + // access mode depending on your compute configuration. * + // `DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * + // `DATA_SECURITY_MODE_DEDICATED`: Alias for `SINGLE_USER`. + // + // The following modes can be used regardless of `kind`. * `NONE`: No + // security isolation for multiple users sharing the cluster. Data + // governance features are not available in this mode. * `SINGLE_USER`: A + // secure cluster that can only be exclusively used by a single user + // specified in `single_user_name`. Most programming languages, cluster + // features and data governance features are available in this mode. * + // `USER_ISOLATION`: A secure cluster that can be shared by multiple users. + // Cluster users are fully isolated so that they cannot see each other's + // data and credentials. Most data governance features are supported in this + // mode. But programming languages and cluster features might be limited. + // + // The following modes are deprecated starting with Databricks Runtime 15.0 + // and will be removed for future Databricks Runtime versions: + // + // * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table + // ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating + // from legacy Passthrough on high concurrency clusters. * + // `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy + // Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This + // mode provides a way that doesn’t have UC nor passthrough enabled. + DataSecurityMode DataSecurityMode `json:"data_security_mode,omitempty"` + + DockerImage *DockerImage `json:"docker_image,omitempty"` + // The optional ID of the instance pool for the driver of the cluster + // belongs. The pool cluster uses the instance pool with id + // (instance_pool_id) if the driver pool is not assigned. + DriverInstancePoolId string `json:"driver_instance_pool_id,omitempty"` + // The node type of the Spark driver. Note that this field is optional; if + // unset, the driver node type will be set as the same value as + // `node_type_id` defined above. + DriverNodeTypeId string `json:"driver_node_type_id,omitempty"` + // Autoscaling Local Storage: when enabled, this cluster will dynamically + // acquire additional disk space when its Spark workers are running low on + // disk space. This feature requires specific AWS permissions to function + // correctly - refer to the User Guide for more details. + EnableElasticDisk bool `json:"enable_elastic_disk,omitempty"` + // Whether to enable LUKS on cluster VMs' local disks + EnableLocalDiskEncryption bool `json:"enable_local_disk_encryption,omitempty"` + // Attributes related to clusters running on Google Cloud Platform. If not + // specified at cluster creation, a set of default values will be used. + GcpAttributes *GcpAttributes `json:"gcp_attributes,omitempty"` + // The configuration for storing init scripts. Any number of destinations + // can be specified. The scripts are executed sequentially in the order + // provided. If `cluster_log_conf` is specified, init script logs are sent + // to `//init_scripts`. + InitScripts []InitScriptInfo `json:"init_scripts,omitempty"` + // The optional ID of the instance pool to which the cluster belongs. + InstancePoolId string `json:"instance_pool_id,omitempty"` + // This field can only be used when `kind = CLASSIC_PREVIEW`. + // + // When set to true, Databricks will automatically set single node related + // `custom_tags`, `spark_conf`, and `num_workers` + IsSingleNode bool `json:"is_single_node,omitempty"` + // The kind of compute described by this compute specification. + // + // Depending on `kind`, different validations and default values will be + // applied. + // + // Clusters with `kind = CLASSIC_PREVIEW` support the following fields, + // whereas clusters with no specified `kind` do not. * + // [is_single_node](/api/workspace/clusters/create#is_single_node) * + // [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * + // [data_security_mode](/api/workspace/clusters/create#data_security_mode) + // set to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or + // `DATA_SECURITY_MODE_STANDARD` + // + // By using the [simple form], your clusters are automatically using `kind = + // CLASSIC_PREVIEW`. + // + // [simple form]: https://docs.databricks.com/compute/simple-form.html + Kind Kind `json:"kind,omitempty"` + // This field encodes, through a single value, the resources available to + // each of the Spark nodes in this cluster. For example, the Spark nodes can + // be provisioned and optimized for memory or compute intensive workloads. A + // list of available node types can be retrieved by using the + // :method:clusters/listNodeTypes API call. + NodeTypeId string `json:"node_type_id,omitempty"` + // Number of worker nodes that this cluster should have. A cluster has one + // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 + // Spark nodes. + // + // Note: When reading the properties of a cluster, this field reflects the + // desired number of workers rather than the actual current number of + // workers. For instance, if a cluster is resized from 5 to 10 workers, this + // field will immediately be updated to reflect the target size of 10 + // workers, whereas the workers listed in `spark_info` will gradually + // increase from 5 to 10 as the new nodes are provisioned. + NumWorkers int `json:"num_workers,omitempty"` + // The ID of the cluster policy used to create the cluster if applicable. + PolicyId string `json:"policy_id,omitempty"` + // Determines the cluster's runtime engine, either standard or Photon. + // + // This field is not compatible with legacy `spark_version` values that + // contain `-photon-`. Remove `-photon-` from the `spark_version` and set + // `runtime_engine` to `PHOTON`. + // + // If left unspecified, the runtime engine defaults to standard unless the + // spark_version contains -photon-, in which case Photon will be used. + RuntimeEngine RuntimeEngine `json:"runtime_engine,omitempty"` + // Single user name if data_security_mode is `SINGLE_USER` + SingleUserName string `json:"single_user_name,omitempty"` + // An object containing a set of optional, user-specified Spark + // configuration key-value pairs. Users can also pass in a string of extra + // JVM options to the driver and the executors via + // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` + // respectively. + SparkConf map[string]string `json:"spark_conf,omitempty"` + // An object containing a set of optional, user-specified environment + // variable key-value pairs. Please note that key-value pair of the form + // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the + // driver and workers. + // + // In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we + // recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the + // example below. This ensures that all default databricks managed + // environmental variables are included as well. + // + // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", + // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": + // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` + SparkEnvVars map[string]string `json:"spark_env_vars,omitempty"` + // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of + // available Spark versions can be retrieved by using the + // :method:clusters/sparkVersions API call. + SparkVersion string `json:"spark_version,omitempty"` + // SSH public key contents that will be added to each Spark node in this + // cluster. The corresponding private keys can be used to login with the + // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. + SshPublicKeys []string `json:"ssh_public_keys,omitempty"` + // This field can only be used when `kind = CLASSIC_PREVIEW`. + // + // `effective_spark_version` is determined by `spark_version` (DBR release), + // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or + // not. + UseMlRuntime bool `json:"use_ml_runtime,omitempty"` + + WorkloadType *WorkloadType `json:"workload_type,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *JobsClusterSpec) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s JobsClusterSpec) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + // Specifies the health metric that is being evaluated for a particular health // rule. // @@ -1901,6 +2688,48 @@ type JobsHealthRules struct { Rules []JobsHealthRule `json:"rules,omitempty"` } +// The kind of compute described by this compute specification. +// +// Depending on `kind`, different validations and default values will be +// applied. +// +// Clusters with `kind = CLASSIC_PREVIEW` support the following fields, whereas +// clusters with no specified `kind` do not. * +// [is_single_node](/api/workspace/clusters/create#is_single_node) * +// [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) * +// [data_security_mode](/api/workspace/clusters/create#data_security_mode) set +// to `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_DEDICATED`, or +// `DATA_SECURITY_MODE_STANDARD` +// +// By using the [simple form], your clusters are automatically using `kind = +// CLASSIC_PREVIEW`. +// +// [simple form]: https://docs.databricks.com/compute/simple-form.html +type Kind string + +const KindClassicPreview Kind = `CLASSIC_PREVIEW` + +// String representation for [fmt.Print] +func (f *Kind) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *Kind) Set(v string) error { + switch v { + case `CLASSIC_PREVIEW`: + *f = Kind(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "CLASSIC_PREVIEW"`, v) + } +} + +// Type always returns Kind to satisfy [pflag.Value] interface +func (f *Kind) Type() string { + return "Kind" +} + type Library struct { // Specification of a CRAN library to be installed as part of the library Cran *RCranLibrary `json:"cran,omitempty"` @@ -1936,7 +2765,7 @@ type Library struct { // cluster with an IAM role to access the S3 URI. Whl string `json:"whl,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Library) UnmarshalJSON(b []byte) error { @@ -1959,7 +2788,7 @@ type ListJobComplianceForPolicyResponse struct { // results for the request. PrevPageToken string `json:"prev_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListJobComplianceForPolicyResponse) UnmarshalJSON(b []byte) error { @@ -1982,7 +2811,7 @@ type ListJobComplianceRequest struct { // Canonical unique identifier for the cluster policy. PolicyId string `json:"-" url:"policy_id"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListJobComplianceRequest) UnmarshalJSON(b []byte) error { @@ -2012,7 +2841,7 @@ type ListJobsRequest struct { // request to list the next or previous page of jobs respectively. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListJobsRequest) UnmarshalJSON(b []byte) error { @@ -2037,7 +2866,7 @@ type ListJobsResponse struct { // applicable). PrevPageToken string `json:"prev_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListJobsResponse) UnmarshalJSON(b []byte) error { @@ -2089,7 +2918,7 @@ type ListRunsRequest struct { // filter by a time range. StartTimeTo int64 `json:"-" url:"start_time_to,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListRunsRequest) UnmarshalJSON(b []byte) error { @@ -2114,7 +2943,7 @@ type ListRunsResponse struct { // response if there are runs to list. Runs []BaseRun `json:"runs,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListRunsResponse) UnmarshalJSON(b []byte) error { @@ -2125,6 +2954,28 @@ func (s ListRunsResponse) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +type LocalFileInfo struct { + // local file destination, e.g. `file:/my/local/file.sh` + Destination string `json:"destination"` +} + +type LogAnalyticsInfo struct { + // + LogAnalyticsPrimaryKey string `json:"log_analytics_primary_key,omitempty"` + // + LogAnalyticsWorkspaceId string `json:"log_analytics_workspace_id,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *LogAnalyticsInfo) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s LogAnalyticsInfo) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + type MavenLibrary struct { // Gradle-style maven coordinates. For example: "org.jsoup:jsoup:1.7.2". Coordinates string `json:"coordinates"` @@ -2138,7 +2989,7 @@ type MavenLibrary struct { // Central Repository and Spark Packages are searched. Repo string `json:"repo,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MavenLibrary) UnmarshalJSON(b []byte) error { @@ -2160,7 +3011,7 @@ type NotebookOutput struct { // Whether or not the result was truncated. Truncated bool `json:"truncated,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *NotebookOutput) UnmarshalJSON(b []byte) error { @@ -2211,7 +3062,7 @@ type NotebookTask struct { // non-SQL cells, the run will fail. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *NotebookTask) UnmarshalJSON(b []byte) error { @@ -2232,7 +3083,7 @@ type OutputSchemaInfo struct { SchemaName string `json:"schema_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *OutputSchemaInfo) UnmarshalJSON(b []byte) error { @@ -2341,7 +3192,7 @@ type PipelineParams struct { // If true, triggers a full refresh on the delta live table. FullRefresh bool `json:"full_refresh,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PipelineParams) UnmarshalJSON(b []byte) error { @@ -2358,7 +3209,7 @@ type PipelineTask struct { // The full name of the pipeline task to execute. PipelineId string `json:"pipeline_id"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PipelineTask) UnmarshalJSON(b []byte) error { @@ -2378,7 +3229,7 @@ type PythonPyPiLibrary struct { // default pip index is used. Repo string `json:"repo,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PythonPyPiLibrary) UnmarshalJSON(b []byte) error { @@ -2417,7 +3268,7 @@ type QueueDetails struct { // unstructured, and its exact format is subject to change. Message string `json:"message,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QueueDetails) UnmarshalJSON(b []byte) error { @@ -2478,7 +3329,7 @@ type RCranLibrary struct { // default CRAN repo is used. Repo string `json:"repo,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RCranLibrary) UnmarshalJSON(b []byte) error { @@ -2508,7 +3359,7 @@ type RepairHistoryItem struct { // or a repair run. Type RepairHistoryItemType `json:"type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RepairHistoryItem) UnmarshalJSON(b []byte) error { @@ -2650,7 +3501,7 @@ type RepairRun struct { // does not support custom parameters. SqlParams map[string]string `json:"sql_params,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RepairRun) UnmarshalJSON(b []byte) error { @@ -2667,7 +3518,7 @@ type RepairRunResponse struct { // `latest_repair_id` field to ensure sequential repairs. RepairId int64 `json:"repair_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RepairRunResponse) UnmarshalJSON(b []byte) error { @@ -2697,7 +3548,7 @@ type ResolvedConditionTaskValues struct { Right string `json:"right,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ResolvedConditionTaskValues) UnmarshalJSON(b []byte) error { @@ -2911,7 +3762,7 @@ type Run struct { // Additional details about what triggered the run TriggerInfo *TriggerInfo `json:"trigger_info,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Run) UnmarshalJSON(b []byte) error { @@ -2944,7 +3795,7 @@ type RunConditionTask struct { // a job state or parameter reference. Right string `json:"right"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RunConditionTask) UnmarshalJSON(b []byte) error { @@ -2969,7 +3820,7 @@ type RunForEachTask struct { // Configuration for the task that will be run for each element in the array Task Task `json:"task"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RunForEachTask) UnmarshalJSON(b []byte) error { @@ -3035,7 +3886,7 @@ type RunJobOutput struct { // The run id of the triggered job run RunId int64 `json:"run_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RunJobOutput) UnmarshalJSON(b []byte) error { @@ -3355,7 +4206,7 @@ type RunNow struct { // does not support custom parameters. SqlParams map[string]string `json:"sql_params,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RunNow) UnmarshalJSON(b []byte) error { @@ -3374,7 +4225,7 @@ type RunNowResponse struct { // The globally unique ID of the newly triggered run. RunId int64 `json:"run_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RunNowResponse) UnmarshalJSON(b []byte) error { @@ -3426,7 +4277,7 @@ type RunOutput struct { // The output of a SQL task, if available. SqlOutput *SqlOutput `json:"sql_output,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RunOutput) UnmarshalJSON(b []byte) error { @@ -3605,7 +4456,7 @@ type RunState struct { // the scheduler because the run timed out. UserCancelledOrTimedout bool `json:"user_cancelled_or_timedout,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RunState) UnmarshalJSON(b []byte) error { @@ -3703,6 +4554,8 @@ type RunTask struct { // The task executes a nested task for every input provided when the // `for_each_task` field is present. ForEachTask *RunForEachTask `json:"for_each_task,omitempty"` + // Next field: 9 + GenAiComputeTask *GenAiComputeTask `json:"gen_ai_compute_task,omitempty"` // An optional specification for a remote Git repository containing the // source code used by tasks. Version-controlled source code is supported by // notebook, dbt, Python script, and SQL File tasks. If `git_source` is set, @@ -3808,7 +4661,7 @@ type RunTask struct { // Task webhooks respect the task notification settings. WebhookNotifications *WebhookNotifications `json:"webhook_notifications,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RunTask) UnmarshalJSON(b []byte) error { @@ -3859,6 +4712,86 @@ func (f *RunType) Type() string { return "RunType" } +// Determines the cluster's runtime engine, either standard or Photon. +// +// This field is not compatible with legacy `spark_version` values that contain +// `-photon-`. Remove `-photon-` from the `spark_version` and set +// `runtime_engine` to `PHOTON`. +// +// If left unspecified, the runtime engine defaults to standard unless the +// spark_version contains -photon-, in which case Photon will be used. +type RuntimeEngine string + +const RuntimeEngineNull RuntimeEngine = `NULL` + +const RuntimeEnginePhoton RuntimeEngine = `PHOTON` + +const RuntimeEngineStandard RuntimeEngine = `STANDARD` + +// String representation for [fmt.Print] +func (f *RuntimeEngine) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *RuntimeEngine) Set(v string) error { + switch v { + case `NULL`, `PHOTON`, `STANDARD`: + *f = RuntimeEngine(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "NULL", "PHOTON", "STANDARD"`, v) + } +} + +// Type always returns RuntimeEngine to satisfy [pflag.Value] interface +func (f *RuntimeEngine) Type() string { + return "RuntimeEngine" +} + +type S3StorageInfo struct { + // (Optional) Set canned access control list for the logs, e.g. + // `bucket-owner-full-control`. If `canned_cal` is set, please make sure the + // cluster iam role has `s3:PutObjectAcl` permission on the destination + // bucket and prefix. The full list of possible canned acl can be found at + // http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl. + // Please also note that by default only the object owner gets full + // controls. If you are using cross account role for writing data, you may + // want to set `bucket-owner-full-control` to make bucket owner able to read + // the logs. + CannedAcl string `json:"canned_acl,omitempty"` + // S3 destination, e.g. `s3://my-bucket/some-prefix` Note that logs will be + // delivered using cluster iam role, please make sure you set cluster iam + // role and the role has write access to the destination. Please also note + // that you cannot use AWS keys to deliver logs. + Destination string `json:"destination"` + // (Optional) Flag to enable server side encryption, `false` by default. + EnableEncryption bool `json:"enable_encryption,omitempty"` + // (Optional) The encryption type, it could be `sse-s3` or `sse-kms`. It + // will be used only when encryption is enabled and the default type is + // `sse-s3`. + EncryptionType string `json:"encryption_type,omitempty"` + // S3 endpoint, e.g. `https://s3-us-west-2.amazonaws.com`. Either region or + // endpoint needs to be set. If both are set, endpoint will be used. + Endpoint string `json:"endpoint,omitempty"` + // (Optional) Kms key which will be used if encryption is enabled and + // encryption type is set to `sse-kms`. + KmsKey string `json:"kms_key,omitempty"` + // S3 region, e.g. `us-west-2`. Either region or endpoint needs to be set. + // If both are set, endpoint will be used. + Region string `json:"region,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *S3StorageInfo) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s S3StorageInfo) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + // Optional location type of the SQL file. When set to `WORKSPACE`, the SQL file // will be retrieved\ from the local Databricks workspace. When set to `GIT`, // the SQL file will be retrieved from a Git repository defined in `git_source`. @@ -3916,7 +4849,7 @@ type SparkJarTask struct { // Deprecated. A value of `false` is no longer supported. RunAsRepl bool `json:"run_as_repl,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SparkJarTask) UnmarshalJSON(b []byte) error { @@ -3980,7 +4913,7 @@ type SqlAlertOutput struct { // The canonical identifier of the SQL warehouse. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SqlAlertOutput) UnmarshalJSON(b []byte) error { @@ -4031,7 +4964,7 @@ type SqlDashboardOutput struct { // Widgets executed in the run. Only SQL query based widgets are listed. Widgets []SqlDashboardWidgetOutput `json:"widgets,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SqlDashboardOutput) UnmarshalJSON(b []byte) error { @@ -4058,7 +4991,7 @@ type SqlDashboardWidgetOutput struct { // The title of the SQL widget. WidgetTitle string `json:"widget_title,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SqlDashboardWidgetOutput) UnmarshalJSON(b []byte) error { @@ -4115,7 +5048,7 @@ type SqlOutputError struct { // The error message when execution fails. Message string `json:"message,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SqlOutputError) UnmarshalJSON(b []byte) error { @@ -4138,7 +5071,7 @@ type SqlQueryOutput struct { // The canonical identifier of the SQL warehouse. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SqlQueryOutput) UnmarshalJSON(b []byte) error { @@ -4153,7 +5086,7 @@ type SqlStatementOutput struct { // A key that can be used to look up query details. LookupKey string `json:"lookup_key,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SqlStatementOutput) UnmarshalJSON(b []byte) error { @@ -4192,7 +5125,7 @@ type SqlTaskAlert struct { // If specified, alert notifications are sent to subscribers. Subscriptions []SqlTaskSubscription `json:"subscriptions,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SqlTaskAlert) UnmarshalJSON(b []byte) error { @@ -4214,7 +5147,7 @@ type SqlTaskDashboard struct { // If specified, dashboard snapshots are sent to subscriptions. Subscriptions []SqlTaskSubscription `json:"subscriptions,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SqlTaskDashboard) UnmarshalJSON(b []byte) error { @@ -4256,7 +5189,7 @@ type SqlTaskSubscription struct { // destination_id and user_name for subscription notifications. UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SqlTaskSubscription) UnmarshalJSON(b []byte) error { @@ -4328,7 +5261,7 @@ type SubmitRun struct { // completes. WebhookNotifications *WebhookNotifications `json:"webhook_notifications,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SubmitRun) UnmarshalJSON(b []byte) error { @@ -4344,7 +5277,7 @@ type SubmitRunResponse struct { // The canonical identifier for the newly submitted run. RunId int64 `json:"run_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SubmitRunResponse) UnmarshalJSON(b []byte) error { @@ -4392,6 +5325,8 @@ type SubmitTask struct { // The task executes a nested task for every input provided when the // `for_each_task` field is present. ForEachTask *ForEachTask `json:"for_each_task,omitempty"` + // Next field: 9 + GenAiComputeTask *GenAiComputeTask `json:"gen_ai_compute_task,omitempty"` // An optional set of health rules that can be defined for this job. Health *JobsHealthRules `json:"health,omitempty"` // An optional list of libraries to be installed on the cluster. The default @@ -4459,7 +5394,7 @@ type SubmitTask struct { // Task webhooks respect the task notification settings. WebhookNotifications *WebhookNotifications `json:"webhook_notifications,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SubmitTask) UnmarshalJSON(b []byte) error { @@ -4486,7 +5421,7 @@ type TableUpdateTriggerConfiguration struct { // seconds. WaitAfterLastChangeSeconds int `json:"wait_after_last_change_seconds,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TableUpdateTriggerConfiguration) UnmarshalJSON(b []byte) error { @@ -4537,6 +5472,8 @@ type Task struct { // The task executes a nested task for every input provided when the // `for_each_task` field is present. ForEachTask *ForEachTask `json:"for_each_task,omitempty"` + // Next field: 9 + GenAiComputeTask *GenAiComputeTask `json:"gen_ai_compute_task,omitempty"` // An optional set of health rules that can be defined for this job. Health *JobsHealthRules `json:"health,omitempty"` // If job_cluster_key, this task is executed reusing the cluster specified @@ -4556,7 +5493,7 @@ type Task struct { MinRetryIntervalMillis int `json:"min_retry_interval_millis,omitempty"` // If new_cluster, a description of a new cluster that is created for each // run. - NewCluster *ClusterSpec `json:"new_cluster,omitempty"` + NewCluster *JobsClusterSpec `json:"new_cluster,omitempty"` // The task runs a notebook when the `notebook_task` field is present. NotebookTask *NotebookTask `json:"notebook_task,omitempty"` // Optional notification settings that are used when sending notifications @@ -4624,7 +5561,7 @@ type Task struct { // notifications. WebhookNotifications *WebhookNotifications `json:"webhook_notifications,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Task) UnmarshalJSON(b []byte) error { @@ -4642,7 +5579,7 @@ type TaskDependency struct { // The name of the task this task depends on. TaskKey string `json:"task_key"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TaskDependency) UnmarshalJSON(b []byte) error { @@ -4688,7 +5625,7 @@ type TaskEmailNotifications struct { // notifications are not sent. OnSuccess []string `json:"on_success,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TaskEmailNotifications) UnmarshalJSON(b []byte) error { @@ -4711,7 +5648,7 @@ type TaskNotificationSettings struct { // `on_failure` if the run is skipped. NoAlertForSkippedRuns bool `json:"no_alert_for_skipped_runs,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TaskNotificationSettings) UnmarshalJSON(b []byte) error { @@ -4940,7 +5877,7 @@ type TerminationDetails struct { // [status page]: https://status.databricks.com/ Type TerminationTypeType `json:"type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TerminationDetails) UnmarshalJSON(b []byte) error { @@ -5003,7 +5940,7 @@ type TriggerInfo struct { // The run id of the Run Job task run RunId int64 `json:"run_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TriggerInfo) UnmarshalJSON(b []byte) error { @@ -5116,7 +6053,7 @@ type ViewItem struct { // Type of the view item. Type ViewType `json:"type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ViewItem) UnmarshalJSON(b []byte) error { @@ -5191,6 +6128,12 @@ func (f *ViewsToExport) Type() string { return "ViewsToExport" } +type VolumesStorageInfo struct { + // Unity Catalog volumes file destination, e.g. + // `/Volumes/catalog/schema/volume/dir/file` + Destination string `json:"destination"` +} + type Webhook struct { Id string `json:"id"` } @@ -5221,3 +6164,14 @@ type WebhookNotifications struct { // the `on_success` property. OnSuccess []Webhook `json:"on_success,omitempty"` } + +type WorkloadType struct { + // defined what type of clients can use the cluster. E.g. Notebooks, Jobs + Clients ClientsTypes `json:"clients"` +} + +type WorkspaceStorageInfo struct { + // workspace files destination, e.g. + // `/Users/user1@databricks.com/my-init.sh` + Destination string `json:"destination"` +} diff --git a/marketplace/v2/model.go b/marketplace/v2/model.go index d58b8b908..25d190c86 100755 --- a/marketplace/v2/model.go +++ b/marketplace/v2/model.go @@ -153,7 +153,7 @@ type ContactInfo struct { LastName string `json:"last_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ContactInfo) UnmarshalJSON(b []byte) error { @@ -198,7 +198,7 @@ type CreateExchangeFilterRequest struct { type CreateExchangeFilterResponse struct { FilterId string `json:"filter_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateExchangeFilterResponse) UnmarshalJSON(b []byte) error { @@ -216,7 +216,7 @@ type CreateExchangeRequest struct { type CreateExchangeResponse struct { ExchangeId string `json:"exchange_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateExchangeResponse) UnmarshalJSON(b []byte) error { @@ -236,7 +236,7 @@ type CreateFileRequest struct { MimeType string `json:"mime_type"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateFileRequest) UnmarshalJSON(b []byte) error { @@ -252,7 +252,7 @@ type CreateFileResponse struct { // Pre-signed POST URL to blob storage UploadUrl string `json:"upload_url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateFileResponse) UnmarshalJSON(b []byte) error { @@ -276,7 +276,7 @@ type CreateInstallationRequest struct { ShareName string `json:"share_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateInstallationRequest) UnmarshalJSON(b []byte) error { @@ -294,7 +294,7 @@ type CreateListingRequest struct { type CreateListingResponse struct { ListingId string `json:"listing_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateListingResponse) UnmarshalJSON(b []byte) error { @@ -325,7 +325,7 @@ type CreatePersonalizationRequest struct { RecipientType DeltaSharingRecipientType `json:"recipient_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreatePersonalizationRequest) UnmarshalJSON(b []byte) error { @@ -339,7 +339,7 @@ func (s CreatePersonalizationRequest) MarshalJSON() ([]byte, error) { type CreatePersonalizationRequestResponse struct { Id string `json:"id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreatePersonalizationRequestResponse) UnmarshalJSON(b []byte) error { @@ -357,7 +357,7 @@ type CreateProviderRequest struct { type CreateProviderResponse struct { Id string `json:"id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateProviderResponse) UnmarshalJSON(b []byte) error { @@ -511,7 +511,7 @@ type Exchange struct { UpdatedBy string `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Exchange) UnmarshalJSON(b []byte) error { @@ -541,7 +541,7 @@ type ExchangeFilter struct { UpdatedBy string `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExchangeFilter) UnmarshalJSON(b []byte) error { @@ -592,7 +592,7 @@ type ExchangeListing struct { ListingName string `json:"listing_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExchangeListing) UnmarshalJSON(b []byte) error { @@ -625,7 +625,7 @@ type FileInfo struct { UpdatedAt int64 `json:"updated_at,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *FileInfo) UnmarshalJSON(b []byte) error { @@ -641,7 +641,7 @@ type FileParent struct { // TODO make the following fields required ParentId string `json:"parent_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *FileParent) UnmarshalJSON(b []byte) error { @@ -759,7 +759,7 @@ type GetLatestVersionProviderAnalyticsDashboardResponse struct { // version here is latest logical version of the dashboard template Version int64 `json:"version,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetLatestVersionProviderAnalyticsDashboardResponse) UnmarshalJSON(b []byte) error { @@ -778,7 +778,7 @@ type GetListingContentMetadataRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetListingContentMetadataRequest) UnmarshalJSON(b []byte) error { @@ -794,7 +794,7 @@ type GetListingContentMetadataResponse struct { SharedDataObjects []SharedDataObject `json:"shared_data_objects,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetListingContentMetadataResponse) UnmarshalJSON(b []byte) error { @@ -820,7 +820,7 @@ type GetListingsRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetListingsRequest) UnmarshalJSON(b []byte) error { @@ -836,7 +836,7 @@ type GetListingsResponse struct { NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetListingsResponse) UnmarshalJSON(b []byte) error { @@ -896,7 +896,7 @@ type InstallationDetail struct { Tokens []TokenInfo `json:"tokens,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *InstallationDetail) UnmarshalJSON(b []byte) error { @@ -940,7 +940,7 @@ type ListAllInstallationsRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAllInstallationsRequest) UnmarshalJSON(b []byte) error { @@ -956,7 +956,7 @@ type ListAllInstallationsResponse struct { NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAllInstallationsResponse) UnmarshalJSON(b []byte) error { @@ -973,7 +973,7 @@ type ListAllPersonalizationRequestsRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAllPersonalizationRequestsRequest) UnmarshalJSON(b []byte) error { @@ -989,7 +989,7 @@ type ListAllPersonalizationRequestsResponse struct { PersonalizationRequests []PersonalizationRequest `json:"personalization_requests,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAllPersonalizationRequestsResponse) UnmarshalJSON(b []byte) error { @@ -1008,7 +1008,7 @@ type ListExchangeFiltersRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListExchangeFiltersRequest) UnmarshalJSON(b []byte) error { @@ -1024,7 +1024,7 @@ type ListExchangeFiltersResponse struct { NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListExchangeFiltersResponse) UnmarshalJSON(b []byte) error { @@ -1043,7 +1043,7 @@ type ListExchangesForListingRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListExchangesForListingRequest) UnmarshalJSON(b []byte) error { @@ -1059,7 +1059,7 @@ type ListExchangesForListingResponse struct { NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListExchangesForListingResponse) UnmarshalJSON(b []byte) error { @@ -1076,7 +1076,7 @@ type ListExchangesRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListExchangesRequest) UnmarshalJSON(b []byte) error { @@ -1092,7 +1092,7 @@ type ListExchangesResponse struct { NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListExchangesResponse) UnmarshalJSON(b []byte) error { @@ -1111,7 +1111,7 @@ type ListFilesRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListFilesRequest) UnmarshalJSON(b []byte) error { @@ -1127,7 +1127,7 @@ type ListFilesResponse struct { NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListFilesResponse) UnmarshalJSON(b []byte) error { @@ -1146,7 +1146,7 @@ type ListFulfillmentsRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListFulfillmentsRequest) UnmarshalJSON(b []byte) error { @@ -1162,7 +1162,7 @@ type ListFulfillmentsResponse struct { NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListFulfillmentsResponse) UnmarshalJSON(b []byte) error { @@ -1181,7 +1181,7 @@ type ListInstallationsRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListInstallationsRequest) UnmarshalJSON(b []byte) error { @@ -1197,7 +1197,7 @@ type ListInstallationsResponse struct { NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListInstallationsResponse) UnmarshalJSON(b []byte) error { @@ -1216,7 +1216,7 @@ type ListListingsForExchangeRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListListingsForExchangeRequest) UnmarshalJSON(b []byte) error { @@ -1232,7 +1232,7 @@ type ListListingsForExchangeResponse struct { NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListListingsForExchangeResponse) UnmarshalJSON(b []byte) error { @@ -1264,7 +1264,7 @@ type ListListingsRequest struct { // Matches any of the following tags Tags []ListingTag `json:"-" url:"tags,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListListingsRequest) UnmarshalJSON(b []byte) error { @@ -1280,7 +1280,7 @@ type ListListingsResponse struct { NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListListingsResponse) UnmarshalJSON(b []byte) error { @@ -1299,7 +1299,7 @@ type ListProviderAnalyticsDashboardResponse struct { Version int64 `json:"version,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListProviderAnalyticsDashboardResponse) UnmarshalJSON(b []byte) error { @@ -1318,7 +1318,7 @@ type ListProvidersRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListProvidersRequest) UnmarshalJSON(b []byte) error { @@ -1334,7 +1334,7 @@ type ListProvidersResponse struct { Providers []ProviderInfo `json:"providers,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListProvidersResponse) UnmarshalJSON(b []byte) error { @@ -1352,7 +1352,7 @@ type Listing struct { // Next Number: 26 Summary ListingSummary `json:"summary"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Listing) UnmarshalJSON(b []byte) error { @@ -1413,7 +1413,7 @@ type ListingDetail struct { // How often data is updated UpdateFrequency *DataRefreshInfo `json:"update_frequency,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListingDetail) UnmarshalJSON(b []byte) error { @@ -1540,7 +1540,7 @@ type ListingSummary struct { UpdatedById int64 `json:"updated_by_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListingSummary) UnmarshalJSON(b []byte) error { @@ -1674,7 +1674,7 @@ type PersonalizationRequest struct { UpdatedAt int64 `json:"updated_at,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PersonalizationRequest) UnmarshalJSON(b []byte) error { @@ -1749,7 +1749,7 @@ type ProviderInfo struct { TermOfServiceLink string `json:"term_of_service_link"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ProviderInfo) UnmarshalJSON(b []byte) error { @@ -1765,7 +1765,7 @@ type RegionInfo struct { Region string `json:"region,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RegionInfo) UnmarshalJSON(b []byte) error { @@ -1817,7 +1817,7 @@ type SearchListingsRequest struct { // Fuzzy matches query Query string `json:"-" url:"query"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SearchListingsRequest) UnmarshalJSON(b []byte) error { @@ -1833,7 +1833,7 @@ type SearchListingsResponse struct { NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SearchListingsResponse) UnmarshalJSON(b []byte) error { @@ -1857,7 +1857,7 @@ type SharedDataObject struct { // Name of the shared object Name string `json:"name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SharedDataObject) UnmarshalJSON(b []byte) error { @@ -1879,7 +1879,7 @@ type TokenDetail struct { // managed-catalog/api/messages/recipient.proto ShareCredentialsVersion int `json:"shareCredentialsVersion,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TokenDetail) UnmarshalJSON(b []byte) error { @@ -1907,7 +1907,7 @@ type TokenInfo struct { // Username of Recipient Token updater. UpdatedBy string `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TokenInfo) UnmarshalJSON(b []byte) error { @@ -1947,7 +1947,7 @@ type UpdateInstallationRequest struct { RotateToken bool `json:"rotate_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateInstallationRequest) UnmarshalJSON(b []byte) error { @@ -1983,7 +1983,7 @@ type UpdatePersonalizationRequestRequest struct { Status PersonalizationRequestStatus `json:"status"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdatePersonalizationRequestRequest) UnmarshalJSON(b []byte) error { @@ -2006,7 +2006,7 @@ type UpdateProviderAnalyticsDashboardRequest struct { // the dashboard template Version int64 `json:"version,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateProviderAnalyticsDashboardRequest) UnmarshalJSON(b []byte) error { @@ -2025,7 +2025,7 @@ type UpdateProviderAnalyticsDashboardResponse struct { Version int64 `json:"version,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateProviderAnalyticsDashboardResponse) UnmarshalJSON(b []byte) error { diff --git a/ml/v2/api.go b/ml/v2/api.go index fe34f0635..eaa997fc4 100755 --- a/ml/v2/api.go +++ b/ml/v2/api.go @@ -19,21 +19,21 @@ type ExperimentsInterface interface { // already exist and fails if another experiment with the same name already // exists. // - // Throws `RESOURCE_ALREADY_EXISTS` if a experiment with the given name exists. + // Throws `RESOURCE_ALREADY_EXISTS` if an experiment with the given name exists. CreateExperiment(ctx context.Context, request CreateExperiment) (*CreateExperimentResponse, error) // Create a run. // // Creates a new run within an experiment. A run is usually a single execution // of a machine learning or data ETL pipeline. MLflow uses runs to track the - // `mlflowParam`, `mlflowMetric` and `mlflowRunTag` associated with a single + // `mlflowParam`, `mlflowMetric`, and `mlflowRunTag` associated with a single // execution. CreateRun(ctx context.Context, request CreateRun) (*CreateRunResponse, error) // Delete an experiment. // // Marks an experiment and associated metadata, runs, metrics, params, and tags - // for deletion. If the experiment uses FileStore, artifacts associated with + // for deletion. If the experiment uses FileStore, artifacts associated with the // experiment are also deleted. DeleteExperiment(ctx context.Context, request DeleteExperiment) error @@ -47,16 +47,15 @@ type ExperimentsInterface interface { // Bulk delete runs in an experiment that were created prior to or at the // specified timestamp. Deletes at most max_runs per request. To call this API // from a Databricks Notebook in Python, you can use the client code snippet on - // https://learn.microsoft.com/en-us/azure/databricks/mlflow/runs#bulk-delete. DeleteRuns(ctx context.Context, request DeleteRuns) (*DeleteRunsResponse, error) - // Delete a tag. + // Delete a tag on a run. // // Deletes a tag on a run. Tags are run metadata that can be updated during a // run and after a run completes. DeleteTag(ctx context.Context, request DeleteTag) error - // Get metadata. + // Get an experiment by name. // // Gets metadata for an experiment. // @@ -67,21 +66,21 @@ type ExperimentsInterface interface { // // Throws `RESOURCE_DOES_NOT_EXIST` if no experiment with the specified name // exists. - GetByName(ctx context.Context, request GetByNameRequest) (*GetExperimentResponse, error) + GetByName(ctx context.Context, request GetByNameRequest) (*GetExperimentByNameResponse, error) // Get an experiment. // // Gets metadata for an experiment. This method works on deleted experiments. GetExperiment(ctx context.Context, request GetExperimentRequest) (*GetExperimentResponse, error) - // Get history of a given metric within a run. + // Get metric history for a run. // // Gets a list of all values for the specified metric for a given run. // // This method is generated by Databricks SDK Code Generator. GetHistory(ctx context.Context, request GetHistoryRequest) listing.Iterator[Metric] - // Get history of a given metric within a run. + // Get metric history for a run. // // Gets a list of all values for the specified metric for a given run. // @@ -120,11 +119,10 @@ type ExperimentsInterface interface { // these values. GetRun(ctx context.Context, request GetRunRequest) (*GetRunResponse, error) - // Get all artifacts. + // List artifacts for a run. // - // List artifacts for a run. Takes an optional `artifact_path` prefix. If it is - // specified, the response contains only artifacts with the specified prefix. - // This API does not support pagination when listing artifacts in UC Volumes. A + // List artifacts for a run. Takes an optional `artifact_path` prefix which if + // specified, the response contains only artifacts with the specified prefix. A // maximum of 1000 artifacts will be retrieved for UC Volumes. Please call // `/api/2.0/fs/directories{directory_path}` for listing artifacts in UC // Volumes, which supports pagination. See [List directory contents | Files @@ -133,11 +131,10 @@ type ExperimentsInterface interface { // This method is generated by Databricks SDK Code Generator. ListArtifacts(ctx context.Context, request ListArtifactsRequest) listing.Iterator[FileInfo] - // Get all artifacts. + // List artifacts for a run. // - // List artifacts for a run. Takes an optional `artifact_path` prefix. If it is - // specified, the response contains only artifacts with the specified prefix. - // This API does not support pagination when listing artifacts in UC Volumes. A + // List artifacts for a run. Takes an optional `artifact_path` prefix which if + // specified, the response contains only artifacts with the specified prefix. A // maximum of 1000 artifacts will be retrieved for UC Volumes. Please call // `/api/2.0/fs/directories{directory_path}` for listing artifacts in UC // Volumes, which supports pagination. See [List directory contents | Files @@ -160,7 +157,7 @@ type ExperimentsInterface interface { // This method is generated by Databricks SDK Code Generator. ListExperimentsAll(ctx context.Context, request ListExperimentsRequest) ([]Experiment, error) - // Log a batch. + // Log a batch of metrics/params/tags for a run. // // Logs a batch of metrics, params, and tags for a run. If any data failed to be // persisted, the server will respond with an error (non-200 status code). @@ -189,8 +186,13 @@ type ExperimentsInterface interface { // Request Limits ------------------------------- A single JSON-serialized API // request may be up to 1 MB in size and contain: // - // * No more than 1000 metrics, params, and tags in total * Up to 1000 metrics * - // Up to 100 params * Up to 100 tags + // * No more than 1000 metrics, params, and tags in total + // + // * Up to 1000 metrics + // + // * Up to 100 params + // + // * Up to 100 tags // // For example, a valid request might contain 900 metrics, 50 params, and 50 // tags, but logging 900 metrics, 50 params, and 51 tags is invalid. @@ -198,6 +200,7 @@ type ExperimentsInterface interface { // The following limits also apply to metric, param, and tag keys and values: // // * Metric keys, param keys, and tag keys can be up to 250 characters in length + // // * Parameter and tag values can be up to 250 characters in length LogBatch(ctx context.Context, request LogBatch) error @@ -205,11 +208,13 @@ type ExperimentsInterface interface { // // **NOTE:** Experimental: This API may change or be removed in a future release // without warning. + // + // Logs inputs, such as datasets and models, to an MLflow Run. LogInputs(ctx context.Context, request LogInputs) error - // Log a metric. + // Log a metric for a run. // - // Logs a metric for a run. A metric is a key-value pair (string key, float + // Log a metric for a run. A metric is a key-value pair (string key, float // value) with an associated timestamp. Examples include the various metrics // that represent ML model accuracy. A metric can be logged multiple times. LogMetric(ctx context.Context, request LogMetric) error @@ -220,7 +225,7 @@ type ExperimentsInterface interface { // without warning. LogModel(ctx context.Context, request LogModel) error - // Log a param. + // Log a param for a run. // // Logs a param used for a run. A param is a key-value pair (string key, string // value). Examples include hyperparameters used for ML model training and @@ -228,7 +233,7 @@ type ExperimentsInterface interface { // once for a run. LogParam(ctx context.Context, request LogParam) error - // Restores an experiment. + // Restore an experiment. // // Restore an experiment marked for deletion. This also restores associated // metadata, runs, metrics, params, and tags. If experiment uses FileStore, @@ -240,7 +245,11 @@ type ExperimentsInterface interface { // Restore a run. // - // Restores a deleted run. + // Restores a deleted run. This also restores associated metadata, runs, + // metrics, params, and tags. + // + // Throws `RESOURCE_DOES_NOT_EXIST` if the run was never created or was + // permanently deleted. RestoreRun(ctx context.Context, request RestoreRun) error // Restore runs by deletion time. @@ -248,7 +257,6 @@ type ExperimentsInterface interface { // Bulk restore runs in an experiment that were deleted no earlier than the // specified timestamp. Restores at most max_runs per request. To call this API // from a Databricks Notebook in Python, you can use the client code snippet on - // https://learn.microsoft.com/en-us/azure/databricks/mlflow/runs#bulk-restore. RestoreRuns(ctx context.Context, request RestoreRuns) (*RestoreRunsResponse, error) // Search experiments. @@ -269,7 +277,7 @@ type ExperimentsInterface interface { // // Searches for runs that satisfy expressions. // - // Search expressions can use `mlflowMetric` and `mlflowParam` keys.", + // Search expressions can use `mlflowMetric` and `mlflowParam` keys. // // This method is generated by Databricks SDK Code Generator. SearchRuns(ctx context.Context, request SearchRuns) listing.Iterator[Run] @@ -278,12 +286,12 @@ type ExperimentsInterface interface { // // Searches for runs that satisfy expressions. // - // Search expressions can use `mlflowMetric` and `mlflowParam` keys.", + // Search expressions can use `mlflowMetric` and `mlflowParam` keys. // // This method is generated by Databricks SDK Code Generator. SearchRunsAll(ctx context.Context, request SearchRuns) ([]Run, error) - // Set a tag. + // Set a tag for an experiment. // // Sets a tag on an experiment. Experiment tags are metadata that can be // updated. @@ -296,7 +304,7 @@ type ExperimentsInterface interface { // permissions from their root object. SetPermissions(ctx context.Context, request ExperimentPermissionsRequest) (*ExperimentPermissions, error) - // Set a tag. + // Set a tag for a run. // // Sets a tag on a run. Tags are run metadata that can be updated during a run // and after a run completes. diff --git a/ml/v2/impl.go b/ml/v2/impl.go index bce1da7f6..1fb5778f4 100755 --- a/ml/v2/impl.go +++ b/ml/v2/impl.go @@ -83,14 +83,14 @@ func (a *experimentsImpl) DeleteTag(ctx context.Context, request DeleteTag) erro return err } -func (a *experimentsImpl) GetByName(ctx context.Context, request GetByNameRequest) (*GetExperimentResponse, error) { - var getExperimentResponse GetExperimentResponse +func (a *experimentsImpl) GetByName(ctx context.Context, request GetByNameRequest) (*GetExperimentByNameResponse, error) { + var getExperimentByNameResponse GetExperimentByNameResponse path := "/api/2.0/mlflow/experiments/get-by-name" queryParams := make(map[string]any) headers := make(map[string]string) headers["Accept"] = "application/json" - err := a.client.Do(ctx, http.MethodGet, path, headers, queryParams, request, &getExperimentResponse) - return &getExperimentResponse, err + err := a.client.Do(ctx, http.MethodGet, path, headers, queryParams, request, &getExperimentByNameResponse) + return &getExperimentByNameResponse, err } func (a *experimentsImpl) GetExperiment(ctx context.Context, request GetExperimentRequest) (*GetExperimentResponse, error) { @@ -103,7 +103,7 @@ func (a *experimentsImpl) GetExperiment(ctx context.Context, request GetExperime return &getExperimentResponse, err } -// Get history of a given metric within a run. +// Get metric history for a run. // // Gets a list of all values for the specified metric for a given run. func (a *experimentsImpl) GetHistory(ctx context.Context, request GetHistoryRequest) listing.Iterator[Metric] { @@ -130,13 +130,12 @@ func (a *experimentsImpl) GetHistory(ctx context.Context, request GetHistoryRequ return iterator } -// Get history of a given metric within a run. +// Get metric history for a run. // // Gets a list of all values for the specified metric for a given run. func (a *experimentsImpl) GetHistoryAll(ctx context.Context, request GetHistoryRequest) ([]Metric, error) { iterator := a.GetHistory(ctx, request) - return listing.ToSliceN[Metric, int](ctx, iterator, request.MaxResults) - + return listing.ToSlice[Metric](ctx, iterator) } func (a *experimentsImpl) internalGetHistory(ctx context.Context, request GetHistoryRequest) (*GetMetricHistoryResponse, error) { var getMetricHistoryResponse GetMetricHistoryResponse @@ -178,11 +177,10 @@ func (a *experimentsImpl) GetRun(ctx context.Context, request GetRunRequest) (*G return &getRunResponse, err } -// Get all artifacts. +// List artifacts for a run. // -// List artifacts for a run. Takes an optional `artifact_path` prefix. If it is -// specified, the response contains only artifacts with the specified prefix. -// This API does not support pagination when listing artifacts in UC Volumes. A +// List artifacts for a run. Takes an optional `artifact_path` prefix which if +// specified, the response contains only artifacts with the specified prefix. A // maximum of 1000 artifacts will be retrieved for UC Volumes. Please call // `/api/2.0/fs/directories{directory_path}` for listing artifacts in UC // Volumes, which supports pagination. See [List directory contents | Files @@ -211,11 +209,10 @@ func (a *experimentsImpl) ListArtifacts(ctx context.Context, request ListArtifac return iterator } -// Get all artifacts. +// List artifacts for a run. // -// List artifacts for a run. Takes an optional `artifact_path` prefix. If it is -// specified, the response contains only artifacts with the specified prefix. -// This API does not support pagination when listing artifacts in UC Volumes. A +// List artifacts for a run. Takes an optional `artifact_path` prefix which if +// specified, the response contains only artifacts with the specified prefix. A // maximum of 1000 artifacts will be retrieved for UC Volumes. Please call // `/api/2.0/fs/directories{directory_path}` for listing artifacts in UC // Volumes, which supports pagination. See [List directory contents | Files @@ -266,8 +263,7 @@ func (a *experimentsImpl) ListExperiments(ctx context.Context, request ListExper // Gets a list of all experiments. func (a *experimentsImpl) ListExperimentsAll(ctx context.Context, request ListExperimentsRequest) ([]Experiment, error) { iterator := a.ListExperiments(ctx, request) - return listing.ToSliceN[Experiment, int](ctx, iterator, request.MaxResults) - + return listing.ToSlice[Experiment](ctx, iterator) } func (a *experimentsImpl) internalListExperiments(ctx context.Context, request ListExperimentsRequest) (*ListExperimentsResponse, error) { var listExperimentsResponse ListExperimentsResponse @@ -416,7 +412,7 @@ func (a *experimentsImpl) internalSearchExperiments(ctx context.Context, request // // Searches for runs that satisfy expressions. // -// Search expressions can use `mlflowMetric` and `mlflowParam` keys.", +// Search expressions can use `mlflowMetric` and `mlflowParam` keys. func (a *experimentsImpl) SearchRuns(ctx context.Context, request SearchRuns) listing.Iterator[Run] { getNextPage := func(ctx context.Context, req SearchRuns) (*SearchRunsResponse, error) { @@ -445,7 +441,7 @@ func (a *experimentsImpl) SearchRuns(ctx context.Context, request SearchRuns) li // // Searches for runs that satisfy expressions. // -// Search expressions can use `mlflowMetric` and `mlflowParam` keys.", +// Search expressions can use `mlflowMetric` and `mlflowParam` keys. func (a *experimentsImpl) SearchRunsAll(ctx context.Context, request SearchRuns) ([]Run, error) { iterator := a.SearchRuns(ctx, request) return listing.ToSlice[Run](ctx, iterator) diff --git a/ml/v2/model.go b/ml/v2/model.go index 2c988d39b..d8ff6c517 100755 --- a/ml/v2/model.go +++ b/ml/v2/model.go @@ -63,7 +63,7 @@ type Activity struct { // The username of the user that created the object. UserId string `json:"user_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Activity) UnmarshalJSON(b []byte) error { @@ -191,7 +191,7 @@ type ApproveTransitionRequest struct { // Version of the model. Version string `json:"version"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ApproveTransitionRequest) UnmarshalJSON(b []byte) error { @@ -255,7 +255,7 @@ type CommentObject struct { // The username of the user that created the object. UserId string `json:"user_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CommentObject) UnmarshalJSON(b []byte) error { @@ -293,7 +293,7 @@ type CreateExperiment struct { // guaranteed to support up to 20 tags per request. Tags []ExperimentTag `json:"tags,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateExperiment) UnmarshalJSON(b []byte) error { @@ -308,7 +308,7 @@ type CreateExperimentResponse struct { // Unique identifier for the experiment. ExperimentId string `json:"experiment_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateExperimentResponse) UnmarshalJSON(b []byte) error { @@ -327,7 +327,7 @@ type CreateModelRequest struct { // Additional metadata for registered model. Tags []ModelTag `json:"tags,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateModelRequest) UnmarshalJSON(b []byte) error { @@ -358,7 +358,7 @@ type CreateModelVersionRequest struct { // Additional metadata for model version. Tags []ModelVersionTag `json:"tags,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateModelVersionRequest) UnmarshalJSON(b []byte) error { @@ -427,7 +427,7 @@ type CreateRegistryWebhook struct { // not triggered on a real event. Status RegistryWebhookStatus `json:"status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateRegistryWebhook) UnmarshalJSON(b []byte) error { @@ -441,6 +441,8 @@ func (s CreateRegistryWebhook) MarshalJSON() ([]byte, error) { type CreateRun struct { // ID of the associated experiment. ExperimentId string `json:"experiment_id,omitempty"` + // The name of the run. + RunName string `json:"run_name,omitempty"` // Unix timestamp in milliseconds of when the run started. StartTime int64 `json:"start_time,omitempty"` // Additional metadata for run. @@ -450,7 +452,7 @@ type CreateRun struct { // tag instead. UserId string `json:"user_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateRun) UnmarshalJSON(b []byte) error { @@ -484,7 +486,7 @@ type CreateTransitionRequest struct { // Version of the model. Version string `json:"version"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateTransitionRequest) UnmarshalJSON(b []byte) error { @@ -504,13 +506,15 @@ type CreateWebhookResponse struct { Webhook *RegistryWebhook `json:"webhook,omitempty"` } +// Dataset. Represents a reference to data used for training, testing, or +// evaluation during the model development process. type Dataset struct { // Dataset digest, e.g. an md5 hash of the dataset that uniquely identifies // it within datasets of the same name. - Digest string `json:"digest,omitempty"` + Digest string `json:"digest"` // The name of the dataset. E.g. “my.uc.table@2” “nyc-taxi-dataset”, // “fantastic-elk-3” - Name string `json:"name,omitempty"` + Name string `json:"name"` // The profile of the dataset. Summary statistics for the dataset, such as // the number of rows in a table, the mean / std / mode of each column in a // table, or the number of elements in an array. @@ -518,15 +522,15 @@ type Dataset struct { // The schema of the dataset. E.g., MLflow ColSpec JSON for a dataframe, // MLflow TensorSpec JSON for an ndarray, or another schema format. Schema string `json:"schema,omitempty"` - // The type of the dataset source, e.g. ‘databricks-uc-table’, - // ‘DBFS’, ‘S3’, ... - Source string `json:"source,omitempty"` // Source information for the dataset. Note that the source may not exactly // reproduce the dataset if it was transformed / modified before use with // MLflow. - SourceType string `json:"source_type,omitempty"` + Source string `json:"source"` + // The type of the dataset source, e.g. ‘databricks-uc-table’, + // ‘DBFS’, ‘S3’, ... + SourceType string `json:"source_type"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Dataset) UnmarshalJSON(b []byte) error { @@ -537,9 +541,10 @@ func (s Dataset) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// DatasetInput. Represents a dataset and input tags. type DatasetInput struct { // The dataset being used as a Run input. - Dataset *Dataset `json:"dataset,omitempty"` + Dataset Dataset `json:"dataset"` // A list of tags for the dataset input, e.g. a “context” tag with value // “training” Tags []InputTag `json:"tags,omitempty"` @@ -626,7 +631,7 @@ type DeleteRuns struct { // deleted. MaxTimestampMillis int64 `json:"max_timestamp_millis"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteRuns) UnmarshalJSON(b []byte) error { @@ -641,7 +646,7 @@ type DeleteRunsResponse struct { // The number of runs deleted. RunsDeleted int `json:"runs_deleted,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteRunsResponse) UnmarshalJSON(b []byte) error { @@ -685,7 +690,7 @@ type DeleteTransitionRequestRequest struct { // Version of the model. Version string `json:"-" url:"version"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteTransitionRequestRequest) UnmarshalJSON(b []byte) error { @@ -735,7 +740,7 @@ type DeleteWebhookRequest struct { // Webhook ID required to delete a registry webhook. Id string `json:"-" url:"id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteWebhookRequest) UnmarshalJSON(b []byte) error { @@ -749,6 +754,7 @@ func (s DeleteWebhookRequest) MarshalJSON() ([]byte, error) { type DeleteWebhookResponse struct { } +// An experiment and its metadata. type Experiment struct { // Location where artifacts for the experiment are stored. ArtifactLocation string `json:"artifact_location,omitempty"` @@ -766,7 +772,7 @@ type Experiment struct { // Tags: Additional metadata key-value pairs. Tags []ExperimentTag `json:"tags,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Experiment) UnmarshalJSON(b []byte) error { @@ -787,7 +793,7 @@ type ExperimentAccessControlRequest struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExperimentAccessControlRequest) UnmarshalJSON(b []byte) error { @@ -810,7 +816,7 @@ type ExperimentAccessControlResponse struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExperimentAccessControlResponse) UnmarshalJSON(b []byte) error { @@ -828,7 +834,7 @@ type ExperimentPermission struct { // Permission level PermissionLevel ExperimentPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExperimentPermission) UnmarshalJSON(b []byte) error { @@ -876,7 +882,7 @@ type ExperimentPermissions struct { ObjectType string `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExperimentPermissions) UnmarshalJSON(b []byte) error { @@ -892,7 +898,7 @@ type ExperimentPermissionsDescription struct { // Permission level PermissionLevel ExperimentPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExperimentPermissionsDescription) UnmarshalJSON(b []byte) error { @@ -909,13 +915,14 @@ type ExperimentPermissionsRequest struct { ExperimentId string `json:"-" url:"-"` } +// A tag for an experiment. type ExperimentTag struct { // The tag key. Key string `json:"key,omitempty"` // The tag value. Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExperimentTag) UnmarshalJSON(b []byte) error { @@ -926,6 +933,7 @@ func (s ExperimentTag) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// Metadata of a single artifact file or directory. type FileInfo struct { // Size in bytes. Unset for directories. FileSize int64 `json:"file_size,omitempty"` @@ -934,7 +942,7 @@ type FileInfo struct { // Path relative to the root artifact directory run. Path string `json:"path,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *FileInfo) UnmarshalJSON(b []byte) error { @@ -945,12 +953,17 @@ func (s FileInfo) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -// Get metadata +// Get an experiment by name type GetByNameRequest struct { // Name of the associated experiment. ExperimentName string `json:"-" url:"experiment_name"` } +type GetExperimentByNameResponse struct { + // Experiment details. + Experiment *Experiment `json:"experiment,omitempty"` +} + // Get experiment permission levels type GetExperimentPermissionLevelsRequest struct { // The experiment for which to get or manage permissions. @@ -979,7 +992,7 @@ type GetExperimentResponse struct { Experiment *Experiment `json:"experiment,omitempty"` } -// Get history of a given metric within a run +// Get metric history for a run type GetHistoryRequest struct { // Maximum number of Metric records to return per paginated request. Default // is set to 25,000. If set higher than 25,000, a request Exception will be @@ -991,11 +1004,11 @@ type GetHistoryRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` // ID of the run from which to fetch metric values. Must be provided. RunId string `json:"-" url:"run_id,omitempty"` - // [Deprecated, use run_id instead] ID of the run from which to fetch metric - // values. This field will be removed in a future MLflow version. + // [Deprecated, use `run_id` instead] ID of the run from which to fetch + // metric values. This field will be removed in a future MLflow version. RunUuid string `json:"-" url:"run_uuid,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetHistoryRequest) UnmarshalJSON(b []byte) error { @@ -1021,13 +1034,17 @@ type GetLatestVersionsResponse struct { } type GetMetricHistoryResponse struct { - // All logged values for this metric. + // All logged values for this metric if `max_results` is not specified in + // the request or if the total count of metrics returned is less than the + // service level pagination threshold. Otherwise, this is one page of + // results. Metrics []Metric `json:"metrics,omitempty"` - // Token that can be used to retrieve the next page of metric history - // results + // A token that can be used to issue a query for the next page of metric + // history values. A missing token indicates that no additional metrics are + // available to fetch. NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetMetricHistoryResponse) UnmarshalJSON(b []byte) error { @@ -1060,7 +1077,7 @@ type GetModelVersionDownloadUriResponse struct { // URI corresponding to where artifacts for this model version are stored. ArtifactUri string `json:"artifact_uri,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetModelVersionDownloadUriResponse) UnmarshalJSON(b []byte) error { @@ -1104,11 +1121,11 @@ type GetRegisteredModelPermissionsRequest struct { type GetRunRequest struct { // ID of the run to fetch. Must be provided. RunId string `json:"-" url:"run_id"` - // [Deprecated, use run_id instead] ID of the run to fetch. This field will - // be removed in a future MLflow version. + // [Deprecated, use `run_id` instead] ID of the run to fetch. This field + // will be removed in a future MLflow version. RunUuid string `json:"-" url:"run_uuid,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetRunRequest) UnmarshalJSON(b []byte) error { @@ -1146,7 +1163,7 @@ type HttpUrlSpec struct { // External HTTPS URL called on event trigger (by using a POST request). Url string `json:"url"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *HttpUrlSpec) UnmarshalJSON(b []byte) error { @@ -1169,7 +1186,7 @@ type HttpUrlSpecWithoutSecret struct { // External HTTPS URL called on event trigger (by using a POST request). Url string `json:"url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *HttpUrlSpecWithoutSecret) UnmarshalJSON(b []byte) error { @@ -1180,21 +1197,12 @@ func (s HttpUrlSpecWithoutSecret) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// Tag for a dataset input. type InputTag struct { // The tag key. - Key string `json:"key,omitempty"` + Key string `json:"key"` // The tag value. - Value string `json:"value,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *InputTag) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s InputTag) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) + Value string `json:"value"` } type JobSpec struct { @@ -1207,7 +1215,7 @@ type JobSpec struct { // workspace where the webhook is created. WorkspaceUrl string `json:"workspace_url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *JobSpec) UnmarshalJSON(b []byte) error { @@ -1226,7 +1234,7 @@ type JobSpecWithoutSecret struct { // the job’s workspace is assumed to be the same as the webhook’s. WorkspaceUrl string `json:"workspace_url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *JobSpecWithoutSecret) UnmarshalJSON(b []byte) error { @@ -1237,7 +1245,7 @@ func (s JobSpecWithoutSecret) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -// Get all artifacts +// List artifacts for a run type ListArtifactsRequest struct { // Token indicating the page of artifact results to fetch. `page_token` is // not supported when listing artifacts in UC Volumes. A maximum of 1000 @@ -1251,11 +1259,11 @@ type ListArtifactsRequest struct { Path string `json:"-" url:"path,omitempty"` // ID of the run whose artifacts to list. Must be provided. RunId string `json:"-" url:"run_id,omitempty"` - // [Deprecated, use run_id instead] ID of the run whose artifacts to list. + // [Deprecated, use `run_id` instead] ID of the run whose artifacts to list. // This field will be removed in a future MLflow version. RunUuid string `json:"-" url:"run_uuid,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListArtifactsRequest) UnmarshalJSON(b []byte) error { @@ -1274,7 +1282,7 @@ type ListArtifactsResponse struct { // Root artifact directory for the run. RootUri string `json:"root_uri,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListArtifactsResponse) UnmarshalJSON(b []byte) error { @@ -1292,14 +1300,14 @@ type ListExperimentsRequest struct { // automatically capped at 1000. Callers of this endpoint are encouraged to // pass max_results explicitly and leverage page_token to iterate through // experiments. - MaxResults int `json:"-" url:"max_results,omitempty"` + MaxResults int64 `json:"-" url:"max_results,omitempty"` // Token indicating the page of experiments to fetch PageToken string `json:"-" url:"page_token,omitempty"` // Qualifier for type of experiments to be returned. If unspecified, return // only active experiments. - ViewType string `json:"-" url:"view_type,omitempty"` + ViewType ViewType `json:"-" url:"view_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListExperimentsRequest) UnmarshalJSON(b []byte) error { @@ -1318,7 +1326,7 @@ type ListExperimentsResponse struct { // token means no more experiment is available for retrieval. NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListExperimentsResponse) UnmarshalJSON(b []byte) error { @@ -1336,7 +1344,7 @@ type ListModelsRequest struct { // Pagination token to go to the next page based on a previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListModelsRequest) UnmarshalJSON(b []byte) error { @@ -1353,7 +1361,7 @@ type ListModelsResponse struct { RegisteredModels []Model `json:"registered_models,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListModelsResponse) UnmarshalJSON(b []byte) error { @@ -1370,7 +1378,7 @@ type ListRegistryWebhooks struct { // Array of registry webhooks. Webhooks []RegistryWebhook `json:"webhooks,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListRegistryWebhooks) UnmarshalJSON(b []byte) error { @@ -1406,7 +1414,7 @@ type ListWebhooksRequest struct { // Token indicating the page of artifact results to fetch PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListWebhooksRequest) UnmarshalJSON(b []byte) error { @@ -1430,7 +1438,7 @@ type LogBatch struct { // metrics, params, and tags in total. Tags []RunTag `json:"tags,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *LogBatch) UnmarshalJSON(b []byte) error { @@ -1448,17 +1456,7 @@ type LogInputs struct { // Dataset inputs Datasets []DatasetInput `json:"datasets,omitempty"` // ID of the run to log under - RunId string `json:"run_id,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *LogInputs) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s LogInputs) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) + RunId string `json:"run_id"` } type LogInputsResponse struct { @@ -1469,7 +1467,7 @@ type LogMetric struct { Key string `json:"key"` // ID of the run under which to log the metric. Must be provided. RunId string `json:"run_id,omitempty"` - // [Deprecated, use run_id instead] ID of the run under which to log the + // [Deprecated, use `run_id` instead] ID of the run under which to log the // metric. This field will be removed in a future MLflow version. RunUuid string `json:"run_uuid,omitempty"` // Step at which to log the metric @@ -1479,7 +1477,7 @@ type LogMetric struct { // Double value of the metric being logged. Value float64 `json:"value"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *LogMetric) UnmarshalJSON(b []byte) error { @@ -1499,7 +1497,7 @@ type LogModel struct { // ID of the run to log under RunId string `json:"run_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *LogModel) UnmarshalJSON(b []byte) error { @@ -1518,13 +1516,13 @@ type LogParam struct { Key string `json:"key"` // ID of the run under which to log the param. Must be provided. RunId string `json:"run_id,omitempty"` - // [Deprecated, use run_id instead] ID of the run under which to log the + // [Deprecated, use `run_id` instead] ID of the run under which to log the // param. This field will be removed in a future MLflow version. RunUuid string `json:"run_uuid,omitempty"` // String value of the param being logged. Maximum size is 500 bytes. Value string `json:"value"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *LogParam) UnmarshalJSON(b []byte) error { @@ -1538,6 +1536,7 @@ func (s LogParam) MarshalJSON() ([]byte, error) { type LogParamResponse struct { } +// Metric associated with a run, represented as a key-value pair. type Metric struct { // Key identifying this metric. Key string `json:"key,omitempty"` @@ -1548,7 +1547,7 @@ type Metric struct { // Value associated with this metric. Value float64 `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Metric) UnmarshalJSON(b []byte) error { @@ -1577,7 +1576,7 @@ type Model struct { // User that created this `registered_model` UserId string `json:"user_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Model) UnmarshalJSON(b []byte) error { @@ -1609,7 +1608,7 @@ type ModelDatabricks struct { // The username of the user that created the object. UserId string `json:"user_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ModelDatabricks) UnmarshalJSON(b []byte) error { @@ -1626,7 +1625,7 @@ type ModelTag struct { // The tag value. Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ModelTag) UnmarshalJSON(b []byte) error { @@ -1668,7 +1667,7 @@ type ModelVersion struct { // Model's version number. Version string `json:"version,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ModelVersion) UnmarshalJSON(b []byte) error { @@ -1729,7 +1728,7 @@ type ModelVersionDatabricks struct { // Version of the model. Version string `json:"version,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ModelVersionDatabricks) UnmarshalJSON(b []byte) error { @@ -1776,7 +1775,7 @@ type ModelVersionTag struct { // The tag value. Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ModelVersionTag) UnmarshalJSON(b []byte) error { @@ -1787,13 +1786,14 @@ func (s ModelVersionTag) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// Param associated with a run. type Param struct { // Key identifying this param. Key string `json:"key,omitempty"` // Value associated with this param. Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Param) UnmarshalJSON(b []byte) error { @@ -1849,7 +1849,7 @@ type RegisteredModelAccessControlRequest struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RegisteredModelAccessControlRequest) UnmarshalJSON(b []byte) error { @@ -1872,7 +1872,7 @@ type RegisteredModelAccessControlResponse struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RegisteredModelAccessControlResponse) UnmarshalJSON(b []byte) error { @@ -1890,7 +1890,7 @@ type RegisteredModelPermission struct { // Permission level PermissionLevel RegisteredModelPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RegisteredModelPermission) UnmarshalJSON(b []byte) error { @@ -1942,7 +1942,7 @@ type RegisteredModelPermissions struct { ObjectType string `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RegisteredModelPermissions) UnmarshalJSON(b []byte) error { @@ -1958,7 +1958,7 @@ type RegisteredModelPermissionsDescription struct { // Permission level PermissionLevel RegisteredModelPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RegisteredModelPermissionsDescription) UnmarshalJSON(b []byte) error { @@ -2034,7 +2034,7 @@ type RegistryWebhook struct { // not triggered on a real event. Status RegistryWebhookStatus `json:"status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RegistryWebhook) UnmarshalJSON(b []byte) error { @@ -2151,7 +2151,7 @@ type RejectTransitionRequest struct { // Version of the model. Version string `json:"version"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RejectTransitionRequest) UnmarshalJSON(b []byte) error { @@ -2173,7 +2173,7 @@ type RenameModelRequest struct { // If provided, updates the name for this `registered_model`. NewName string `json:"new_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RenameModelRequest) UnmarshalJSON(b []byte) error { @@ -2215,7 +2215,7 @@ type RestoreRuns struct { // restored. MinTimestampMillis int64 `json:"min_timestamp_millis"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RestoreRuns) UnmarshalJSON(b []byte) error { @@ -2230,7 +2230,7 @@ type RestoreRunsResponse struct { // The number of runs restored. RunsRestored int `json:"runs_restored,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RestoreRunsResponse) UnmarshalJSON(b []byte) error { @@ -2241,6 +2241,7 @@ func (s RestoreRunsResponse) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// A single run. type Run struct { // Run data. Data *RunData `json:"data,omitempty"` @@ -2250,6 +2251,7 @@ type Run struct { Inputs *RunInputs `json:"inputs,omitempty"` } +// Run data (metrics, params, and tags). type RunData struct { // Run metrics. Metrics []Metric `json:"metrics,omitempty"` @@ -2259,11 +2261,12 @@ type RunData struct { Tags []RunTag `json:"tags,omitempty"` } +// Metadata of a single run. type RunInfo struct { // URI of the directory where artifacts should be uploaded. This can be a // local path (starting with "/"), or a distributed file system (DFS) path, - // like `s3://bucket/directory` or `dbfs:/my/directory`. If not set, the - // local `./mlruns` directory is chosen. + // like ``s3://bucket/directory`` or ``dbfs:/my/directory``. If not set, the + // local ``./mlruns`` directory is chosen. ArtifactUri string `json:"artifact_uri,omitempty"` // Unix timestamp of when the run ended in milliseconds. EndTime int64 `json:"end_time,omitempty"` @@ -2273,6 +2276,8 @@ type RunInfo struct { LifecycleStage string `json:"lifecycle_stage,omitempty"` // Unique identifier for the run. RunId string `json:"run_id,omitempty"` + // The name of the run. + RunName string `json:"run_name,omitempty"` // [Deprecated, use run_id instead] Unique identifier for the run. This // field will be removed in a future MLflow version. RunUuid string `json:"run_uuid,omitempty"` @@ -2285,7 +2290,7 @@ type RunInfo struct { // instead. UserId string `json:"user_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RunInfo) UnmarshalJSON(b []byte) error { @@ -2296,7 +2301,7 @@ func (s RunInfo) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -// Current status of the run. +// Status of a run. type RunInfoStatus string const RunInfoStatusFailed RunInfoStatus = `FAILED` @@ -2330,18 +2335,20 @@ func (f *RunInfoStatus) Type() string { return "RunInfoStatus" } +// Run inputs. type RunInputs struct { // Run metrics. DatasetInputs []DatasetInput `json:"dataset_inputs,omitempty"` } +// Tag for a run. type RunTag struct { // The tag key. Key string `json:"key,omitempty"` // The tag value. Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RunTag) UnmarshalJSON(b []byte) error { @@ -2367,9 +2374,9 @@ type SearchExperiments struct { PageToken string `json:"page_token,omitempty"` // Qualifier for type of experiments to be returned. If unspecified, return // only active experiments. - ViewType SearchExperimentsViewType `json:"view_type,omitempty"` + ViewType ViewType `json:"view_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SearchExperiments) UnmarshalJSON(b []byte) error { @@ -2387,7 +2394,7 @@ type SearchExperimentsResponse struct { // token means that no more experiments are available for retrieval. NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SearchExperimentsResponse) UnmarshalJSON(b []byte) error { @@ -2398,37 +2405,6 @@ func (s SearchExperimentsResponse) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -// Qualifier for type of experiments to be returned. If unspecified, return only -// active experiments. -type SearchExperimentsViewType string - -const SearchExperimentsViewTypeActiveOnly SearchExperimentsViewType = `ACTIVE_ONLY` - -const SearchExperimentsViewTypeAll SearchExperimentsViewType = `ALL` - -const SearchExperimentsViewTypeDeletedOnly SearchExperimentsViewType = `DELETED_ONLY` - -// String representation for [fmt.Print] -func (f *SearchExperimentsViewType) String() string { - return string(*f) -} - -// Set raw string value and validate it against allowed values -func (f *SearchExperimentsViewType) Set(v string) error { - switch v { - case `ACTIVE_ONLY`, `ALL`, `DELETED_ONLY`: - *f = SearchExperimentsViewType(v) - return nil - default: - return fmt.Errorf(`value "%s" is not one of "ACTIVE_ONLY", "ALL", "DELETED_ONLY"`, v) - } -} - -// Type always returns SearchExperimentsViewType to satisfy [pflag.Value] interface -func (f *SearchExperimentsViewType) Type() string { - return "SearchExperimentsViewType" -} - // Searches model versions type SearchModelVersionsRequest struct { // String filter condition, like "name='my-model-name'". Must be a single @@ -2444,7 +2420,7 @@ type SearchModelVersionsRequest struct { // Pagination token to go to next page based on previous search query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SearchModelVersionsRequest) UnmarshalJSON(b []byte) error { @@ -2462,7 +2438,7 @@ type SearchModelVersionsResponse struct { // query. NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SearchModelVersionsResponse) UnmarshalJSON(b []byte) error { @@ -2488,7 +2464,7 @@ type SearchModelsRequest struct { // Pagination token to go to the next page based on a previous search query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SearchModelsRequest) UnmarshalJSON(b []byte) error { @@ -2505,7 +2481,7 @@ type SearchModelsResponse struct { // Registered Models that match the search criteria. RegisteredModels []Model `json:"registered_models,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SearchModelsResponse) UnmarshalJSON(b []byte) error { @@ -2535,19 +2511,19 @@ type SearchRuns struct { // Maximum number of runs desired. Max threshold is 50000 MaxResults int `json:"max_results,omitempty"` // List of columns to be ordered by, including attributes, params, metrics, - // and tags with an optional "DESC" or "ASC" annotation, where "ASC" is the - // default. Example: ["params.input DESC", "metrics.alpha ASC", - // "metrics.rmse"] Tiebreaks are done by start_time DESC followed by run_id - // for runs with the same start time (and this is the default ordering - // criterion if order_by is not provided). + // and tags with an optional `"DESC"` or `"ASC"` annotation, where `"ASC"` + // is the default. Example: `["params.input DESC", "metrics.alpha ASC", + // "metrics.rmse"]`. Tiebreaks are done by start_time `DESC` followed by + // `run_id` for runs with the same start time (and this is the default + // ordering criterion if order_by is not provided). OrderBy []string `json:"order_by,omitempty"` // Token for the current page of runs. PageToken string `json:"page_token,omitempty"` // Whether to display only active, only deleted, or all runs. Defaults to // only active runs. - RunViewType SearchRunsRunViewType `json:"run_view_type,omitempty"` + RunViewType ViewType `json:"run_view_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SearchRuns) UnmarshalJSON(b []byte) error { @@ -2564,7 +2540,7 @@ type SearchRunsResponse struct { // Runs that match the search criteria. Runs []Run `json:"runs,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SearchRunsResponse) UnmarshalJSON(b []byte) error { @@ -2575,46 +2551,13 @@ func (s SearchRunsResponse) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -// Whether to display only active, only deleted, or all runs. Defaults to only -// active runs. -type SearchRunsRunViewType string - -const SearchRunsRunViewTypeActiveOnly SearchRunsRunViewType = `ACTIVE_ONLY` - -const SearchRunsRunViewTypeAll SearchRunsRunViewType = `ALL` - -const SearchRunsRunViewTypeDeletedOnly SearchRunsRunViewType = `DELETED_ONLY` - -// String representation for [fmt.Print] -func (f *SearchRunsRunViewType) String() string { - return string(*f) -} - -// Set raw string value and validate it against allowed values -func (f *SearchRunsRunViewType) Set(v string) error { - switch v { - case `ACTIVE_ONLY`, `ALL`, `DELETED_ONLY`: - *f = SearchRunsRunViewType(v) - return nil - default: - return fmt.Errorf(`value "%s" is not one of "ACTIVE_ONLY", "ALL", "DELETED_ONLY"`, v) - } -} - -// Type always returns SearchRunsRunViewType to satisfy [pflag.Value] interface -func (f *SearchRunsRunViewType) Type() string { - return "SearchRunsRunViewType" -} - type SetExperimentTag struct { // ID of the experiment under which to log the tag. Must be provided. ExperimentId string `json:"experiment_id"` - // Name of the tag. Maximum size depends on storage backend. All storage - // backends are guaranteed to support key values up to 250 bytes in size. + // Name of the tag. Keys up to 250 bytes in size are supported. Key string `json:"key"` - // String value of the tag being logged. Maximum size depends on storage - // backend. All storage backends are guaranteed to support key values up to - // 5000 bytes in size. + // String value of the tag being logged. Values up to 64KB in size are + // supported. Value string `json:"value"` } @@ -2658,20 +2601,18 @@ type SetModelVersionTagResponse struct { } type SetTag struct { - // Name of the tag. Maximum size depends on storage backend. All storage - // backends are guaranteed to support key values up to 250 bytes in size. + // Name of the tag. Keys up to 250 bytes in size are supported. Key string `json:"key"` // ID of the run under which to log the tag. Must be provided. RunId string `json:"run_id,omitempty"` - // [Deprecated, use run_id instead] ID of the run under which to log the + // [Deprecated, use `run_id` instead] ID of the run under which to log the // tag. This field will be removed in a future MLflow version. RunUuid string `json:"run_uuid,omitempty"` - // String value of the tag being logged. Maximum size depends on storage - // backend. All storage backends are guaranteed to support key values up to - // 5000 bytes in size. + // String value of the tag being logged. Values up to 64KB in size are + // supported. Value string `json:"value"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SetTag) UnmarshalJSON(b []byte) error { @@ -2776,7 +2717,7 @@ type TestRegistryWebhook struct { // Status code returned by the webhook URL StatusCode int `json:"status_code,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TestRegistryWebhook) UnmarshalJSON(b []byte) error { @@ -2822,7 +2763,7 @@ type TransitionModelVersionStageDatabricks struct { // Version of the model. Version string `json:"version"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TransitionModelVersionStageDatabricks) UnmarshalJSON(b []byte) error { @@ -2855,7 +2796,7 @@ type TransitionRequest struct { // The username of the user that created the object. UserId string `json:"user_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TransitionRequest) UnmarshalJSON(b []byte) error { @@ -2889,7 +2830,7 @@ type UpdateExperiment struct { // name must be unique. NewName string `json:"new_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateExperiment) UnmarshalJSON(b []byte) error { @@ -2909,7 +2850,7 @@ type UpdateModelRequest struct { // Registered model unique name identifier. Name string `json:"name"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateModelRequest) UnmarshalJSON(b []byte) error { @@ -2931,7 +2872,7 @@ type UpdateModelVersionRequest struct { // Model version number Version string `json:"version"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateModelVersionRequest) UnmarshalJSON(b []byte) error { @@ -2998,7 +2939,7 @@ type UpdateRegistryWebhook struct { // not triggered on a real event. Status RegistryWebhookStatus `json:"status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateRegistryWebhook) UnmarshalJSON(b []byte) error { @@ -3014,13 +2955,15 @@ type UpdateRun struct { EndTime int64 `json:"end_time,omitempty"` // ID of the run to update. Must be provided. RunId string `json:"run_id,omitempty"` - // [Deprecated, use run_id instead] ID of the run to update.. This field + // Updated name of the run. + RunName string `json:"run_name,omitempty"` + // [Deprecated, use `run_id` instead] ID of the run to update. This field // will be removed in a future MLflow version. RunUuid string `json:"run_uuid,omitempty"` // Updated status of the run. Status UpdateRunStatus `json:"status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateRun) UnmarshalJSON(b []byte) error { @@ -3036,7 +2979,7 @@ type UpdateRunResponse struct { RunInfo *RunInfo `json:"run_info,omitempty"` } -// Updated status of the run. +// Status of a run. type UpdateRunStatus string const UpdateRunStatusFailed UpdateRunStatus = `FAILED` @@ -3072,3 +3015,33 @@ func (f *UpdateRunStatus) Type() string { type UpdateWebhookResponse struct { } + +// Qualifier for the view type. +type ViewType string + +const ViewTypeActiveOnly ViewType = `ACTIVE_ONLY` + +const ViewTypeAll ViewType = `ALL` + +const ViewTypeDeletedOnly ViewType = `DELETED_ONLY` + +// String representation for [fmt.Print] +func (f *ViewType) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *ViewType) Set(v string) error { + switch v { + case `ACTIVE_ONLY`, `ALL`, `DELETED_ONLY`: + *f = ViewType(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "ACTIVE_ONLY", "ALL", "DELETED_ONLY"`, v) + } +} + +// Type always returns ViewType to satisfy [pflag.Value] interface +func (f *ViewType) Type() string { + return "ViewType" +} diff --git a/oauth2/v2/model.go b/oauth2/v2/model.go index 2ddc77e5b..afd809b35 100755 --- a/oauth2/v2/model.go +++ b/oauth2/v2/model.go @@ -14,7 +14,7 @@ type CreateAccountFederationPolicyRequest struct { // unspecified, the id will be assigned by Databricks. PolicyId string `json:"-" url:"policy_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateAccountFederationPolicyRequest) UnmarshalJSON(b []byte) error { @@ -43,7 +43,7 @@ type CreateCustomAppIntegration struct { // minted. Must be a subset of scopes. UserAuthorizedScopes []string `json:"user_authorized_scopes,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateCustomAppIntegration) UnmarshalJSON(b []byte) error { @@ -63,7 +63,7 @@ type CreateCustomAppIntegrationOutput struct { // Unique integration id for the custom OAuth app IntegrationId string `json:"integration_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateCustomAppIntegrationOutput) UnmarshalJSON(b []byte) error { @@ -81,7 +81,7 @@ type CreatePublishedAppIntegration struct { // Token access policy TokenAccessPolicy *TokenAccessPolicy `json:"token_access_policy,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreatePublishedAppIntegration) UnmarshalJSON(b []byte) error { @@ -96,7 +96,7 @@ type CreatePublishedAppIntegrationOutput struct { // Unique integration id for the published OAuth app IntegrationId string `json:"integration_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreatePublishedAppIntegrationOutput) UnmarshalJSON(b []byte) error { @@ -117,7 +117,7 @@ type CreateServicePrincipalFederationPolicyRequest struct { // The service principal id for the federation policy. ServicePrincipalId int64 `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateServicePrincipalFederationPolicyRequest) UnmarshalJSON(b []byte) error { @@ -148,7 +148,7 @@ type CreateServicePrincipalSecretResponse struct { // UTC time when the secret was updated UpdateTime string `json:"update_time,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateServicePrincipalSecretResponse) UnmarshalJSON(b []byte) error { @@ -221,7 +221,7 @@ type FederationPolicy struct { // Last update time of the federation policy. UpdateTime string `json:"update_time,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *FederationPolicy) UnmarshalJSON(b []byte) error { @@ -265,7 +265,7 @@ type GetCustomAppIntegrationOutput struct { // minted. Must be a subset of scopes. UserAuthorizedScopes []string `json:"user_authorized_scopes,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetCustomAppIntegrationOutput) UnmarshalJSON(b []byte) error { @@ -288,7 +288,7 @@ type GetCustomAppIntegrationsOutput struct { NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetCustomAppIntegrationsOutput) UnmarshalJSON(b []byte) error { @@ -313,7 +313,7 @@ type GetPublishedAppIntegrationOutput struct { // Token access policy TokenAccessPolicy *TokenAccessPolicy `json:"token_access_policy,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetPublishedAppIntegrationOutput) UnmarshalJSON(b []byte) error { @@ -335,7 +335,7 @@ type GetPublishedAppIntegrationsOutput struct { NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetPublishedAppIntegrationsOutput) UnmarshalJSON(b []byte) error { @@ -353,7 +353,7 @@ type GetPublishedAppsOutput struct { // there are no more results to show. NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetPublishedAppsOutput) UnmarshalJSON(b []byte) error { @@ -378,7 +378,7 @@ type ListAccountFederationPoliciesRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAccountFederationPoliciesRequest) UnmarshalJSON(b []byte) error { @@ -397,7 +397,7 @@ type ListCustomAppIntegrationsRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListCustomAppIntegrationsRequest) UnmarshalJSON(b []byte) error { @@ -413,7 +413,7 @@ type ListFederationPoliciesResponse struct { Policies []FederationPolicy `json:"policies,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListFederationPoliciesResponse) UnmarshalJSON(b []byte) error { @@ -431,7 +431,7 @@ type ListOAuthPublishedAppsRequest struct { // A token that can be used to get the next page of results. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListOAuthPublishedAppsRequest) UnmarshalJSON(b []byte) error { @@ -448,7 +448,7 @@ type ListPublishedAppIntegrationsRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListPublishedAppIntegrationsRequest) UnmarshalJSON(b []byte) error { @@ -467,7 +467,7 @@ type ListServicePrincipalFederationPoliciesRequest struct { // The service principal id for the federation policy. ServicePrincipalId int64 `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListServicePrincipalFederationPoliciesRequest) UnmarshalJSON(b []byte) error { @@ -493,7 +493,7 @@ type ListServicePrincipalSecretsRequest struct { // The service principal ID. ServicePrincipalId int64 `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListServicePrincipalSecretsRequest) UnmarshalJSON(b []byte) error { @@ -510,7 +510,7 @@ type ListServicePrincipalSecretsResponse struct { // List of the secrets Secrets []SecretInfo `json:"secrets,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListServicePrincipalSecretsResponse) UnmarshalJSON(b []byte) error { @@ -548,7 +548,7 @@ type OidcFederationPolicy struct { // default value is 'sub'. SubjectClaim string `json:"subject_claim,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *OidcFederationPolicy) UnmarshalJSON(b []byte) error { @@ -577,7 +577,7 @@ type PublishedAppOutput struct { // Required scopes for the published OAuth app. Scopes []string `json:"scopes,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PublishedAppOutput) UnmarshalJSON(b []byte) error { @@ -600,7 +600,7 @@ type SecretInfo struct { // UTC time when the secret was updated UpdateTime string `json:"update_time,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SecretInfo) UnmarshalJSON(b []byte) error { @@ -617,7 +617,7 @@ type TokenAccessPolicy struct { // refresh token time to live in minutes RefreshTokenTtlInMinutes int `json:"refresh_token_ttl_in_minutes,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TokenAccessPolicy) UnmarshalJSON(b []byte) error { @@ -641,7 +641,7 @@ type UpdateAccountFederationPolicyRequest struct { // the existing policy. Example value: 'description,oidc_policy.audiences'. UpdateMask string `json:"-" url:"update_mask,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateAccountFederationPolicyRequest) UnmarshalJSON(b []byte) error { @@ -696,7 +696,7 @@ type UpdateServicePrincipalFederationPolicyRequest struct { // the existing policy. Example value: 'description,oidc_policy.audiences'. UpdateMask string `json:"-" url:"update_mask,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateServicePrincipalFederationPolicyRequest) UnmarshalJSON(b []byte) error { diff --git a/pipelines/v2/model.go b/pipelines/v2/model.go index dcc58431f..2fcd6d729 100755 --- a/pipelines/v2/model.go +++ b/pipelines/v2/model.go @@ -99,7 +99,7 @@ type AwsAttributes struct { // as the default value can be found by using the `List Zones` method. ZoneId string `json:"zone_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AwsAttributes) UnmarshalJSON(b []byte) error { @@ -169,7 +169,7 @@ type AzureAttributes struct { // availability. Further, the value should > 0 or -1. SpotBidMaxPrice float64 `json:"spot_bid_max_price,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AzureAttributes) UnmarshalJSON(b []byte) error { @@ -296,7 +296,7 @@ type CreatePipeline struct { // Which pipeline trigger to use. Deprecated: Use `continuous` instead. Trigger *PipelineTrigger `json:"trigger,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreatePipeline) UnmarshalJSON(b []byte) error { @@ -314,7 +314,7 @@ type CreatePipelineResponse struct { // dry_run is false. PipelineId string `json:"pipeline_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreatePipelineResponse) UnmarshalJSON(b []byte) error { @@ -330,7 +330,7 @@ type CronTrigger struct { TimezoneId string `json:"timezone_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CronTrigger) UnmarshalJSON(b []byte) error { @@ -347,7 +347,7 @@ type DataPlaneId struct { // A sequence number, unique and increasing within the data plane instance. SeqNo int `json:"seq_no,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DataPlaneId) UnmarshalJSON(b []byte) error { @@ -539,7 +539,7 @@ type EditPipeline struct { // Which pipeline trigger to use. Deprecated: Use `continuous` instead. Trigger *PipelineTrigger `json:"trigger,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EditPipeline) UnmarshalJSON(b []byte) error { @@ -559,7 +559,7 @@ type ErrorDetail struct { // Whether this error is considered fatal, that is, unrecoverable. Fatal bool `json:"fatal,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ErrorDetail) UnmarshalJSON(b []byte) error { @@ -606,7 +606,7 @@ type FileLibrary struct { // The absolute path of the file. Path string `json:"path,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *FileLibrary) UnmarshalJSON(b []byte) error { @@ -657,7 +657,7 @@ type GcpAttributes struct { // https://cloud.google.com/compute/docs/regions-zones. ZoneId string `json:"zone_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GcpAttributes) UnmarshalJSON(b []byte) error { @@ -755,7 +755,7 @@ type GetPipelineResponse struct { // The pipeline state. State PipelineState `json:"state,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetPipelineResponse) UnmarshalJSON(b []byte) error { @@ -836,7 +836,7 @@ type IngestionGatewayPipelineDefinition struct { // storage location. GatewayStorageSchema string `json:"gateway_storage_schema,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *IngestionGatewayPipelineDefinition) UnmarshalJSON(b []byte) error { @@ -863,7 +863,7 @@ type IngestionPipelineDefinition struct { // are applied to all tables in the pipeline. TableConfiguration *TableSpecificConfig `json:"table_configuration,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *IngestionPipelineDefinition) UnmarshalJSON(b []byte) error { @@ -928,7 +928,7 @@ type ListPipelineEventsRequest struct { PipelineId string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListPipelineEventsRequest) UnmarshalJSON(b []byte) error { @@ -947,7 +947,7 @@ type ListPipelineEventsResponse struct { // If present, a token to fetch the previous page of events. PrevPageToken string `json:"prev_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListPipelineEventsResponse) UnmarshalJSON(b []byte) error { @@ -982,7 +982,7 @@ type ListPipelinesRequest struct { // Page token returned by previous call PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListPipelinesRequest) UnmarshalJSON(b []byte) error { @@ -999,7 +999,7 @@ type ListPipelinesResponse struct { // The list of events matching the request criteria. Statuses []PipelineStateInfo `json:"statuses,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListPipelinesResponse) UnmarshalJSON(b []byte) error { @@ -1021,7 +1021,7 @@ type ListUpdatesRequest struct { // If present, returns updates until and including this update_id. UntilUpdateId string `json:"-" url:"until_update_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListUpdatesRequest) UnmarshalJSON(b []byte) error { @@ -1042,7 +1042,7 @@ type ListUpdatesResponse struct { Updates []UpdateInfo `json:"updates,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListUpdatesResponse) UnmarshalJSON(b []byte) error { @@ -1064,7 +1064,7 @@ type LogAnalyticsInfo struct { // LogAnalyticsWorkspaceId string `json:"log_analytics_workspace_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *LogAnalyticsInfo) UnmarshalJSON(b []byte) error { @@ -1121,7 +1121,7 @@ type MavenLibrary struct { // Central Repository and Spark Packages are searched. Repo string `json:"repo,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MavenLibrary) UnmarshalJSON(b []byte) error { @@ -1136,7 +1136,7 @@ type NotebookLibrary struct { // The absolute path of the notebook. Path string `json:"path,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *NotebookLibrary) UnmarshalJSON(b []byte) error { @@ -1197,7 +1197,7 @@ type Origin struct { // The id of an execution. Globally unique. UpdateId string `json:"update_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Origin) UnmarshalJSON(b []byte) error { @@ -1218,7 +1218,7 @@ type PipelineAccessControlRequest struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PipelineAccessControlRequest) UnmarshalJSON(b []byte) error { @@ -1241,7 +1241,7 @@ type PipelineAccessControlResponse struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PipelineAccessControlResponse) UnmarshalJSON(b []byte) error { @@ -1348,7 +1348,7 @@ type PipelineCluster struct { // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys []string `json:"ssh_public_keys,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PipelineCluster) UnmarshalJSON(b []byte) error { @@ -1413,7 +1413,7 @@ type PipelineDeployment struct { // The path to the file containing metadata about the deployment. MetadataFilePath string `json:"metadata_file_path,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PipelineDeployment) UnmarshalJSON(b []byte) error { @@ -1444,7 +1444,7 @@ type PipelineEvent struct { // The time of the event. Timestamp string `json:"timestamp,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PipelineEvent) UnmarshalJSON(b []byte) error { @@ -1469,7 +1469,7 @@ type PipelineLibrary struct { // URI of the whl to be installed. Whl string `json:"whl,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PipelineLibrary) UnmarshalJSON(b []byte) error { @@ -1487,7 +1487,7 @@ type PipelinePermission struct { // Permission level PermissionLevel PipelinePermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PipelinePermission) UnmarshalJSON(b []byte) error { @@ -1537,7 +1537,7 @@ type PipelinePermissions struct { ObjectType string `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PipelinePermissions) UnmarshalJSON(b []byte) error { @@ -1553,7 +1553,7 @@ type PipelinePermissionsDescription struct { // Permission level PermissionLevel PipelinePermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PipelinePermissionsDescription) UnmarshalJSON(b []byte) error { @@ -1627,7 +1627,7 @@ type PipelineSpec struct { // Which pipeline trigger to use. Deprecated: Use `continuous` instead. Trigger *PipelineTrigger `json:"trigger,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PipelineSpec) UnmarshalJSON(b []byte) error { @@ -1700,7 +1700,7 @@ type PipelineStateInfo struct { // The pipeline state. State PipelineState `json:"state,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PipelineStateInfo) UnmarshalJSON(b []byte) error { @@ -1760,7 +1760,7 @@ type ReportSpec struct { // IngestionPipelineDefinition object. TableConfiguration *TableSpecificConfig `json:"table_configuration,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ReportSpec) UnmarshalJSON(b []byte) error { @@ -1785,7 +1785,7 @@ type RestartWindow struct { // for details. If not specified, UTC will be used. TimeZoneId string `json:"time_zone_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RestartWindow) UnmarshalJSON(b []byte) error { @@ -1810,7 +1810,7 @@ type RunAs struct { // their own email. UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RunAs) UnmarshalJSON(b []byte) error { @@ -1853,7 +1853,7 @@ type S3StorageInfo struct { // If both are set, endpoint will be used. Region string `json:"region,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *S3StorageInfo) UnmarshalJSON(b []byte) error { @@ -1881,7 +1881,7 @@ type SchemaSpec struct { // table_configuration defined in the IngestionPipelineDefinition object. TableConfiguration *TableSpecificConfig `json:"table_configuration,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SchemaSpec) UnmarshalJSON(b []byte) error { @@ -1898,7 +1898,7 @@ type Sequencing struct { // the ID assigned by the data plane. DataPlaneId *DataPlaneId `json:"data_plane_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Sequencing) UnmarshalJSON(b []byte) error { @@ -1917,7 +1917,7 @@ type SerializedException struct { // Stack trace consisting of a list of stack frames Stack []StackFrame `json:"stack,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SerializedException) UnmarshalJSON(b []byte) error { @@ -1938,7 +1938,7 @@ type StackFrame struct { // Name of the method which was called MethodName string `json:"method_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *StackFrame) UnmarshalJSON(b []byte) error { @@ -1969,7 +1969,7 @@ type StartUpdate struct { // code but does not materialize or publish any datasets. ValidateOnly bool `json:"validate_only,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *StartUpdate) UnmarshalJSON(b []byte) error { @@ -2018,7 +2018,7 @@ func (f *StartUpdateCause) Type() string { type StartUpdateResponse struct { UpdateId string `json:"update_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *StartUpdateResponse) UnmarshalJSON(b []byte) error { @@ -2057,7 +2057,7 @@ type TableSpec struct { // IngestionPipelineDefinition object and the SchemaSpec. TableConfiguration *TableSpecificConfig `json:"table_configuration,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TableSpec) UnmarshalJSON(b []byte) error { @@ -2081,7 +2081,7 @@ type TableSpecificConfig struct { // arrive out of order. SequenceBy []string `json:"sequence_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TableSpecificConfig) UnmarshalJSON(b []byte) error { @@ -2152,7 +2152,7 @@ type UpdateInfo struct { // code but does not materialize or publish any datasets. ValidateOnly bool `json:"validate_only,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateInfo) UnmarshalJSON(b []byte) error { @@ -2252,7 +2252,7 @@ type UpdateStateInfo struct { UpdateId string `json:"update_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateStateInfo) UnmarshalJSON(b []byte) error { diff --git a/provisioning/v2/model.go b/provisioning/v2/model.go index 8126a7c9c..006c38bda 100755 --- a/provisioning/v2/model.go +++ b/provisioning/v2/model.go @@ -25,7 +25,7 @@ type AwsKeyInfo struct { // EBS volumes, set to `false`. ReuseKeyForClusterVolumes bool `json:"reuse_key_for_cluster_volumes,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AwsKeyInfo) UnmarshalJSON(b []byte) error { @@ -42,7 +42,7 @@ type AzureWorkspaceInfo struct { // Azure Subscription ID SubscriptionId string `json:"subscription_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AzureWorkspaceInfo) UnmarshalJSON(b []byte) error { @@ -71,7 +71,7 @@ type CreateAwsKeyInfo struct { // set this to `false`. ReuseKeyForClusterVolumes bool `json:"reuse_key_for_cluster_volumes,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateAwsKeyInfo) UnmarshalJSON(b []byte) error { @@ -96,7 +96,7 @@ type CreateCredentialStsRole struct { // The Amazon Resource Name (ARN) of the cross account role. RoleArn string `json:"role_arn,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateCredentialStsRole) UnmarshalJSON(b []byte) error { @@ -141,7 +141,7 @@ type CreateNetworkRequest struct { // multiple network configurations. VpcId string `json:"vpc_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateNetworkRequest) UnmarshalJSON(b []byte) error { @@ -170,7 +170,7 @@ type CreateVpcEndpointRequest struct { // The human-readable name of the storage configuration. VpcEndpointName string `json:"vpc_endpoint_name"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateVpcEndpointRequest) UnmarshalJSON(b []byte) error { @@ -293,7 +293,7 @@ type CreateWorkspaceRequest struct { // The workspace's human-readable name. WorkspaceName string `json:"workspace_name"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateWorkspaceRequest) UnmarshalJSON(b []byte) error { @@ -316,7 +316,7 @@ type Credential struct { // The human-readable name of the credential configuration object. CredentialsName string `json:"credentials_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Credential) UnmarshalJSON(b []byte) error { @@ -339,7 +339,7 @@ type CustomerFacingGcpCloudResourceContainer struct { // cloud resources for your workspace. ProjectId string `json:"project_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CustomerFacingGcpCloudResourceContainer) UnmarshalJSON(b []byte) error { @@ -364,7 +364,7 @@ type CustomerManagedKey struct { // The cases that the key can be used for. UseCases []KeyUseCase `json:"use_cases,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CustomerManagedKey) UnmarshalJSON(b []byte) error { @@ -494,7 +494,7 @@ type ExternalCustomerInfo struct { // The legal entity name for the external workspace CustomerName string `json:"customer_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExternalCustomerInfo) UnmarshalJSON(b []byte) error { @@ -544,7 +544,7 @@ type GcpManagedNetworkConfig struct { // `/9` and no smaller than `/29`. SubnetCidr string `json:"subnet_cidr,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GcpManagedNetworkConfig) UnmarshalJSON(b []byte) error { @@ -593,7 +593,7 @@ type GcpVpcEndpointInfo struct { // The service attachment this PSC connection connects to. ServiceAttachmentId string `json:"service_attachment_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GcpVpcEndpointInfo) UnmarshalJSON(b []byte) error { @@ -663,7 +663,7 @@ type GkeConfig struct { // It must be exactly as big as `/28`. MasterIpRange string `json:"master_ip_range,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GkeConfig) UnmarshalJSON(b []byte) error { @@ -777,7 +777,7 @@ type Network struct { // Workspace ID associated with this network configuration. WorkspaceId int64 `json:"workspace_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Network) UnmarshalJSON(b []byte) error { @@ -795,7 +795,7 @@ type NetworkHealth struct { // security group, or network ACL. ErrorType ErrorType `json:"error_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *NetworkHealth) UnmarshalJSON(b []byte) error { @@ -826,7 +826,7 @@ type NetworkWarning struct { // group. WarningType WarningType `json:"warning_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *NetworkWarning) UnmarshalJSON(b []byte) error { @@ -935,7 +935,7 @@ type PrivateAccessSettings struct { // object. Region string `json:"region,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PrivateAccessSettings) UnmarshalJSON(b []byte) error { @@ -954,7 +954,7 @@ type RootBucketInfo struct { // The name of the S3 bucket. BucketName string `json:"bucket_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RootBucketInfo) UnmarshalJSON(b []byte) error { @@ -977,7 +977,7 @@ type StorageConfiguration struct { // The human-readable name of the storage configuration. StorageConfigurationName string `json:"storage_configuration_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *StorageConfiguration) UnmarshalJSON(b []byte) error { @@ -995,7 +995,7 @@ type StsRole struct { // The Amazon Resource Name (ARN) of the cross account role. RoleArn string `json:"role_arn,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *StsRole) UnmarshalJSON(b []byte) error { @@ -1043,7 +1043,7 @@ type UpdateWorkspaceRequest struct { // Workspace ID. WorkspaceId int64 `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateWorkspaceRequest) UnmarshalJSON(b []byte) error { @@ -1091,7 +1091,7 @@ type UpsertPrivateAccessSettingsRequest struct { // settings object. Region string `json:"region"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpsertPrivateAccessSettingsRequest) UnmarshalJSON(b []byte) error { @@ -1139,7 +1139,7 @@ type VpcEndpoint struct { // The human-readable name of the storage configuration. VpcEndpointName string `json:"vpc_endpoint_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *VpcEndpoint) UnmarshalJSON(b []byte) error { @@ -1315,7 +1315,7 @@ type Workspace struct { // Message describing the current workspace status. WorkspaceStatusMessage string `json:"workspace_status_message,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Workspace) UnmarshalJSON(b []byte) error { diff --git a/serving/v2/model.go b/serving/v2/model.go index 4dcb80c75..22cb0447f 100755 --- a/serving/v2/model.go +++ b/serving/v2/model.go @@ -21,7 +21,7 @@ type Ai21LabsConfig struct { // `ai21labs_api_key` or `ai21labs_api_key_plaintext`. Ai21labsApiKeyPlaintext string `json:"ai21labs_api_key_plaintext,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Ai21LabsConfig) UnmarshalJSON(b []byte) error { @@ -60,7 +60,7 @@ type AiGatewayGuardrailParameters struct { // the request if its topic is not in the allowed topics. ValidTopics []string `json:"valid_topics,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AiGatewayGuardrailParameters) UnmarshalJSON(b []byte) error { @@ -125,7 +125,7 @@ type AiGatewayInferenceTableConfig struct { // disable inference table first in order to change the prefix name. TableNamePrefix string `json:"table_name_prefix,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AiGatewayInferenceTableConfig) UnmarshalJSON(b []byte) error { @@ -204,7 +204,7 @@ type AiGatewayUsageTrackingConfig struct { // Whether to enable usage tracking. Enabled bool `json:"enabled,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AiGatewayUsageTrackingConfig) UnmarshalJSON(b []byte) error { @@ -247,8 +247,14 @@ type AmazonBedrockConfig struct { // The underlying provider in Amazon Bedrock. Supported values (case // insensitive) include: Anthropic, Cohere, AI21Labs, Amazon. BedrockProvider AmazonBedrockConfigBedrockProvider `json:"bedrock_provider"` + // ARN of the instance profile that the external model will use to access + // AWS resources. You must authenticate using an instance profile or access + // keys. If you prefer to authenticate using access keys, see + // `aws_access_key_id`, `aws_access_key_id_plaintext`, + // `aws_secret_access_key` and `aws_secret_access_key_plaintext`. + InstanceProfileArn string `json:"instance_profile_arn,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AmazonBedrockConfig) UnmarshalJSON(b []byte) error { @@ -302,7 +308,7 @@ type AnthropicConfig struct { // `anthropic_api_key` or `anthropic_api_key_plaintext`. AnthropicApiKeyPlaintext string `json:"anthropic_api_key_plaintext,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AnthropicConfig) UnmarshalJSON(b []byte) error { @@ -326,7 +332,7 @@ type AutoCaptureConfigInput struct { // change the prefix name if the inference table is already enabled. TableNamePrefix string `json:"table_name_prefix,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AutoCaptureConfigInput) UnmarshalJSON(b []byte) error { @@ -352,7 +358,7 @@ type AutoCaptureConfigOutput struct { // change the prefix name if the inference table is already enabled. TableNamePrefix string `json:"table_name_prefix,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AutoCaptureConfigOutput) UnmarshalJSON(b []byte) error { @@ -388,7 +394,7 @@ type ChatMessage struct { // The role of the message. One of [system, user, assistant]. Role ChatMessageRole `json:"role,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ChatMessage) UnmarshalJSON(b []byte) error { @@ -444,7 +450,7 @@ type CohereConfig struct { // `cohere_api_key` or `cohere_api_key_plaintext`. CohereApiKeyPlaintext string `json:"cohere_api_key_plaintext,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CohereConfig) UnmarshalJSON(b []byte) error { @@ -475,7 +481,7 @@ type CreateServingEndpoint struct { // to billing logs. Tags []EndpointTag `json:"tags,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateServingEndpoint) UnmarshalJSON(b []byte) error { @@ -493,7 +499,7 @@ type DataPlaneInfo struct { // The URL of the endpoint for this operation in the dataplane. EndpointUrl string `json:"endpoint_url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DataPlaneInfo) UnmarshalJSON(b []byte) error { @@ -523,7 +529,7 @@ type DatabricksModelServingConfig struct { // pointed to by this external model. DatabricksWorkspaceUrl string `json:"databricks_workspace_url"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DatabricksModelServingConfig) UnmarshalJSON(b []byte) error { @@ -557,7 +563,7 @@ type EmbeddingsV1ResponseEmbeddingElement struct { // This will always be 'embedding'. Object EmbeddingsV1ResponseEmbeddingElementObject `json:"object,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EmbeddingsV1ResponseEmbeddingElement) UnmarshalJSON(b []byte) error { @@ -629,7 +635,7 @@ type EndpointCoreConfigOutput struct { // The traffic configuration associated with the serving endpoint config. TrafficConfig *TrafficConfig `json:"traffic_config,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EndpointCoreConfigOutput) UnmarshalJSON(b []byte) error { @@ -669,7 +675,7 @@ type EndpointPendingConfig struct { // should be routed. TrafficConfig *TrafficConfig `json:"traffic_config,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EndpointPendingConfig) UnmarshalJSON(b []byte) error { @@ -758,7 +764,7 @@ type EndpointTag struct { // Optional value field for a serving endpoint tag. Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EndpointTag) UnmarshalJSON(b []byte) error { @@ -801,7 +807,7 @@ type ExternalFunctionRequest struct { // The relative path for the API endpoint. This is required. Path string `json:"path"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExternalFunctionRequest) UnmarshalJSON(b []byte) error { @@ -922,7 +928,7 @@ type ExternalModelUsageElement struct { // The total number of tokens in the prompt and response. TotalTokens int `json:"total_tokens,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExternalModelUsageElement) UnmarshalJSON(b []byte) error { @@ -944,7 +950,7 @@ type FoundationModel struct { Name string `json:"name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *FoundationModel) UnmarshalJSON(b []byte) error { @@ -1021,7 +1027,7 @@ type GoogleCloudVertexAiConfig struct { // https://cloud.google.com/vertex-ai/docs/general/locations Region string `json:"region"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GoogleCloudVertexAiConfig) UnmarshalJSON(b []byte) error { @@ -1112,7 +1118,7 @@ type OpenAiConfig struct { // OpenAI. OpenaiOrganization string `json:"openai_organization,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *OpenAiConfig) UnmarshalJSON(b []byte) error { @@ -1135,7 +1141,7 @@ type PaLmConfig struct { // `palm_api_key_plaintext`. PalmApiKeyPlaintext string `json:"palm_api_key_plaintext,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PaLmConfig) UnmarshalJSON(b []byte) error { @@ -1163,7 +1169,7 @@ type PayloadTable struct { StatusMessage string `json:"status_message,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PayloadTable) UnmarshalJSON(b []byte) error { @@ -1273,7 +1279,7 @@ type QueryEndpointInput struct { // query fields. Temperature float64 `json:"temperature,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QueryEndpointInput) UnmarshalJSON(b []byte) error { @@ -1314,7 +1320,7 @@ type QueryEndpointResponse struct { // tokens used in the prompt and response. Usage *ExternalModelUsageElement `json:"usage,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QueryEndpointResponse) UnmarshalJSON(b []byte) error { @@ -1487,7 +1493,7 @@ type ServedEntityInput struct { // [GPU types]: https://docs.databricks.com/en/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types WorkloadType ServingModelWorkloadType `json:"workload_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServedEntityInput) UnmarshalJSON(b []byte) error { @@ -1564,7 +1570,7 @@ type ServedEntityOutput struct { // [GPU types]: https://docs.databricks.com/en/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types WorkloadType ServingModelWorkloadType `json:"workload_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServedEntityOutput) UnmarshalJSON(b []byte) error { @@ -1587,7 +1593,7 @@ type ServedEntitySpec struct { Name string `json:"name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServedEntitySpec) UnmarshalJSON(b []byte) error { @@ -1643,7 +1649,7 @@ type ServedModelInput struct { // [GPU types]: https://docs.databricks.com/en/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types WorkloadType ServedModelInputWorkloadType `json:"workload_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServedModelInput) UnmarshalJSON(b []byte) error { @@ -1762,7 +1768,7 @@ type ServedModelOutput struct { // [GPU types]: https://docs.databricks.com/en/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types WorkloadType ServingModelWorkloadType `json:"workload_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServedModelOutput) UnmarshalJSON(b []byte) error { @@ -1781,7 +1787,7 @@ type ServedModelSpec struct { Name string `json:"name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServedModelSpec) UnmarshalJSON(b []byte) error { @@ -1797,7 +1803,7 @@ type ServedModelState struct { DeploymentStateMessage string `json:"deployment_state_message,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServedModelState) UnmarshalJSON(b []byte) error { @@ -1872,7 +1878,7 @@ type ServingEndpoint struct { // The task type of the serving endpoint. Task string `json:"task,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServingEndpoint) UnmarshalJSON(b []byte) error { @@ -1893,7 +1899,7 @@ type ServingEndpointAccessControlRequest struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServingEndpointAccessControlRequest) UnmarshalJSON(b []byte) error { @@ -1916,7 +1922,7 @@ type ServingEndpointAccessControlResponse struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServingEndpointAccessControlResponse) UnmarshalJSON(b []byte) error { @@ -1963,7 +1969,7 @@ type ServingEndpointDetailed struct { // The task type of the serving endpoint. Task string `json:"task,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServingEndpointDetailed) UnmarshalJSON(b []byte) error { @@ -2010,7 +2016,7 @@ type ServingEndpointPermission struct { // Permission level PermissionLevel ServingEndpointPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServingEndpointPermission) UnmarshalJSON(b []byte) error { @@ -2058,7 +2064,7 @@ type ServingEndpointPermissions struct { ObjectType string `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServingEndpointPermissions) UnmarshalJSON(b []byte) error { @@ -2074,7 +2080,7 @@ type ServingEndpointPermissionsDescription struct { // Permission level PermissionLevel ServingEndpointPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServingEndpointPermissionsDescription) UnmarshalJSON(b []byte) error { @@ -2141,7 +2147,7 @@ type V1ResponseChoiceElement struct { // The text response from the __completions__ endpoint. Text string `json:"text,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *V1ResponseChoiceElement) UnmarshalJSON(b []byte) error { diff --git a/settings/v2/model.go b/settings/v2/model.go index aeb2dfbf4..d74640586 100755 --- a/settings/v2/model.go +++ b/settings/v2/model.go @@ -25,7 +25,7 @@ type AccountIpAccessEnable struct { // instance per workspace. SettingName string `json:"setting_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AccountIpAccessEnable) UnmarshalJSON(b []byte) error { @@ -86,7 +86,7 @@ type AibiDashboardEmbeddingAccessPolicySetting struct { // instance per workspace. SettingName string `json:"setting_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AibiDashboardEmbeddingAccessPolicySetting) UnmarshalJSON(b []byte) error { @@ -118,7 +118,7 @@ type AibiDashboardEmbeddingApprovedDomainsSetting struct { // instance per workspace. SettingName string `json:"setting_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AibiDashboardEmbeddingApprovedDomainsSetting) UnmarshalJSON(b []byte) error { @@ -146,7 +146,7 @@ type AutomaticClusterUpdateSetting struct { // instance per workspace. SettingName string `json:"setting_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AutomaticClusterUpdateSetting) UnmarshalJSON(b []byte) error { @@ -160,7 +160,7 @@ func (s AutomaticClusterUpdateSetting) MarshalJSON() ([]byte, error) { type BooleanMessage struct { Value bool `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *BooleanMessage) UnmarshalJSON(b []byte) error { @@ -187,7 +187,7 @@ type ClusterAutoRestartMessage struct { RestartEvenIfNoUpdatesAvailable bool `json:"restart_even_if_no_updates_available,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterAutoRestartMessage) UnmarshalJSON(b []byte) error { @@ -213,7 +213,7 @@ type ClusterAutoRestartMessageEnablementDetails struct { // The feature is unavailable if the customer doesn't have enterprise tier UnavailableForNonEnterpriseTier bool `json:"unavailable_for_non_enterprise_tier,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterAutoRestartMessageEnablementDetails) UnmarshalJSON(b []byte) error { @@ -315,7 +315,7 @@ type ClusterAutoRestartMessageMaintenanceWindowWindowStartTime struct { Minutes int `json:"minutes,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) UnmarshalJSON(b []byte) error { @@ -333,7 +333,7 @@ type ComplianceSecurityProfile struct { IsEnabled bool `json:"is_enabled,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ComplianceSecurityProfile) UnmarshalJSON(b []byte) error { @@ -362,7 +362,7 @@ type ComplianceSecurityProfileSetting struct { // instance per workspace. SettingName string `json:"setting_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ComplianceSecurityProfileSetting) UnmarshalJSON(b []byte) error { @@ -472,7 +472,7 @@ type CreateNotificationDestinationRequest struct { // The display name for the notification destination. DisplayName string `json:"display_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateNotificationDestinationRequest) UnmarshalJSON(b []byte) error { @@ -492,7 +492,7 @@ type CreateOboTokenRequest struct { // The number of seconds before the token expires. LifetimeSeconds int64 `json:"lifetime_seconds,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateOboTokenRequest) UnmarshalJSON(b []byte) error { @@ -509,7 +509,7 @@ type CreateOboTokenResponse struct { // Value of the token. TokenValue string `json:"token_value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateOboTokenResponse) UnmarshalJSON(b []byte) error { @@ -573,7 +573,7 @@ type CreateTokenRequest struct { // If the lifetime is not specified, this token remains valid indefinitely. LifetimeSeconds int64 `json:"lifetime_seconds,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateTokenRequest) UnmarshalJSON(b []byte) error { @@ -590,7 +590,7 @@ type CreateTokenResponse struct { // The value of the new token. TokenValue string `json:"token_value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateTokenResponse) UnmarshalJSON(b []byte) error { @@ -609,7 +609,7 @@ type CspEnablementAccount struct { // Enforced = it cannot be overriden at workspace level. IsEnforced bool `json:"is_enforced,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CspEnablementAccount) UnmarshalJSON(b []byte) error { @@ -638,7 +638,7 @@ type CspEnablementAccountSetting struct { // instance per workspace. SettingName string `json:"setting_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CspEnablementAccountSetting) UnmarshalJSON(b []byte) error { @@ -676,7 +676,7 @@ type DefaultNamespaceSetting struct { // instance per workspace. SettingName string `json:"setting_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DefaultNamespaceSetting) UnmarshalJSON(b []byte) error { @@ -698,7 +698,7 @@ type DeleteAccountIpAccessEnableRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteAccountIpAccessEnableRequest) UnmarshalJSON(b []byte) error { @@ -738,7 +738,7 @@ type DeleteAibiDashboardEmbeddingAccessPolicySettingRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteAibiDashboardEmbeddingAccessPolicySettingRequest) UnmarshalJSON(b []byte) error { @@ -772,7 +772,7 @@ type DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest) UnmarshalJSON(b []byte) error { @@ -806,7 +806,7 @@ type DeleteDefaultNamespaceSettingRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteDefaultNamespaceSettingRequest) UnmarshalJSON(b []byte) error { @@ -840,7 +840,7 @@ type DeleteDisableLegacyAccessRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteDisableLegacyAccessRequest) UnmarshalJSON(b []byte) error { @@ -874,7 +874,7 @@ type DeleteDisableLegacyDbfsRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteDisableLegacyDbfsRequest) UnmarshalJSON(b []byte) error { @@ -908,7 +908,7 @@ type DeleteDisableLegacyFeaturesRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteDisableLegacyFeaturesRequest) UnmarshalJSON(b []byte) error { @@ -962,7 +962,7 @@ type DeletePersonalComputeSettingRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeletePersonalComputeSettingRequest) UnmarshalJSON(b []byte) error { @@ -1007,7 +1007,7 @@ type DeleteRestrictWorkspaceAdminsSettingRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteRestrictWorkspaceAdminsSettingRequest) UnmarshalJSON(b []byte) error { @@ -1086,7 +1086,7 @@ type DisableLegacyAccess struct { // instance per workspace. SettingName string `json:"setting_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DisableLegacyAccess) UnmarshalJSON(b []byte) error { @@ -1114,7 +1114,7 @@ type DisableLegacyDbfs struct { // instance per workspace. SettingName string `json:"setting_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DisableLegacyDbfs) UnmarshalJSON(b []byte) error { @@ -1142,7 +1142,7 @@ type DisableLegacyFeatures struct { // instance per workspace. SettingName string `json:"setting_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DisableLegacyFeatures) UnmarshalJSON(b []byte) error { @@ -1165,7 +1165,7 @@ type Empty struct { type EnhancedSecurityMonitoring struct { IsEnabled bool `json:"is_enabled,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EnhancedSecurityMonitoring) UnmarshalJSON(b []byte) error { @@ -1194,7 +1194,7 @@ type EnhancedSecurityMonitoringSetting struct { // instance per workspace. SettingName string `json:"setting_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EnhancedSecurityMonitoringSetting) UnmarshalJSON(b []byte) error { @@ -1209,7 +1209,7 @@ func (s EnhancedSecurityMonitoringSetting) MarshalJSON() ([]byte, error) { type EsmEnablementAccount struct { IsEnforced bool `json:"is_enforced,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EsmEnablementAccount) UnmarshalJSON(b []byte) error { @@ -1238,7 +1238,7 @@ type EsmEnablementAccountSetting struct { // instance per workspace. SettingName string `json:"setting_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EsmEnablementAccountSetting) UnmarshalJSON(b []byte) error { @@ -1263,7 +1263,7 @@ type ExchangeToken struct { // The type of this exchange token TokenType TokenType `json:"tokenType,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExchangeToken) UnmarshalJSON(b []byte) error { @@ -1309,7 +1309,7 @@ type GenericWebhookConfig struct { // [Output-Only] Whether username is set. UsernameSet bool `json:"username_set,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GenericWebhookConfig) UnmarshalJSON(b []byte) error { @@ -1331,7 +1331,7 @@ type GetAccountIpAccessEnableRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetAccountIpAccessEnableRequest) UnmarshalJSON(b []byte) error { @@ -1359,7 +1359,7 @@ type GetAibiDashboardEmbeddingAccessPolicySettingRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetAibiDashboardEmbeddingAccessPolicySettingRequest) UnmarshalJSON(b []byte) error { @@ -1381,7 +1381,7 @@ type GetAibiDashboardEmbeddingApprovedDomainsSettingRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) UnmarshalJSON(b []byte) error { @@ -1403,7 +1403,7 @@ type GetAutomaticClusterUpdateSettingRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetAutomaticClusterUpdateSettingRequest) UnmarshalJSON(b []byte) error { @@ -1425,7 +1425,7 @@ type GetComplianceSecurityProfileSettingRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetComplianceSecurityProfileSettingRequest) UnmarshalJSON(b []byte) error { @@ -1447,7 +1447,7 @@ type GetCspEnablementAccountSettingRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetCspEnablementAccountSettingRequest) UnmarshalJSON(b []byte) error { @@ -1469,7 +1469,7 @@ type GetDefaultNamespaceSettingRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetDefaultNamespaceSettingRequest) UnmarshalJSON(b []byte) error { @@ -1491,7 +1491,7 @@ type GetDisableLegacyAccessRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetDisableLegacyAccessRequest) UnmarshalJSON(b []byte) error { @@ -1513,7 +1513,7 @@ type GetDisableLegacyDbfsRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetDisableLegacyDbfsRequest) UnmarshalJSON(b []byte) error { @@ -1535,7 +1535,7 @@ type GetDisableLegacyFeaturesRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetDisableLegacyFeaturesRequest) UnmarshalJSON(b []byte) error { @@ -1557,7 +1557,7 @@ type GetEnhancedSecurityMonitoringSettingRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetEnhancedSecurityMonitoringSettingRequest) UnmarshalJSON(b []byte) error { @@ -1579,7 +1579,7 @@ type GetEsmEnablementAccountSettingRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetEsmEnablementAccountSettingRequest) UnmarshalJSON(b []byte) error { @@ -1628,7 +1628,7 @@ type GetPersonalComputeSettingRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetPersonalComputeSettingRequest) UnmarshalJSON(b []byte) error { @@ -1658,7 +1658,7 @@ type GetRestrictWorkspaceAdminsSettingRequest struct { // DELETE request to identify the rule set version you are deleting. Etag string `json:"-" url:"etag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetRestrictWorkspaceAdminsSettingRequest) UnmarshalJSON(b []byte) error { @@ -1718,7 +1718,7 @@ type IpAccessListInfo struct { // User ID of the user who updated this list. UpdatedBy int64 `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *IpAccessListInfo) UnmarshalJSON(b []byte) error { @@ -1740,7 +1740,7 @@ type ListNccAzurePrivateEndpointRulesResponse struct { // are no more results to show. NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListNccAzurePrivateEndpointRulesResponse) UnmarshalJSON(b []byte) error { @@ -1756,7 +1756,7 @@ type ListNetworkConnectivityConfigurationsRequest struct { // Pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListNetworkConnectivityConfigurationsRequest) UnmarshalJSON(b []byte) error { @@ -1773,7 +1773,7 @@ type ListNetworkConnectivityConfigurationsResponse struct { // are no more results to show. NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListNetworkConnectivityConfigurationsResponse) UnmarshalJSON(b []byte) error { @@ -1790,7 +1790,7 @@ type ListNotificationDestinationsRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListNotificationDestinationsRequest) UnmarshalJSON(b []byte) error { @@ -1807,7 +1807,7 @@ type ListNotificationDestinationsResponse struct { Results []ListNotificationDestinationsResult `json:"results,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListNotificationDestinationsResponse) UnmarshalJSON(b []byte) error { @@ -1827,7 +1827,7 @@ type ListNotificationDestinationsResult struct { // UUID identifying notification destination. Id string `json:"id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListNotificationDestinationsResult) UnmarshalJSON(b []byte) error { @@ -1845,7 +1845,7 @@ type ListPrivateEndpointRulesRequest struct { // Pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListPrivateEndpointRulesRequest) UnmarshalJSON(b []byte) error { @@ -1868,7 +1868,7 @@ type ListTokenManagementRequest struct { // Username of the user that created the token. CreatedByUsername string `json:"-" url:"created_by_username,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListTokenManagementRequest) UnmarshalJSON(b []byte) error { @@ -1926,7 +1926,7 @@ type MicrosoftTeamsConfig struct { // [Output-Only] Whether URL is set. UrlSet bool `json:"url_set,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MicrosoftTeamsConfig) UnmarshalJSON(b []byte) error { @@ -1982,7 +1982,7 @@ type NccAzurePrivateEndpointRule struct { // Time in epoch milliseconds when this object was updated. UpdatedTime int64 `json:"updated_time,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *NccAzurePrivateEndpointRule) UnmarshalJSON(b []byte) error { @@ -2084,7 +2084,7 @@ type NccAzureServiceEndpointRule struct { // The Azure services to which this service endpoint rule applies to. TargetServices []string `json:"target_services,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *NccAzureServiceEndpointRule) UnmarshalJSON(b []byte) error { @@ -2149,7 +2149,7 @@ type NetworkConnectivityConfiguration struct { // Time in epoch milliseconds when this object was updated. UpdatedTime int64 `json:"updated_time,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *NetworkConnectivityConfiguration) UnmarshalJSON(b []byte) error { @@ -2173,7 +2173,7 @@ type NotificationDestination struct { // UUID identifying notification destination. Id string `json:"id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *NotificationDestination) UnmarshalJSON(b []byte) error { @@ -2190,7 +2190,7 @@ type PagerdutyConfig struct { // [Output-Only] Whether integration key is set. IntegrationKeySet bool `json:"integration_key_set,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PagerdutyConfig) UnmarshalJSON(b []byte) error { @@ -2206,7 +2206,7 @@ type PartitionId struct { // The ID of the workspace. WorkspaceId int64 `json:"workspaceId,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PartitionId) UnmarshalJSON(b []byte) error { @@ -2279,7 +2279,7 @@ type PersonalComputeSetting struct { // instance per workspace. SettingName string `json:"setting_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PersonalComputeSetting) UnmarshalJSON(b []byte) error { @@ -2301,7 +2301,7 @@ type PublicTokenInfo struct { // The ID of this token. TokenId string `json:"token_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PublicTokenInfo) UnmarshalJSON(b []byte) error { @@ -2383,7 +2383,7 @@ type RestrictWorkspaceAdminsSetting struct { // instance per workspace. SettingName string `json:"setting_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RestrictWorkspaceAdminsSetting) UnmarshalJSON(b []byte) error { @@ -2411,7 +2411,7 @@ type SlackConfig struct { // [Output-Only] Whether URL is set. UrlSet bool `json:"url_set,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SlackConfig) UnmarshalJSON(b []byte) error { @@ -2426,7 +2426,7 @@ type StringMessage struct { // Represents a generic string value. Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *StringMessage) UnmarshalJSON(b []byte) error { @@ -2447,7 +2447,7 @@ type TokenAccessControlRequest struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TokenAccessControlRequest) UnmarshalJSON(b []byte) error { @@ -2470,7 +2470,7 @@ type TokenAccessControlResponse struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TokenAccessControlResponse) UnmarshalJSON(b []byte) error { @@ -2503,7 +2503,7 @@ type TokenInfo struct { // If applicable, the ID of the workspace that the token was created in. WorkspaceId int64 `json:"workspace_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TokenInfo) UnmarshalJSON(b []byte) error { @@ -2521,7 +2521,7 @@ type TokenPermission struct { // Permission level PermissionLevel TokenPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TokenPermission) UnmarshalJSON(b []byte) error { @@ -2565,7 +2565,7 @@ type TokenPermissions struct { ObjectType string `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TokenPermissions) UnmarshalJSON(b []byte) error { @@ -2581,7 +2581,7 @@ type TokenPermissionsDescription struct { // Permission level PermissionLevel TokenPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TokenPermissionsDescription) UnmarshalJSON(b []byte) error { @@ -2905,7 +2905,7 @@ type UpdateIpAccessList struct { // excluded even if they are included in an allow list. ListType ListType `json:"list_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateIpAccessList) UnmarshalJSON(b []byte) error { @@ -2925,7 +2925,7 @@ type UpdateNotificationDestinationRequest struct { // UUID identifying notification destination. Id string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateNotificationDestinationRequest) UnmarshalJSON(b []byte) error { diff --git a/sharing/v2/api.go b/sharing/v2/api.go index 3ff151c57..0f4b6e888 100755 --- a/sharing/v2/api.go +++ b/sharing/v2/api.go @@ -75,6 +75,18 @@ type ProvidersInterface interface { // This method is generated by Databricks SDK Code Generator. ProviderInfoNameToMetastoreIdMap(ctx context.Context, request ListProvidersRequest) (map[string]string, error) + // List assets by provider share. + // + // Get arrays of assets associated with a specified provider's share. The caller + // is the recipient of the share. + ListProviderShareAssets(ctx context.Context, request ListProviderShareAssetsRequest) (*ListProviderShareAssetsResponse, error) + + // List assets by provider share. + // + // Get arrays of assets associated with a specified provider's share. The caller + // is the recipient of the share. + ListProviderShareAssetsByProviderNameAndShareName(ctx context.Context, providerName string, shareName string) (*ListProviderShareAssetsResponse, error) + // List shares by Provider. // // Gets an array of a specified provider's shares within the metastore where: @@ -170,6 +182,17 @@ func (a *ProvidersAPI) ProviderInfoNameToMetastoreIdMap(ctx context.Context, req return mapping, nil } +// List assets by provider share. +// +// Get arrays of assets associated with a specified provider's share. The caller +// is the recipient of the share. +func (a *ProvidersAPI) ListProviderShareAssetsByProviderNameAndShareName(ctx context.Context, providerName string, shareName string) (*ListProviderShareAssetsResponse, error) { + return a.providersImpl.ListProviderShareAssets(ctx, ListProviderShareAssetsRequest{ + ProviderName: providerName, + ShareName: shareName, + }) +} + // List shares by Provider. // // Gets an array of a specified provider's shares within the metastore where: @@ -444,13 +467,13 @@ type SharesInterface interface { // // Gets the permissions for a data share from the metastore. The caller must be // a metastore admin or the owner of the share. - SharePermissions(ctx context.Context, request SharePermissionsRequest) (*PermissionsList, error) + SharePermissions(ctx context.Context, request SharePermissionsRequest) (*GetSharePermissionsResponse, error) // Get permissions. // // Gets the permissions for a data share from the metastore. The caller must be // a metastore admin or the owner of the share. - SharePermissionsByName(ctx context.Context, name string) (*PermissionsList, error) + SharePermissionsByName(ctx context.Context, name string) (*GetSharePermissionsResponse, error) // Update a share. // @@ -479,9 +502,9 @@ type SharesInterface interface { // Updates the permissions for a data share in the metastore. The caller must be // a metastore admin or an owner of the share. // - // For new recipient grants, the user must also be the owner of the recipients. - // recipient revocations do not require additional privileges. - UpdatePermissions(ctx context.Context, request UpdateSharePermissions) error + // For new recipient grants, the user must also be the recipient owner or + // metastore admin. recipient revocations do not require additional privileges. + UpdatePermissions(ctx context.Context, request UpdateSharePermissions) (*UpdateSharePermissionsResponse, error) } func NewShares(client *client.DatabricksClient) *SharesAPI { @@ -525,7 +548,7 @@ func (a *SharesAPI) GetByName(ctx context.Context, name string) (*ShareInfo, err // // Gets the permissions for a data share from the metastore. The caller must be // a metastore admin or the owner of the share. -func (a *SharesAPI) SharePermissionsByName(ctx context.Context, name string) (*PermissionsList, error) { +func (a *SharesAPI) SharePermissionsByName(ctx context.Context, name string) (*GetSharePermissionsResponse, error) { return a.sharesImpl.SharePermissions(ctx, SharePermissionsRequest{ Name: name, }) diff --git a/sharing/v2/impl.go b/sharing/v2/impl.go index eda35a23f..089d044c9 100755 --- a/sharing/v2/impl.go +++ b/sharing/v2/impl.go @@ -10,7 +10,6 @@ import ( "github.com/databricks/databricks-sdk-go/databricks/client" "github.com/databricks/databricks-sdk-go/databricks/listing" "github.com/databricks/databricks-sdk-go/databricks/useragent" - "golang.org/x/exp/slices" ) // unexported type that holds implementations of just Providers API methods @@ -99,6 +98,16 @@ func (a *providersImpl) internalList(ctx context.Context, request ListProvidersR return &listProvidersResponse, err } +func (a *providersImpl) ListProviderShareAssets(ctx context.Context, request ListProviderShareAssetsRequest) (*ListProviderShareAssetsResponse, error) { + var listProviderShareAssetsResponse ListProviderShareAssetsResponse + path := fmt.Sprintf("/api/2.1/data-sharing/providers/%v/shares/%v", request.ProviderName, request.ShareName) + queryParams := make(map[string]any) + headers := make(map[string]string) + headers["Accept"] = "application/json" + err := a.client.Do(ctx, http.MethodGet, path, headers, queryParams, request, &listProviderShareAssetsResponse) + return &listProviderShareAssetsResponse, err +} + // List shares by Provider. // // Gets an array of a specified provider's shares within the metastore where: @@ -385,14 +394,14 @@ func (a *sharesImpl) internalList(ctx context.Context, request ListSharesRequest return &listSharesResponse, err } -func (a *sharesImpl) SharePermissions(ctx context.Context, request SharePermissionsRequest) (*PermissionsList, error) { - var permissionsList PermissionsList +func (a *sharesImpl) SharePermissions(ctx context.Context, request SharePermissionsRequest) (*GetSharePermissionsResponse, error) { + var getSharePermissionsResponse GetSharePermissionsResponse path := fmt.Sprintf("/api/2.1/unity-catalog/shares/%v/permissions", request.Name) queryParams := make(map[string]any) headers := make(map[string]string) headers["Accept"] = "application/json" - err := a.client.Do(ctx, http.MethodGet, path, headers, queryParams, request, &permissionsList) - return &permissionsList, err + err := a.client.Do(ctx, http.MethodGet, path, headers, queryParams, request, &getSharePermissionsResponse) + return &getSharePermissionsResponse, err } func (a *sharesImpl) Update(ctx context.Context, request UpdateShare) (*ShareInfo, error) { @@ -406,19 +415,13 @@ func (a *sharesImpl) Update(ctx context.Context, request UpdateShare) (*ShareInf return &shareInfo, err } -func (a *sharesImpl) UpdatePermissions(ctx context.Context, request UpdateSharePermissions) error { - var updatePermissionsResponse UpdatePermissionsResponse +func (a *sharesImpl) UpdatePermissions(ctx context.Context, request UpdateSharePermissions) (*UpdateSharePermissionsResponse, error) { + var updateSharePermissionsResponse UpdateSharePermissionsResponse path := fmt.Sprintf("/api/2.1/unity-catalog/shares/%v/permissions", request.Name) queryParams := make(map[string]any) - if request.MaxResults != 0 || slices.Contains(request.ForceSendFields, "MaxResults") { - queryParams["max_results"] = request.MaxResults - } - if request.PageToken != "" || slices.Contains(request.ForceSendFields, "PageToken") { - queryParams["page_token"] = request.PageToken - } headers := make(map[string]string) headers["Accept"] = "application/json" headers["Content-Type"] = "application/json" - err := a.client.Do(ctx, http.MethodPatch, path, headers, queryParams, request, &updatePermissionsResponse) - return err + err := a.client.Do(ctx, http.MethodPatch, path, headers, queryParams, request, &updateSharePermissionsResponse) + return &updateSharePermissionsResponse, err } diff --git a/sharing/v2/model.go b/sharing/v2/model.go index bce3827a2..2a34eb510 100755 --- a/sharing/v2/model.go +++ b/sharing/v2/model.go @@ -13,6 +13,8 @@ type AuthenticationType string const AuthenticationTypeDatabricks AuthenticationType = `DATABRICKS` +const AuthenticationTypeOauthClientCredentials AuthenticationType = `OAUTH_CLIENT_CREDENTIALS` + const AuthenticationTypeToken AuthenticationType = `TOKEN` // String representation for [fmt.Print] @@ -23,11 +25,11 @@ func (f *AuthenticationType) String() string { // Set raw string value and validate it against allowed values func (f *AuthenticationType) Set(v string) error { switch v { - case `DATABRICKS`, `TOKEN`: + case `DATABRICKS`, `OAUTH_CLIENT_CREDENTIALS`, `TOKEN`: *f = AuthenticationType(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "DATABRICKS", "TOKEN"`, v) + return fmt.Errorf(`value "%s" is not one of "DATABRICKS", "OAUTH_CLIENT_CREDENTIALS", "TOKEN"`, v) } } @@ -36,6 +38,75 @@ func (f *AuthenticationType) Type() string { return "AuthenticationType" } +// UC supported column types Copied from +// https://src.dev.databricks.com/databricks/universe@23a85902bb58695ab9293adc9f327b0714b55e72/-/blob/managed-catalog/api/messages/table.proto?L68 +type ColumnTypeName string + +const ColumnTypeNameArray ColumnTypeName = `ARRAY` + +const ColumnTypeNameBinary ColumnTypeName = `BINARY` + +const ColumnTypeNameBoolean ColumnTypeName = `BOOLEAN` + +const ColumnTypeNameByte ColumnTypeName = `BYTE` + +const ColumnTypeNameChar ColumnTypeName = `CHAR` + +const ColumnTypeNameDate ColumnTypeName = `DATE` + +const ColumnTypeNameDecimal ColumnTypeName = `DECIMAL` + +const ColumnTypeNameDouble ColumnTypeName = `DOUBLE` + +const ColumnTypeNameFloat ColumnTypeName = `FLOAT` + +const ColumnTypeNameInt ColumnTypeName = `INT` + +const ColumnTypeNameInterval ColumnTypeName = `INTERVAL` + +const ColumnTypeNameLong ColumnTypeName = `LONG` + +const ColumnTypeNameMap ColumnTypeName = `MAP` + +const ColumnTypeNameNull ColumnTypeName = `NULL` + +const ColumnTypeNameShort ColumnTypeName = `SHORT` + +const ColumnTypeNameString ColumnTypeName = `STRING` + +const ColumnTypeNameStruct ColumnTypeName = `STRUCT` + +const ColumnTypeNameTableType ColumnTypeName = `TABLE_TYPE` + +const ColumnTypeNameTimestamp ColumnTypeName = `TIMESTAMP` + +const ColumnTypeNameTimestampNtz ColumnTypeName = `TIMESTAMP_NTZ` + +const ColumnTypeNameUserDefinedType ColumnTypeName = `USER_DEFINED_TYPE` + +const ColumnTypeNameVariant ColumnTypeName = `VARIANT` + +// String representation for [fmt.Print] +func (f *ColumnTypeName) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *ColumnTypeName) Set(v string) error { + switch v { + case `ARRAY`, `BINARY`, `BOOLEAN`, `BYTE`, `CHAR`, `DATE`, `DECIMAL`, `DOUBLE`, `FLOAT`, `INT`, `INTERVAL`, `LONG`, `MAP`, `NULL`, `SHORT`, `STRING`, `STRUCT`, `TABLE_TYPE`, `TIMESTAMP`, `TIMESTAMP_NTZ`, `USER_DEFINED_TYPE`, `VARIANT`: + *f = ColumnTypeName(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "ARRAY", "BINARY", "BOOLEAN", "BYTE", "CHAR", "DATE", "DECIMAL", "DOUBLE", "FLOAT", "INT", "INTERVAL", "LONG", "MAP", "NULL", "SHORT", "STRING", "STRUCT", "TABLE_TYPE", "TIMESTAMP", "TIMESTAMP_NTZ", "USER_DEFINED_TYPE", "VARIANT"`, v) + } +} + +// Type always returns ColumnTypeName to satisfy [pflag.Value] interface +func (f *ColumnTypeName) Type() string { + return "ColumnTypeName" +} + type CreateProvider struct { // The delta sharing authentication type. AuthenticationType AuthenticationType `json:"authentication_type"` @@ -47,7 +118,7 @@ type CreateProvider struct { // **OAUTH_CLIENT_CREDENTIALS** or not provided. RecipientProfileStr string `json:"recipient_profile_str,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateProvider) UnmarshalJSON(b []byte) error { @@ -85,7 +156,7 @@ type CreateRecipient struct { // only present when the __authentication_type__ is **DATABRICKS**. SharingCode string `json:"sharing_code,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateRecipient) UnmarshalJSON(b []byte) error { @@ -104,7 +175,7 @@ type CreateShare struct { // Storage root URL for the share. StorageRoot string `json:"storage_root,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateShare) UnmarshalJSON(b []byte) error { @@ -136,6 +207,199 @@ type DeleteShareRequest struct { Name string `json:"-" url:"-"` } +// Represents a UC dependency. +type DeltaSharingDependency struct { + // A Function in UC as a dependency. + Function *DeltaSharingFunctionDependency `json:"function,omitempty"` + // A Table in UC as a dependency. + Table *DeltaSharingTableDependency `json:"table,omitempty"` +} + +// Represents a list of dependencies. +type DeltaSharingDependencyList struct { + // An array of Dependency. + Dependencies []DeltaSharingDependency `json:"dependencies,omitempty"` +} + +// A Function in UC as a dependency. +type DeltaSharingFunctionDependency struct { + FunctionName string `json:"function_name,omitempty"` + + SchemaName string `json:"schema_name,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *DeltaSharingFunctionDependency) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s DeltaSharingFunctionDependency) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +// A Table in UC as a dependency. +type DeltaSharingTableDependency struct { + SchemaName string `json:"schema_name,omitempty"` + + TableName string `json:"table_name,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *DeltaSharingTableDependency) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s DeltaSharingTableDependency) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type Function struct { + // The aliass of registered model. + Aliases []RegisteredModelAlias `json:"aliases,omitempty"` + // The comment of the function. + Comment string `json:"comment,omitempty"` + // The data type of the function. + DataType ColumnTypeName `json:"data_type,omitempty"` + // The dependency list of the function. + DependencyList *DeltaSharingDependencyList `json:"dependency_list,omitempty"` + // The full data type of the function. + FullDataType string `json:"full_data_type,omitempty"` + // The id of the function. + Id string `json:"id,omitempty"` + // The function parameter information. + InputParams *FunctionParameterInfos `json:"input_params,omitempty"` + // The name of the function. + Name string `json:"name,omitempty"` + // The properties of the function. + Properties string `json:"properties,omitempty"` + // The routine definition of the function. + RoutineDefinition string `json:"routine_definition,omitempty"` + // The name of the schema that the function belongs to. + Schema string `json:"schema,omitempty"` + // The securable kind of the function. + SecurableKind SharedSecurableKind `json:"securable_kind,omitempty"` + // The name of the share that the function belongs to. + Share string `json:"share,omitempty"` + // The id of the share that the function belongs to. + ShareId string `json:"share_id,omitempty"` + // The storage location of the function. + StorageLocation string `json:"storage_location,omitempty"` + // The tags of the function. + Tags []TagKeyValue `json:"tags,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *Function) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s Function) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +// Represents a parameter of a function. The same message is used for both input +// and output columns. +type FunctionParameterInfo struct { + // The comment of the parameter. + Comment string `json:"comment,omitempty"` + // The name of the parameter. + Name string `json:"name,omitempty"` + // The default value of the parameter. + ParameterDefault string `json:"parameter_default,omitempty"` + // The mode of the function parameter. + ParameterMode FunctionParameterMode `json:"parameter_mode,omitempty"` + // The type of the function parameter. + ParameterType FunctionParameterType `json:"parameter_type,omitempty"` + // The position of the parameter. + Position int `json:"position,omitempty"` + // The interval type of the parameter type. + TypeIntervalType string `json:"type_interval_type,omitempty"` + // The type of the parameter in JSON format. + TypeJson string `json:"type_json,omitempty"` + // The type of the parameter in Enum format. + TypeName ColumnTypeName `json:"type_name,omitempty"` + // The precision of the parameter type. + TypePrecision int `json:"type_precision,omitempty"` + // The scale of the parameter type. + TypeScale int `json:"type_scale,omitempty"` + // The type of the parameter in text format. + TypeText string `json:"type_text,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *FunctionParameterInfo) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s FunctionParameterInfo) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type FunctionParameterInfos struct { + // The list of parameters of the function. + Parameters []FunctionParameterInfo `json:"parameters,omitempty"` +} + +type FunctionParameterMode string + +const FunctionParameterModeIn FunctionParameterMode = `IN` + +const FunctionParameterModeInout FunctionParameterMode = `INOUT` + +const FunctionParameterModeOut FunctionParameterMode = `OUT` + +// String representation for [fmt.Print] +func (f *FunctionParameterMode) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *FunctionParameterMode) Set(v string) error { + switch v { + case `IN`, `INOUT`, `OUT`: + *f = FunctionParameterMode(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "IN", "INOUT", "OUT"`, v) + } +} + +// Type always returns FunctionParameterMode to satisfy [pflag.Value] interface +func (f *FunctionParameterMode) Type() string { + return "FunctionParameterMode" +} + +type FunctionParameterType string + +const FunctionParameterTypeColumn FunctionParameterType = `COLUMN` + +const FunctionParameterTypeParam FunctionParameterType = `PARAM` + +// String representation for [fmt.Print] +func (f *FunctionParameterType) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *FunctionParameterType) Set(v string) error { + switch v { + case `COLUMN`, `PARAM`: + *f = FunctionParameterType(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "COLUMN", "PARAM"`, v) + } +} + +// Type always returns FunctionParameterType to satisfy [pflag.Value] interface +func (f *FunctionParameterType) Type() string { + return "FunctionParameterType" +} + // Get a share activation URL type GetActivationUrlInfoRequest struct { // The one time activation url. It also accepts activation token. @@ -165,7 +429,7 @@ type GetRecipientSharePermissionsResponse struct { // An array of data share permissions for a recipient. PermissionsOut []ShareToPrivilegeAssignment `json:"permissions_out,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetRecipientSharePermissionsResponse) UnmarshalJSON(b []byte) error { @@ -176,6 +440,25 @@ func (s GetRecipientSharePermissionsResponse) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +type GetSharePermissionsResponse struct { + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken string `json:"next_page_token,omitempty"` + // The privileges assigned to each principal + PrivilegeAssignments []PrivilegeAssignment `json:"privilege_assignments,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *GetSharePermissionsResponse) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s GetSharePermissionsResponse) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + // Get a share type GetShareRequest struct { // Query for data to include in the share. @@ -183,7 +466,7 @@ type GetShareRequest struct { // The name of the share. Name string `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetShareRequest) UnmarshalJSON(b []byte) error { @@ -199,6 +482,45 @@ type IpAccessList struct { AllowedIpAddresses []string `json:"allowed_ip_addresses,omitempty"` } +// List assets by provider share +type ListProviderShareAssetsRequest struct { + // Maximum number of functions to return. + FunctionMaxResults int `json:"-" url:"function_max_results,omitempty"` + // Maximum number of notebooks to return. + NotebookMaxResults int `json:"-" url:"notebook_max_results,omitempty"` + // The name of the provider who owns the share. + ProviderName string `json:"-" url:"-"` + // The name of the share. + ShareName string `json:"-" url:"-"` + // Maximum number of tables to return. + TableMaxResults int `json:"-" url:"table_max_results,omitempty"` + // Maximum number of volumes to return. + VolumeMaxResults int `json:"-" url:"volume_max_results,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *ListProviderShareAssetsRequest) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s ListProviderShareAssetsRequest) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +// Response to ListProviderShareAssets, which contains the list of assets of a +// share. +type ListProviderShareAssetsResponse struct { + // The list of functions in the share. + Functions []Function `json:"functions,omitempty"` + // The list of notebooks in the share. + Notebooks []NotebookFile `json:"notebooks,omitempty"` + // The list of tables in the share. + Tables []Table `json:"tables,omitempty"` + // The list of volumes in the share. + Volumes []Volume `json:"volumes,omitempty"` +} + type ListProviderSharesResponse struct { // Opaque token to retrieve the next page of results. Absent if there are no // more pages. __page_token__ should be set to this value for the next @@ -207,7 +529,7 @@ type ListProviderSharesResponse struct { // An array of provider shares. Shares []ProviderShare `json:"shares,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListProviderSharesResponse) UnmarshalJSON(b []byte) error { @@ -236,7 +558,7 @@ type ListProvidersRequest struct { // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListProvidersRequest) UnmarshalJSON(b []byte) error { @@ -255,7 +577,7 @@ type ListProvidersResponse struct { // An array of provider information objects. Providers []ProviderInfo `json:"providers,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListProvidersResponse) UnmarshalJSON(b []byte) error { @@ -284,7 +606,7 @@ type ListRecipientsRequest struct { // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListRecipientsRequest) UnmarshalJSON(b []byte) error { @@ -303,7 +625,7 @@ type ListRecipientsResponse struct { // An array of recipient information objects. Recipients []RecipientInfo `json:"recipients,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListRecipientsResponse) UnmarshalJSON(b []byte) error { @@ -331,7 +653,7 @@ type ListSharesRequest struct { // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListSharesRequest) UnmarshalJSON(b []byte) error { @@ -350,7 +672,7 @@ type ListSharesResponse struct { // An array of data share information objects. Shares []ShareInfo `json:"shares,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListSharesResponse) UnmarshalJSON(b []byte) error { @@ -361,6 +683,31 @@ func (s ListSharesResponse) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +type NotebookFile struct { + // The comment of the notebook file. + Comment string `json:"comment,omitempty"` + // The id of the notebook file. + Id string `json:"id,omitempty"` + // Name of the notebook file. + Name string `json:"name,omitempty"` + // The name of the share that the notebook file belongs to. + Share string `json:"share,omitempty"` + // The id of the share that the notebook file belongs to. + ShareId string `json:"share_id,omitempty"` + // The tags of the notebook file. + Tags []TagKeyValue `json:"tags,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *NotebookFile) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s NotebookFile) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + type Partition struct { // An array of partition values. Values []PartitionValue `json:"values,omitempty"` @@ -380,7 +727,7 @@ type PartitionValue struct { // not be set. Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PartitionValue) UnmarshalJSON(b []byte) error { @@ -420,13 +767,13 @@ func (f *PartitionValueOp) Type() string { type PermissionsChange struct { // The set of privileges to add. - Add []Privilege `json:"add,omitempty"` + Add []string `json:"add,omitempty"` // The principal whose privileges we are changing. Principal string `json:"principal,omitempty"` // The set of privileges to remove. - Remove []Privilege `json:"remove,omitempty"` + Remove []string `json:"remove,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PermissionsChange) UnmarshalJSON(b []byte) error { @@ -437,11 +784,6 @@ func (s PermissionsChange) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -type PermissionsList struct { - // The privileges assigned to each principal - PrivilegeAssignments []PrivilegeAssignment `json:"privilege_assignments,omitempty"` -} - type Privilege string const PrivilegeAccess Privilege = `ACCESS` @@ -561,7 +903,7 @@ type PrivilegeAssignment struct { // The privileges assigned to the principal. Privileges []Privilege `json:"privileges,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PrivilegeAssignment) UnmarshalJSON(b []byte) error { @@ -609,7 +951,7 @@ type ProviderInfo struct { // Username of user who last modified Provider. UpdatedBy string `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ProviderInfo) UnmarshalJSON(b []byte) error { @@ -624,7 +966,7 @@ type ProviderShare struct { // The name of the Provider Share. Name string `json:"name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ProviderShare) UnmarshalJSON(b []byte) error { @@ -687,7 +1029,7 @@ type RecipientInfo struct { // Username of recipient updater. UpdatedBy string `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RecipientInfo) UnmarshalJSON(b []byte) error { @@ -706,7 +1048,7 @@ type RecipientProfile struct { // The version number of the recipient's credentials on a share. ShareCredentialsVersion int `json:"share_credentials_version,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RecipientProfile) UnmarshalJSON(b []byte) error { @@ -734,7 +1076,7 @@ type RecipientTokenInfo struct { // Username of recipient token updater. UpdatedBy string `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RecipientTokenInfo) UnmarshalJSON(b []byte) error { @@ -745,6 +1087,23 @@ func (s RecipientTokenInfo) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +type RegisteredModelAlias struct { + // Name of the alias. + AliasName string `json:"alias_name,omitempty"` + // Numeric model version that alias will reference. + VersionNum int64 `json:"version_num,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *RegisteredModelAlias) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s RegisteredModelAlias) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + // Get an access token type RetrieveTokenRequest struct { // The one time activation url. It also accepts activation token. @@ -761,7 +1120,7 @@ type RetrieveTokenResponse struct { // These field names must follow the delta sharing protocol. ShareCredentialsVersion int `json:"shareCredentialsVersion,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RetrieveTokenResponse) UnmarshalJSON(b []byte) error { @@ -811,7 +1170,7 @@ type ShareInfo struct { // Username of share updater. UpdatedBy string `json:"updated_by,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ShareInfo) UnmarshalJSON(b []byte) error { @@ -839,7 +1198,7 @@ type SharePermissionsRequest struct { // Opaque pagination token to go to next page based on previous query. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SharePermissionsRequest) UnmarshalJSON(b []byte) error { @@ -856,7 +1215,7 @@ type ShareToPrivilegeAssignment struct { // The share name. ShareName string `json:"share_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ShareToPrivilegeAssignment) UnmarshalJSON(b []byte) error { @@ -876,7 +1235,6 @@ type SharedDataObject struct { // Whether to enable cdf or indicate if cdf is enabled on the shared object. CdfEnabled bool `json:"cdf_enabled,omitempty"` // A user-provided comment when adding the data object to the share. - // [Update:OPT] Comment string `json:"comment,omitempty"` // The content of the notebook file when the data object type is // NOTEBOOK_FILE. This should be base64 encoded. Required for adding a @@ -887,10 +1245,9 @@ type SharedDataObject struct { // Whether to enable or disable sharing of data history. If not specified, // the default is **DISABLED**. HistoryDataSharingStatus SharedDataObjectHistoryDataSharingStatus `json:"history_data_sharing_status,omitempty"` - // A fully qualified name that uniquely identifies a data object. - // - // For example, a table's fully qualified name is in the format of - // `..`. + // A fully qualified name that uniquely identifies a data object. For + // example, a table's fully qualified name is in the format of + // `..
`, Name string `json:"name"` // Array of partitions for the shared data. Partitions []Partition `json:"partitions,omitempty"` @@ -909,14 +1266,14 @@ type SharedDataObject struct { StartVersion int64 `json:"start_version,omitempty"` // One of: **ACTIVE**, **PERMISSION_DENIED**. Status SharedDataObjectStatus `json:"status,omitempty"` - // A user-provided new name for the data object within the share. If this - // new name is not provided, the object's original name will be used as the - // `string_shared_as` name. The `string_shared_as` name must be unique - // within a share. For notebooks, the new name should be the new notebook - // file name. + // A user-provided new name for the shared object within the share. If this + // new name is not not provided, the object's original name will be used as + // the `string_shared_as` name. The `string_shared_as` name must be unique + // for objects of the same type within a Share. For notebooks, the new name + // should be the new notebook file name. StringSharedAs string `json:"string_shared_as,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SharedDataObject) UnmarshalJSON(b []byte) error { @@ -927,7 +1284,6 @@ func (s SharedDataObject) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -// The type of the data object. type SharedDataObjectDataObjectType string const SharedDataObjectDataObjectTypeFeatureSpec SharedDataObjectDataObjectType = `FEATURE_SPEC` @@ -969,8 +1325,6 @@ func (f *SharedDataObjectDataObjectType) Type() string { return "SharedDataObjectDataObjectType" } -// Whether to enable or disable sharing of data history. If not specified, the -// default is **DISABLED**. type SharedDataObjectHistoryDataSharingStatus string const SharedDataObjectHistoryDataSharingStatusDisabled SharedDataObjectHistoryDataSharingStatus = `DISABLED` @@ -998,7 +1352,6 @@ func (f *SharedDataObjectHistoryDataSharingStatus) Type() string { return "SharedDataObjectHistoryDataSharingStatus" } -// One of: **ACTIVE**, **PERMISSION_DENIED**. type SharedDataObjectStatus string const SharedDataObjectStatusActive SharedDataObjectStatus = `ACTIVE` @@ -1033,7 +1386,6 @@ type SharedDataObjectUpdate struct { DataObject *SharedDataObject `json:"data_object,omitempty"` } -// One of: **ADD**, **REMOVE**, **UPDATE**. type SharedDataObjectUpdateAction string const SharedDataObjectUpdateActionAdd SharedDataObjectUpdateAction = `ADD` @@ -1063,7 +1415,149 @@ func (f *SharedDataObjectUpdateAction) Type() string { return "SharedDataObjectUpdateAction" } -type UpdatePermissionsResponse struct { +// The SecurableKind of a delta-shared object. +type SharedSecurableKind string + +const SharedSecurableKindFunctionFeatureSpec SharedSecurableKind = `FUNCTION_FEATURE_SPEC` + +const SharedSecurableKindFunctionRegisteredModel SharedSecurableKind = `FUNCTION_REGISTERED_MODEL` + +const SharedSecurableKindFunctionStandard SharedSecurableKind = `FUNCTION_STANDARD` + +// String representation for [fmt.Print] +func (f *SharedSecurableKind) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *SharedSecurableKind) Set(v string) error { + switch v { + case `FUNCTION_FEATURE_SPEC`, `FUNCTION_REGISTERED_MODEL`, `FUNCTION_STANDARD`: + *f = SharedSecurableKind(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "FUNCTION_FEATURE_SPEC", "FUNCTION_REGISTERED_MODEL", "FUNCTION_STANDARD"`, v) + } +} + +// Type always returns SharedSecurableKind to satisfy [pflag.Value] interface +func (f *SharedSecurableKind) Type() string { + return "SharedSecurableKind" +} + +type Table struct { + // The comment of the table. + Comment string `json:"comment,omitempty"` + // The id of the table. + Id string `json:"id,omitempty"` + // Internal information for D2D sharing that should not be disclosed to + // external users. + InternalAttributes *TableInternalAttributes `json:"internal_attributes,omitempty"` + // The name of a materialized table. + MaterializedTableName string `json:"materialized_table_name,omitempty"` + // The name of the table. + Name string `json:"name,omitempty"` + // The name of the schema that the table belongs to. + Schema string `json:"schema,omitempty"` + // The name of the share that the table belongs to. + Share string `json:"share,omitempty"` + // The id of the share that the table belongs to. + ShareId string `json:"share_id,omitempty"` + // The Tags of the table. + Tags []TagKeyValue `json:"tags,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *Table) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s Table) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +// Internal information for D2D sharing that should not be disclosed to external +// users. +type TableInternalAttributes struct { + // Will be populated in the reconciliation response for VIEW and + // FOREIGN_TABLE, with the value of the parent UC entity's storage_location, + // following the same logic as getManagedEntityPath in + // CreateStagingTableHandler, which is used to store the materialized table + // for a shared VIEW/FOREIGN_TABLE for D2O queries. The value will be used + // on the recipient side to be whitelisted when SEG is enabled on the + // workspace of the recipient, to allow the recipient users to query this + // shared VIEW/FOREIGN_TABLE. + ParentStorageLocation string `json:"parent_storage_location,omitempty"` + // The cloud storage location of a shard table with DIRECTORY_BASED_TABLE + // type. + StorageLocation string `json:"storage_location,omitempty"` + // The type of the shared table. + Type TableInternalAttributesSharedTableType `json:"type,omitempty"` + // The view definition of a shared view. DEPRECATED. + ViewDefinition string `json:"view_definition,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *TableInternalAttributes) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s TableInternalAttributes) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type TableInternalAttributesSharedTableType string + +const TableInternalAttributesSharedTableTypeDirectoryBasedTable TableInternalAttributesSharedTableType = `DIRECTORY_BASED_TABLE` + +const TableInternalAttributesSharedTableTypeFileBasedTable TableInternalAttributesSharedTableType = `FILE_BASED_TABLE` + +const TableInternalAttributesSharedTableTypeForeignTable TableInternalAttributesSharedTableType = `FOREIGN_TABLE` + +const TableInternalAttributesSharedTableTypeMaterializedView TableInternalAttributesSharedTableType = `MATERIALIZED_VIEW` + +const TableInternalAttributesSharedTableTypeStreamingTable TableInternalAttributesSharedTableType = `STREAMING_TABLE` + +const TableInternalAttributesSharedTableTypeView TableInternalAttributesSharedTableType = `VIEW` + +// String representation for [fmt.Print] +func (f *TableInternalAttributesSharedTableType) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *TableInternalAttributesSharedTableType) Set(v string) error { + switch v { + case `DIRECTORY_BASED_TABLE`, `FILE_BASED_TABLE`, `FOREIGN_TABLE`, `MATERIALIZED_VIEW`, `STREAMING_TABLE`, `VIEW`: + *f = TableInternalAttributesSharedTableType(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "DIRECTORY_BASED_TABLE", "FILE_BASED_TABLE", "FOREIGN_TABLE", "MATERIALIZED_VIEW", "STREAMING_TABLE", "VIEW"`, v) + } +} + +// Type always returns TableInternalAttributesSharedTableType to satisfy [pflag.Value] interface +func (f *TableInternalAttributesSharedTableType) Type() string { + return "TableInternalAttributesSharedTableType" +} + +type TagKeyValue struct { + // name of the tag + Key string `json:"key,omitempty"` + // value of the tag associated with the key, could be optional + Value string `json:"value,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *TagKeyValue) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s TagKeyValue) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) } type UpdateProvider struct { @@ -1079,7 +1573,7 @@ type UpdateProvider struct { // **OAUTH_CLIENT_CREDENTIALS** or not provided. RecipientProfileStr string `json:"recipient_profile_str,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateProvider) UnmarshalJSON(b []byte) error { @@ -1109,7 +1603,7 @@ type UpdateRecipient struct { // read-modify-write. PropertiesKvpairs *SecurablePropertiesKvPairs `json:"properties_kvpairs,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateRecipient) UnmarshalJSON(b []byte) error { @@ -1134,7 +1628,7 @@ type UpdateShare struct { // Array of shared data object updates. Updates []SharedDataObjectUpdate `json:"updates,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateShare) UnmarshalJSON(b []byte) error { @@ -1148,28 +1642,62 @@ func (s UpdateShare) MarshalJSON() ([]byte, error) { type UpdateSharePermissions struct { // Array of permission changes. Changes []PermissionsChange `json:"changes,omitempty"` - // Maximum number of permissions to return. - when set to 0, the page length - // is set to a server configured value (recommended); - when set to a value - // greater than 0, the page length is the minimum of this value and a server - // configured value; - when set to a value less than 0, an invalid parameter - // error is returned; - If not set, all valid permissions are returned (not - // recommended). - Note: The number of returned permissions might be less - // than the specified max_results size, even zero. The only definitive - // indication that no further permissions can be fetched is when the - // next_page_token is unset from the response. - MaxResults int `json:"-" url:"max_results,omitempty"` // The name of the share. Name string `json:"-" url:"-"` - // Opaque pagination token to go to next page based on previous query. - PageToken string `json:"-" url:"page_token,omitempty"` +} + +type UpdateSharePermissionsResponse struct { + // The privileges assigned to each principal + PrivilegeAssignments []PrivilegeAssignment `json:"privilege_assignments,omitempty"` +} + +type Volume struct { + // The comment of the volume. + Comment string `json:"comment,omitempty"` + // This id maps to the shared_volume_id in database Recipient needs + // shared_volume_id for recon to check if this volume is already in + // recipient's DB or not. + Id string `json:"id,omitempty"` + // Internal attributes for D2D sharing that should not be disclosed to + // external users. + InternalAttributes *VolumeInternalAttributes `json:"internal_attributes,omitempty"` + // The name of the volume. + Name string `json:"name,omitempty"` + // The name of the schema that the volume belongs to. + Schema string `json:"schema,omitempty"` + // The name of the share that the volume belongs to. + Share string `json:"share,omitempty"` + // / The id of the share that the volume belongs to. + ShareId string `json:"share_id,omitempty"` + // The tags of the volume. + Tags []TagKeyValue `json:"tags,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *Volume) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s Volume) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +// Internal information for D2D sharing that should not be disclosed to external +// users. +type VolumeInternalAttributes struct { + // The cloud storage location of the volume + StorageLocation string `json:"storage_location,omitempty"` + // The type of the shared volume. + Type string `json:"type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } -func (s *UpdateSharePermissions) UnmarshalJSON(b []byte) error { +func (s *VolumeInternalAttributes) UnmarshalJSON(b []byte) error { return marshal.Unmarshal(b, s) } -func (s UpdateSharePermissions) MarshalJSON() ([]byte, error) { +func (s VolumeInternalAttributes) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } diff --git a/sql/v2/model.go b/sql/v2/model.go index 348f92b6a..670006f72 100755 --- a/sql/v2/model.go +++ b/sql/v2/model.go @@ -16,7 +16,7 @@ type AccessControl struct { UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AccessControl) UnmarshalJSON(b []byte) error { @@ -72,7 +72,7 @@ type Alert struct { // The timestamp indicating when the alert was updated. UpdateTime string `json:"update_time,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Alert) UnmarshalJSON(b []byte) error { @@ -106,7 +106,7 @@ type AlertConditionThreshold struct { type AlertOperandColumn struct { Name string `json:"name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AlertOperandColumn) UnmarshalJSON(b []byte) error { @@ -124,7 +124,7 @@ type AlertOperandValue struct { StringValue string `json:"string_value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AlertOperandValue) UnmarshalJSON(b []byte) error { @@ -199,7 +199,7 @@ type AlertOptions struct { // strings (eg. 'foobar'), floats (eg. 123.4), and booleans (true). Value any `json:"value"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AlertOptions) UnmarshalJSON(b []byte) error { @@ -281,7 +281,7 @@ type AlertQuery struct { // The ID of the user who owns the query. UserId int `json:"user_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *AlertQuery) UnmarshalJSON(b []byte) error { @@ -335,7 +335,7 @@ type BaseChunkInfo struct { // The starting row offset within the result set. RowOffset int64 `json:"row_offset,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *BaseChunkInfo) UnmarshalJSON(b []byte) error { @@ -363,7 +363,7 @@ type Channel struct { Name ChannelName `json:"name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Channel) UnmarshalJSON(b []byte) error { @@ -381,7 +381,7 @@ type ChannelInfo struct { // Name of the channel Name ChannelName `json:"name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ChannelInfo) UnmarshalJSON(b []byte) error { @@ -444,7 +444,7 @@ type ClientConfig struct { HidePlotlyModeBar bool `json:"hide_plotly_mode_bar,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ClientConfig) UnmarshalJSON(b []byte) error { @@ -474,7 +474,7 @@ type ColumnInfo struct { // The full SQL type specification. TypeText string `json:"type_text,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ColumnInfo) UnmarshalJSON(b []byte) error { @@ -562,7 +562,7 @@ type CreateAlert struct { // again. Rearm int `json:"rearm,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateAlert) UnmarshalJSON(b []byte) error { @@ -604,7 +604,7 @@ type CreateAlertRequestAlert struct { // the alert will not be triggered again. SecondsToRetrigger int `json:"seconds_to_retrigger,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateAlertRequestAlert) UnmarshalJSON(b []byte) error { @@ -645,7 +645,7 @@ type CreateQueryRequestQuery struct { // ID of the SQL warehouse attached to the query. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateQueryRequestQuery) UnmarshalJSON(b []byte) error { @@ -673,7 +673,7 @@ type CreateQueryVisualizationsLegacyRequest struct { // The type of visualization: chart, table, pivot table, and so on. Type string `json:"type"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateQueryVisualizationsLegacyRequest) UnmarshalJSON(b []byte) error { @@ -704,7 +704,7 @@ type CreateVisualizationRequestVisualization struct { // The type of visualization: counter, table, funnel, and so on. Type string `json:"type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateVisualizationRequestVisualization) UnmarshalJSON(b []byte) error { @@ -778,7 +778,7 @@ type CreateWarehouseRequest struct { // `enable_serverless_compute` to `true`. WarehouseType CreateWarehouseRequestWarehouseType `json:"warehouse_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateWarehouseRequest) UnmarshalJSON(b []byte) error { @@ -825,7 +825,7 @@ type CreateWarehouseResponse struct { // Id for the SQL warehouse. This value is unique across all SQL warehouses. Id string `json:"id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateWarehouseResponse) UnmarshalJSON(b []byte) error { @@ -852,7 +852,7 @@ type CreateWidget struct { // Width of a widget Width int `json:"width"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateWidget) UnmarshalJSON(b []byte) error { @@ -911,7 +911,7 @@ type Dashboard struct { Widgets []Widget `json:"widgets,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Dashboard) UnmarshalJSON(b []byte) error { @@ -934,7 +934,7 @@ type DashboardEditContent struct { Tags []string `json:"tags,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DashboardEditContent) UnmarshalJSON(b []byte) error { @@ -951,7 +951,7 @@ type DashboardOptions struct { // thirty days. MovedToTrashAt string `json:"moved_to_trash_at,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DashboardOptions) UnmarshalJSON(b []byte) error { @@ -980,7 +980,7 @@ type DashboardPostContent struct { Tags []string `json:"tags,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DashboardPostContent) UnmarshalJSON(b []byte) error { @@ -1018,7 +1018,7 @@ type DataSource struct { // a SQL warehouse. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DataSource) UnmarshalJSON(b []byte) error { @@ -1075,7 +1075,7 @@ type DateRangeValue struct { StartDayOfWeek int `json:"start_day_of_week,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DateRangeValue) UnmarshalJSON(b []byte) error { @@ -1152,7 +1152,7 @@ type DateValue struct { // Defaults to DAY_PRECISION (YYYY-MM-DD). Precision DatePrecision `json:"precision,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DateValue) UnmarshalJSON(b []byte) error { @@ -1274,7 +1274,7 @@ type EditAlert struct { // again. Rearm int `json:"rearm,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EditAlert) UnmarshalJSON(b []byte) error { @@ -1348,7 +1348,7 @@ type EditWarehouseRequest struct { // `enable_serverless_compute` to `true`. WarehouseType EditWarehouseRequestWarehouseType `json:"warehouse_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EditWarehouseRequest) UnmarshalJSON(b []byte) error { @@ -1404,7 +1404,7 @@ type EndpointConfPair struct { Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EndpointConfPair) UnmarshalJSON(b []byte) error { @@ -1429,7 +1429,7 @@ type EndpointHealth struct { // warehouses. Summary string `json:"summary,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EndpointHealth) UnmarshalJSON(b []byte) error { @@ -1516,7 +1516,7 @@ type EndpointInfo struct { // `enable_serverless_compute` to `true`. WarehouseType EndpointInfoWarehouseType `json:"warehouse_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EndpointInfo) UnmarshalJSON(b []byte) error { @@ -1564,7 +1564,7 @@ type EndpointTagPair struct { Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EndpointTagPair) UnmarshalJSON(b []byte) error { @@ -1587,7 +1587,7 @@ type EnumValue struct { // List of selected query parameter values. Values []string `json:"values,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EnumValue) UnmarshalJSON(b []byte) error { @@ -1723,7 +1723,7 @@ type ExecuteStatementRequest struct { // [What are SQL warehouses?]: https://docs.databricks.com/sql/admin/warehouse-type.html WarehouseId string `json:"warehouse_id"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExecuteStatementRequest) UnmarshalJSON(b []byte) error { @@ -1800,7 +1800,7 @@ type ExternalLink struct { // The starting row offset within the result set. RowOffset int64 `json:"row_offset,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExternalLink) UnmarshalJSON(b []byte) error { @@ -1880,7 +1880,7 @@ type GetResponse struct { // A singular noun object type. ObjectType ObjectType `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetResponse) UnmarshalJSON(b []byte) error { @@ -2005,7 +2005,7 @@ type GetWarehouseResponse struct { // `enable_serverless_compute` to `true`. WarehouseType GetWarehouseResponseWarehouseType `json:"warehouse_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetWarehouseResponse) UnmarshalJSON(b []byte) error { @@ -2075,7 +2075,7 @@ type GetWorkspaceWarehouseConfigResponse struct { // SQL configuration parameters SqlConfigurationParameters *RepeatedEndpointConfPairs `json:"sql_configuration_parameters,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetWorkspaceWarehouseConfigResponse) UnmarshalJSON(b []byte) error { @@ -2144,7 +2144,7 @@ type LegacyAlert struct { User *User `json:"user,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *LegacyAlert) UnmarshalJSON(b []byte) error { @@ -2257,7 +2257,7 @@ type LegacyQuery struct { Visualizations []LegacyVisualization `json:"visualizations,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *LegacyQuery) UnmarshalJSON(b []byte) error { @@ -2294,7 +2294,7 @@ type LegacyVisualization struct { UpdatedAt string `json:"updated_at,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *LegacyVisualization) UnmarshalJSON(b []byte) error { @@ -2338,7 +2338,7 @@ type ListAlertsRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAlertsRequest) UnmarshalJSON(b []byte) error { @@ -2354,7 +2354,7 @@ type ListAlertsResponse struct { Results []ListAlertsResponseAlert `json:"results,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAlertsResponse) UnmarshalJSON(b []byte) error { @@ -2408,7 +2408,7 @@ type ListAlertsResponseAlert struct { // The timestamp indicating when the alert was updated. UpdateTime string `json:"update_time,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListAlertsResponseAlert) UnmarshalJSON(b []byte) error { @@ -2430,7 +2430,7 @@ type ListDashboardsRequest struct { // Full text search term. Q string `json:"-" url:"q,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListDashboardsRequest) UnmarshalJSON(b []byte) error { @@ -2492,7 +2492,7 @@ type ListQueriesLegacyRequest struct { // Full text search term Q string `json:"-" url:"q,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListQueriesLegacyRequest) UnmarshalJSON(b []byte) error { @@ -2509,7 +2509,7 @@ type ListQueriesRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListQueriesRequest) UnmarshalJSON(b []byte) error { @@ -2528,7 +2528,7 @@ type ListQueriesResponse struct { Res []QueryInfo `json:"res,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListQueriesResponse) UnmarshalJSON(b []byte) error { @@ -2555,7 +2555,7 @@ type ListQueryHistoryRequest struct { // optional. PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListQueryHistoryRequest) UnmarshalJSON(b []byte) error { @@ -2571,7 +2571,7 @@ type ListQueryObjectsResponse struct { Results []ListQueryObjectsResponseQuery `json:"results,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListQueryObjectsResponse) UnmarshalJSON(b []byte) error { @@ -2618,7 +2618,7 @@ type ListQueryObjectsResponseQuery struct { // ID of the SQL warehouse attached to the query. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListQueryObjectsResponseQuery) UnmarshalJSON(b []byte) error { @@ -2639,7 +2639,7 @@ type ListResponse struct { // List of dashboards returned. Results []Dashboard `json:"results,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListResponse) UnmarshalJSON(b []byte) error { @@ -2658,7 +2658,7 @@ type ListVisualizationsForQueryRequest struct { PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListVisualizationsForQueryRequest) UnmarshalJSON(b []byte) error { @@ -2674,7 +2674,7 @@ type ListVisualizationsForQueryResponse struct { Results []Visualization `json:"results,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListVisualizationsForQueryResponse) UnmarshalJSON(b []byte) error { @@ -2691,7 +2691,7 @@ type ListWarehousesRequest struct { // not specified, the user from the session header is used. RunAsUserId int `json:"-" url:"run_as_user_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListWarehousesRequest) UnmarshalJSON(b []byte) error { @@ -2716,7 +2716,7 @@ type MultiValuesOptions struct { // Character that suffixes each selected parameter value. Suffix string `json:"suffix,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MultiValuesOptions) UnmarshalJSON(b []byte) error { @@ -2730,7 +2730,7 @@ func (s MultiValuesOptions) MarshalJSON() ([]byte, error) { type NumericValue struct { Value float64 `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *NumericValue) UnmarshalJSON(b []byte) error { @@ -2814,7 +2814,7 @@ type OdbcParams struct { Protocol string `json:"protocol,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *OdbcParams) UnmarshalJSON(b []byte) error { @@ -2875,7 +2875,7 @@ type Parameter struct { // The default value for this parameter. Value any `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Parameter) UnmarshalJSON(b []byte) error { @@ -3031,7 +3031,7 @@ type Query struct { // ID of the SQL warehouse attached to the query. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Query) UnmarshalJSON(b []byte) error { @@ -3050,7 +3050,7 @@ type QueryBackedValue struct { // List of selected query parameter values. Values []string `json:"values,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QueryBackedValue) UnmarshalJSON(b []byte) error { @@ -3088,7 +3088,7 @@ type QueryEditContent struct { Tags []string `json:"tags,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QueryEditContent) UnmarshalJSON(b []byte) error { @@ -3164,7 +3164,7 @@ type QueryInfo struct { // Warehouse ID. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QueryInfo) UnmarshalJSON(b []byte) error { @@ -3185,7 +3185,7 @@ type QueryList struct { // List of queries returned. Results []LegacyQuery `json:"results,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QueryList) UnmarshalJSON(b []byte) error { @@ -3256,7 +3256,7 @@ type QueryMetrics struct { // tenant, in bytes. WriteRemoteBytes int64 `json:"write_remote_bytes,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QueryMetrics) UnmarshalJSON(b []byte) error { @@ -3279,7 +3279,7 @@ type QueryOptions struct { // The name of the schema to execute this query in. Schema string `json:"schema,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QueryOptions) UnmarshalJSON(b []byte) error { @@ -3311,7 +3311,7 @@ type QueryParameter struct { // Text displayed in the user-facing parameter widget in the UI. Title string `json:"title,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QueryParameter) UnmarshalJSON(b []byte) error { @@ -3349,7 +3349,7 @@ type QueryPostContent struct { Tags []string `json:"tags,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QueryPostContent) UnmarshalJSON(b []byte) error { @@ -3513,7 +3513,7 @@ type ResultData struct { // The starting row offset within the result set. RowOffset int64 `json:"row_offset,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ResultData) UnmarshalJSON(b []byte) error { @@ -3543,7 +3543,7 @@ type ResultManifest struct { // `byte_limit`. Truncated bool `json:"truncated,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ResultManifest) UnmarshalJSON(b []byte) error { @@ -3560,7 +3560,7 @@ type ResultSchema struct { Columns []ColumnInfo `json:"columns,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ResultSchema) UnmarshalJSON(b []byte) error { @@ -3633,7 +3633,7 @@ type ServiceError struct { // A brief summary of the error condition. Message string `json:"message,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ServiceError) UnmarshalJSON(b []byte) error { @@ -3712,7 +3712,7 @@ type SetResponse struct { // A singular noun object type. ObjectType ObjectType `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SetResponse) UnmarshalJSON(b []byte) error { @@ -3750,7 +3750,7 @@ type SetWorkspaceWarehouseConfigRequest struct { // SQL configuration parameters SqlConfigurationParameters *RepeatedEndpointConfPairs `json:"sql_configuration_parameters,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SetWorkspaceWarehouseConfigRequest) UnmarshalJSON(b []byte) error { @@ -3884,7 +3884,7 @@ type StatementParameterListItem struct { // is interpreted as NULL. Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *StatementParameterListItem) UnmarshalJSON(b []byte) error { @@ -3907,7 +3907,7 @@ type StatementResponse struct { // information. Status *StatementStatus `json:"status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *StatementResponse) UnmarshalJSON(b []byte) error { @@ -4278,7 +4278,7 @@ func (f *TerminationReasonType) Type() string { type TextValue struct { Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TextValue) UnmarshalJSON(b []byte) error { @@ -4295,7 +4295,7 @@ type TimeRange struct { // The start time in milliseconds. StartTimeMs int64 `json:"start_time_ms,omitempty" url:"start_time_ms,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TimeRange) UnmarshalJSON(b []byte) error { @@ -4310,7 +4310,7 @@ type TransferOwnershipObjectId struct { // Email address for the new owner, who must exist in the workspace. NewOwner string `json:"new_owner,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TransferOwnershipObjectId) UnmarshalJSON(b []byte) error { @@ -4330,7 +4330,7 @@ type TransferOwnershipRequest struct { // The type of object on which to change ownership. ObjectType OwnableObjectType `json:"-" url:"-"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *TransferOwnershipRequest) UnmarshalJSON(b []byte) error { @@ -4397,7 +4397,7 @@ type UpdateAlertRequestAlert struct { // the alert will not be triggered again. SecondsToRetrigger int `json:"seconds_to_retrigger,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateAlertRequestAlert) UnmarshalJSON(b []byte) error { @@ -4452,7 +4452,7 @@ type UpdateQueryRequestQuery struct { // ID of the SQL warehouse attached to the query. WarehouseId string `json:"warehouse_id,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateQueryRequestQuery) UnmarshalJSON(b []byte) error { @@ -4498,7 +4498,7 @@ type UpdateVisualizationRequestVisualization struct { // The type of visualization: counter, table, funnel, and so on. Type string `json:"type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateVisualizationRequestVisualization) UnmarshalJSON(b []byte) error { @@ -4516,7 +4516,7 @@ type User struct { Name string `json:"name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *User) UnmarshalJSON(b []byte) error { @@ -4549,7 +4549,7 @@ type Visualization struct { // The timestamp indicating when the visualization was updated. UpdateTime string `json:"update_time,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Visualization) UnmarshalJSON(b []byte) error { @@ -4570,7 +4570,7 @@ type WarehouseAccessControlRequest struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *WarehouseAccessControlRequest) UnmarshalJSON(b []byte) error { @@ -4593,7 +4593,7 @@ type WarehouseAccessControlResponse struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *WarehouseAccessControlResponse) UnmarshalJSON(b []byte) error { @@ -4611,7 +4611,7 @@ type WarehousePermission struct { // Permission level PermissionLevel WarehousePermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *WarehousePermission) UnmarshalJSON(b []byte) error { @@ -4661,7 +4661,7 @@ type WarehousePermissions struct { ObjectType string `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *WarehousePermissions) UnmarshalJSON(b []byte) error { @@ -4677,7 +4677,7 @@ type WarehousePermissionsDescription struct { // Permission level PermissionLevel WarehousePermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *WarehousePermissionsDescription) UnmarshalJSON(b []byte) error { @@ -4701,7 +4701,7 @@ type WarehouseTypePair struct { // Warehouse type: `PRO` or `CLASSIC`. WarehouseType WarehouseTypePairWarehouseType `json:"warehouse_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *WarehouseTypePair) UnmarshalJSON(b []byte) error { @@ -4756,7 +4756,7 @@ type Widget struct { // Unused field. Width int `json:"width,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Widget) UnmarshalJSON(b []byte) error { @@ -4786,7 +4786,7 @@ type WidgetOptions struct { // Timestamp of the last time this object was updated. UpdatedAt string `json:"updated_at,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *WidgetOptions) UnmarshalJSON(b []byte) error { @@ -4811,7 +4811,7 @@ type WidgetPosition struct { // height of the widget measured in dashboard grid cells SizeY int `json:"sizeY,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *WidgetPosition) UnmarshalJSON(b []byte) error { diff --git a/vectorsearch/v2/model.go b/vectorsearch/v2/model.go index ae9b75f28..5efebf740 100755 --- a/vectorsearch/v2/model.go +++ b/vectorsearch/v2/model.go @@ -12,7 +12,7 @@ type ColumnInfo struct { // Name of the column. Name string `json:"name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ColumnInfo) UnmarshalJSON(b []byte) error { @@ -64,7 +64,7 @@ type DeleteDataResult struct { // Count of successfully processed rows. SuccessRowCount int64 `json:"success_row_count,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeleteDataResult) UnmarshalJSON(b []byte) error { @@ -167,7 +167,7 @@ type DeltaSyncVectorIndexSpecRequest struct { // The name of the source table. SourceTable string `json:"source_table,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeltaSyncVectorIndexSpecRequest) UnmarshalJSON(b []byte) error { @@ -200,7 +200,7 @@ type DeltaSyncVectorIndexSpecResponse struct { // The name of the source table. SourceTable string `json:"source_table,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DeltaSyncVectorIndexSpecResponse) UnmarshalJSON(b []byte) error { @@ -224,7 +224,7 @@ type DirectAccessVectorIndexSpec struct { // Supported types for vector column: `array`, `array`,`. SchemaJson string `json:"schema_json,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *DirectAccessVectorIndexSpec) UnmarshalJSON(b []byte) error { @@ -241,7 +241,7 @@ type EmbeddingSourceColumn struct { // Name of the column Name string `json:"name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EmbeddingSourceColumn) UnmarshalJSON(b []byte) error { @@ -258,7 +258,7 @@ type EmbeddingVectorColumn struct { // Name of the column Name string `json:"name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EmbeddingVectorColumn) UnmarshalJSON(b []byte) error { @@ -289,7 +289,7 @@ type EndpointInfo struct { // Number of indexes on the endpoint NumIndexes int `json:"num_indexes,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EndpointInfo) UnmarshalJSON(b []byte) error { @@ -307,7 +307,7 @@ type EndpointStatus struct { // Current state of the endpoint State EndpointStatusState `json:"state,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *EndpointStatus) UnmarshalJSON(b []byte) error { @@ -393,7 +393,7 @@ type ListEndpointResponse struct { // there are no more results to show. NextPageToken string `json:"next_page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListEndpointResponse) UnmarshalJSON(b []byte) error { @@ -409,7 +409,7 @@ type ListEndpointsRequest struct { // Token for pagination PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListEndpointsRequest) UnmarshalJSON(b []byte) error { @@ -427,7 +427,7 @@ type ListIndexesRequest struct { // Token for pagination PageToken string `json:"-" url:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListIndexesRequest) UnmarshalJSON(b []byte) error { @@ -449,7 +449,7 @@ type ListVectorIndexesResponse struct { VectorIndexes []MiniVectorIndex `json:"vector_indexes,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListVectorIndexesResponse) UnmarshalJSON(b []byte) error { @@ -467,7 +467,7 @@ type MapStringValueEntry struct { // Column value, nullable. Value *Value `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MapStringValueEntry) UnmarshalJSON(b []byte) error { @@ -496,7 +496,7 @@ type MiniVectorIndex struct { // Primary key of the index PrimaryKey string `json:"primary_key,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *MiniVectorIndex) UnmarshalJSON(b []byte) error { @@ -558,7 +558,7 @@ type QueryVectorIndexNextPageRequest struct { // `QueryVectorIndexNextPage` API. PageToken string `json:"page_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QueryVectorIndexNextPageRequest) UnmarshalJSON(b []byte) error { @@ -572,6 +572,8 @@ func (s QueryVectorIndexNextPageRequest) MarshalJSON() ([]byte, error) { type QueryVectorIndexRequest struct { // List of column names to include in the response. Columns []string `json:"columns"` + // Column names used to retrieve data to send to the reranker. + ColumnsToRerank []string `json:"columns_to_rerank,omitempty"` // JSON string representing query filters. // // Example filters: - `{"id <": 5}`: Filter for id less than 5. - `{"id >": @@ -593,7 +595,7 @@ type QueryVectorIndexRequest struct { // Threshold for the approximate nearest neighbor search. Defaults to 0.0. ScoreThreshold float64 `json:"score_threshold,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QueryVectorIndexRequest) UnmarshalJSON(b []byte) error { @@ -614,7 +616,7 @@ type QueryVectorIndexResponse struct { // Data returned in the query result. Result *ResultData `json:"result,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *QueryVectorIndexResponse) UnmarshalJSON(b []byte) error { @@ -632,7 +634,7 @@ type ResultData struct { // Number of rows in the result set. RowCount int `json:"row_count,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ResultData) UnmarshalJSON(b []byte) error { @@ -650,7 +652,7 @@ type ResultManifest struct { // Information about each column in the result set. Columns []ColumnInfo `json:"columns,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ResultManifest) UnmarshalJSON(b []byte) error { @@ -670,7 +672,7 @@ type ScanVectorIndexRequest struct { // Number of results to return. Defaults to 10. NumResults int `json:"num_results,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ScanVectorIndexRequest) UnmarshalJSON(b []byte) error { @@ -688,7 +690,7 @@ type ScanVectorIndexResponse struct { // Primary key of the last entry. LastPrimaryKey string `json:"last_primary_key,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ScanVectorIndexResponse) UnmarshalJSON(b []byte) error { @@ -720,7 +722,7 @@ type UpsertDataResult struct { // Count of successfully processed rows. SuccessRowCount int64 `json:"success_row_count,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpsertDataResult) UnmarshalJSON(b []byte) error { @@ -791,7 +793,7 @@ type Value struct { StructValue *Struct `json:"struct_value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Value) UnmarshalJSON(b []byte) error { @@ -826,7 +828,7 @@ type VectorIndex struct { Status *VectorIndexStatus `json:"status,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *VectorIndex) UnmarshalJSON(b []byte) error { @@ -847,7 +849,7 @@ type VectorIndexStatus struct { // Whether the index is ready for search Ready bool `json:"ready,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *VectorIndexStatus) UnmarshalJSON(b []byte) error { diff --git a/workspace/v2/model.go b/workspace/v2/model.go index 8c9e63633..911413691 100755 --- a/workspace/v2/model.go +++ b/workspace/v2/model.go @@ -73,7 +73,7 @@ type CreateCredentialsRequest struct { // [Learn more]: https://docs.databricks.com/repos/get-access-tokens-from-git-provider.html PersonalAccessToken string `json:"personal_access_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateCredentialsRequest) UnmarshalJSON(b []byte) error { @@ -93,7 +93,7 @@ type CreateCredentialsResponse struct { // associated with the credential. GitUsername string `json:"git_username,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateCredentialsResponse) UnmarshalJSON(b []byte) error { @@ -120,7 +120,7 @@ type CreateRepoRequest struct { // URL of the Git repository to be linked. Url string `json:"url"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateRepoRequest) UnmarshalJSON(b []byte) error { @@ -148,7 +148,7 @@ type CreateRepoResponse struct { // URL of the linked Git repository. Url string `json:"url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateRepoResponse) UnmarshalJSON(b []byte) error { @@ -171,7 +171,7 @@ type CreateScope struct { // default to `DATABRICKS` ScopeBackendType ScopeBackendType `json:"scope_backend_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CreateScope) UnmarshalJSON(b []byte) error { @@ -194,7 +194,7 @@ type CredentialInfo struct { // associated with the credential. GitUsername string `json:"git_username,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *CredentialInfo) UnmarshalJSON(b []byte) error { @@ -214,7 +214,7 @@ type Delete struct { // deleted and cannot be undone. Recursive bool `json:"recursive,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Delete) UnmarshalJSON(b []byte) error { @@ -274,6 +274,7 @@ type DeleteSecret struct { type DeleteSecretResponse struct { } +// The format for workspace import and export. type ExportFormat string const ExportFormatAuto ExportFormat = `AUTO` @@ -284,6 +285,8 @@ const ExportFormatHtml ExportFormat = `HTML` const ExportFormatJupyter ExportFormat = `JUPYTER` +const ExportFormatRaw ExportFormat = `RAW` + const ExportFormatRMarkdown ExportFormat = `R_MARKDOWN` const ExportFormatSource ExportFormat = `SOURCE` @@ -296,11 +299,11 @@ func (f *ExportFormat) String() string { // Set raw string value and validate it against allowed values func (f *ExportFormat) Set(v string) error { switch v { - case `AUTO`, `DBC`, `HTML`, `JUPYTER`, `R_MARKDOWN`, `SOURCE`: + case `AUTO`, `DBC`, `HTML`, `JUPYTER`, `RAW`, `R_MARKDOWN`, `SOURCE`: *f = ExportFormat(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "AUTO", "DBC", "HTML", "JUPYTER", "R_MARKDOWN", "SOURCE"`, v) + return fmt.Errorf(`value "%s" is not one of "AUTO", "DBC", "HTML", "JUPYTER", "RAW", "R_MARKDOWN", "SOURCE"`, v) } } @@ -331,6 +334,8 @@ type ExportRequest struct { Path string `json:"-" url:"path"` } +// The request field `direct_download` determines whether a JSON response or +// binary contents are returned by this endpoint. type ExportResponse struct { // The base64-encoded content. If the limit (10MB) is exceeded, exception // with error code **MAX_NOTEBOOK_SIZE_EXCEEDED** is thrown. @@ -338,7 +343,7 @@ type ExportResponse struct { // The file type of the exported file. FileType string `json:"file_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ExportResponse) UnmarshalJSON(b []byte) error { @@ -372,7 +377,7 @@ type GetCredentialsResponse struct { // associated with the credential. GitUsername string `json:"git_username,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetCredentialsResponse) UnmarshalJSON(b []byte) error { @@ -422,7 +427,7 @@ type GetRepoResponse struct { // URL of the linked Git repository. Url string `json:"url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetRepoResponse) UnmarshalJSON(b []byte) error { @@ -447,7 +452,7 @@ type GetSecretResponse struct { // The value of the secret in its byte representation. Value string `json:"value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *GetSecretResponse) UnmarshalJSON(b []byte) error { @@ -517,7 +522,7 @@ type Import struct { // only supported for the `DBC` and `SOURCE` formats. Path string `json:"path"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *Import) UnmarshalJSON(b []byte) error { @@ -528,39 +533,21 @@ func (s Import) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -// This specifies the format of the file to be imported. -// -// The value is case sensitive. -// -// - `AUTO`: The item is imported depending on an analysis of the item's -// extension and the header content provided in the request. If the item is -// imported as a notebook, then the item's extension is automatically removed. - -// `SOURCE`: The notebook or directory is imported as source code. - `HTML`: The -// notebook is imported as an HTML file. - `JUPYTER`: The notebook is imported -// as a Jupyter/IPython Notebook file. - `DBC`: The notebook is imported in -// Databricks archive format. Required for directories. - `R_MARKDOWN`: The -// notebook is imported from R Markdown format. +// The format for workspace import and export. type ImportFormat string -// The item is imported depending on an analysis of the item's extension and const ImportFormatAuto ImportFormat = `AUTO` -// The notebook is imported in archive format. Required for -// directories. const ImportFormatDbc ImportFormat = `DBC` -// The notebook is imported as an HTML file. const ImportFormatHtml ImportFormat = `HTML` -// The notebook is imported as a Jupyter/IPython Notebook file. const ImportFormatJupyter ImportFormat = `JUPYTER` const ImportFormatRaw ImportFormat = `RAW` -// The notebook is imported from R Markdown format. const ImportFormatRMarkdown ImportFormat = `R_MARKDOWN` -// The notebook or directory is imported as source code. const ImportFormatSource ImportFormat = `SOURCE` // String representation for [fmt.Print] @@ -587,8 +574,7 @@ func (f *ImportFormat) Type() string { type ImportResponse struct { } -// The language of the object. This value is set only if the object type is -// `NOTEBOOK`. +// The language of notebook. type Language string const LanguagePython Language = `PYTHON` @@ -647,7 +633,7 @@ type ListReposRequest struct { // `/Workspace`) Git folders (repos) from `/Workspace/Repos` will be served. PathPrefix string `json:"-" url:"path_prefix,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListReposRequest) UnmarshalJSON(b []byte) error { @@ -665,7 +651,7 @@ type ListReposResponse struct { // List of Git folders (repos). Repos []RepoInfo `json:"repos,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListReposResponse) UnmarshalJSON(b []byte) error { @@ -700,11 +686,11 @@ type ListSecretsResponse struct { // List contents type ListWorkspaceRequest struct { // UTC timestamp in milliseconds - NotebooksModifiedAfter int `json:"-" url:"notebooks_modified_after,omitempty"` + NotebooksModifiedAfter int64 `json:"-" url:"notebooks_modified_after,omitempty"` // The absolute path of the notebook or directory. Path string `json:"-" url:"path"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ListWorkspaceRequest) UnmarshalJSON(b []byte) error { @@ -725,11 +711,13 @@ type Mkdirs struct { type MkdirsResponse struct { } +// The information of the object in workspace. It will be returned by “list“ +// and “get-status“. type ObjectInfo struct { // Only applicable to files. The creation UTC timestamp. CreatedAt int64 `json:"created_at,omitempty"` // The language of the object. This value is set only if the object type is - // `NOTEBOOK`. + // ``NOTEBOOK``. Language Language `json:"language,omitempty"` // Only applicable to files, the last modified UTC timestamp. ModifiedAt int64 `json:"modified_at,omitempty"` @@ -749,7 +737,7 @@ type ObjectInfo struct { // Only applicable to files. The file size in bytes can be returned. Size int64 `json:"size,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *ObjectInfo) UnmarshalJSON(b []byte) error { @@ -761,28 +749,18 @@ func (s ObjectInfo) MarshalJSON() ([]byte, error) { } // The type of the object in workspace. -// -// - `NOTEBOOK`: document that contains runnable code, visualizations, and -// explanatory text. - `DIRECTORY`: directory - `LIBRARY`: library - `FILE`: -// file - `REPO`: repository - `DASHBOARD`: Lakeview dashboard type ObjectType string -// Lakeview dashboard const ObjectTypeDashboard ObjectType = `DASHBOARD` -// directory const ObjectTypeDirectory ObjectType = `DIRECTORY` -// file const ObjectTypeFile ObjectType = `FILE` -// library const ObjectTypeLibrary ObjectType = `LIBRARY` -// document that contains runnable code, visualizations, and explanatory text. const ObjectTypeNotebook ObjectType = `NOTEBOOK` -// repository const ObjectTypeRepo ObjectType = `REPO` // String representation for [fmt.Print] @@ -828,7 +806,7 @@ type PutSecret struct { // If specified, note that the value will be stored in UTF-8 (MB4) form. StringValue string `json:"string_value,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *PutSecret) UnmarshalJSON(b []byte) error { @@ -852,7 +830,7 @@ type RepoAccessControlRequest struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RepoAccessControlRequest) UnmarshalJSON(b []byte) error { @@ -875,7 +853,7 @@ type RepoAccessControlResponse struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RepoAccessControlResponse) UnmarshalJSON(b []byte) error { @@ -903,7 +881,7 @@ type RepoInfo struct { // URL of the remote git repository. Url string `json:"url,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RepoInfo) UnmarshalJSON(b []byte) error { @@ -921,7 +899,7 @@ type RepoPermission struct { // Permission level PermissionLevel RepoPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RepoPermission) UnmarshalJSON(b []byte) error { @@ -971,7 +949,7 @@ type RepoPermissions struct { ObjectType string `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RepoPermissions) UnmarshalJSON(b []byte) error { @@ -987,7 +965,7 @@ type RepoPermissionsDescription struct { // Permission level PermissionLevel RepoPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *RepoPermissionsDescription) UnmarshalJSON(b []byte) error { @@ -1037,7 +1015,7 @@ type SecretMetadata struct { // The last updated timestamp (in milliseconds) for the secret. LastUpdatedTimestamp int64 `json:"last_updated_timestamp,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SecretMetadata) UnmarshalJSON(b []byte) error { @@ -1056,7 +1034,7 @@ type SecretScope struct { // A unique name to identify the secret scope. Name string `json:"name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *SecretScope) UnmarshalJSON(b []byte) error { @@ -1108,7 +1086,7 @@ type UpdateCredentialsRequest struct { // [Learn more]: https://docs.databricks.com/repos/get-access-tokens-from-git-provider.html PersonalAccessToken string `json:"personal_access_token,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateCredentialsRequest) UnmarshalJSON(b []byte) error { @@ -1136,7 +1114,7 @@ type UpdateRepoRequest struct { // HEAD. Tag string `json:"tag,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *UpdateRepoRequest) UnmarshalJSON(b []byte) error { @@ -1160,7 +1138,7 @@ type WorkspaceObjectAccessControlRequest struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *WorkspaceObjectAccessControlRequest) UnmarshalJSON(b []byte) error { @@ -1183,7 +1161,7 @@ type WorkspaceObjectAccessControlResponse struct { // name of the user UserName string `json:"user_name,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *WorkspaceObjectAccessControlResponse) UnmarshalJSON(b []byte) error { @@ -1201,7 +1179,7 @@ type WorkspaceObjectPermission struct { // Permission level PermissionLevel WorkspaceObjectPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *WorkspaceObjectPermission) UnmarshalJSON(b []byte) error { @@ -1251,7 +1229,7 @@ type WorkspaceObjectPermissions struct { ObjectType string `json:"object_type,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *WorkspaceObjectPermissions) UnmarshalJSON(b []byte) error { @@ -1267,7 +1245,7 @@ type WorkspaceObjectPermissionsDescription struct { // Permission level PermissionLevel WorkspaceObjectPermissionLevel `json:"permission_level,omitempty"` - ForceSendFields []string `json:"-"` + ForceSendFields []string `json:"-" url:"-"` } func (s *WorkspaceObjectPermissionsDescription) UnmarshalJSON(b []byte) error {