diff --git a/.codegen/example.py.tmpl b/.codegen/example.py.tmpl index ea85e2f7..dba71d9b 100644 --- a/.codegen/example.py.tmpl +++ b/.codegen/example.py.tmpl @@ -43,7 +43,7 @@ import time, base64, os {{- else if eq .Type "lookup" -}} {{template "expr" .X}}.{{.Field.SnakeName}} {{- else if eq .Type "enum" -}} - {{.Package}}.{{.Entity.PascalName}}.{{.Content}}{{if eq .Content "None"}}_{{end}} + {{.Package}}.{{.Entity.PascalName}}.{{.ConstantName}} {{- else if eq .Type "variable" -}} {{if eq .SnakeName "true"}}True {{- else if eq .SnakeName "false"}}False @@ -109,4 +109,4 @@ f'/Users/{w.current_user.me().user_name}/sdk-{time.time_ns()}' {{- else -}} {{.SnakeName}}({{range $i, $x := .Args}}{{if $i}}, {{end}}{{template "expr" .}}{{end}}) {{- end -}} -{{- end}} \ No newline at end of file +{{- end}} diff --git a/.codegen/service.py.tmpl b/.codegen/service.py.tmpl index 97f561ae..5317c788 100644 --- a/.codegen/service.py.tmpl +++ b/.codegen/service.py.tmpl @@ -40,7 +40,7 @@ class {{.PascalName}}{{if eq "List" .PascalName}}Request{{end}}:{{if .Descriptio {{else if .Enum}}class {{.PascalName}}(Enum): {{if .Description}}"""{{.Comment " " 100 | trimSuffix "\"" }}"""{{end}} {{range .Enum }} - {{.ConstantName}}{{if eq .Content "None"}}_{{end}} = '{{.Content}}'{{end}}{{end}} + {{.ConstantName}} = '{{.Content}}'{{end}}{{end}} {{end}} {{- define "from_dict_type" -}} {{- if not .Entity }}None diff --git a/databricks/sdk/service/compute.py b/databricks/sdk/service/compute.py index d613e4e5..bd156d48 100755 --- a/databricks/sdk/service/compute.py +++ b/databricks/sdk/service/compute.py @@ -209,8 +209,8 @@ def from_dict(cls, d: Dict[str, any]) -> 'CloudProviderNodeInfo': class CloudProviderNodeStatus(Enum): - NOTAVAILABLEINREGION = 'NotAvailableInRegion' - NOTENABLEDONSUBSCRIPTION = 'NotEnabledOnSubscription' + NOT_AVAILABLE_IN_REGION = 'NotAvailableInRegion' + NOT_ENABLED_ON_SUBSCRIPTION = 'NotEnabledOnSubscription' @dataclass @@ -3061,8 +3061,8 @@ class TerminationReasonCode(Enum): INVALID_SPARK_IMAGE = 'INVALID_SPARK_IMAGE' IP_EXHAUSTION_FAILURE = 'IP_EXHAUSTION_FAILURE' JOB_FINISHED = 'JOB_FINISHED' - KS_AUTOSCALING_FAILURE = 'K8S_AUTOSCALING_FAILURE' - KS_DBR_CLUSTER_LAUNCH_TIMEOUT = 'K8S_DBR_CLUSTER_LAUNCH_TIMEOUT' + K8_S_AUTOSCALING_FAILURE = 'K8S_AUTOSCALING_FAILURE' + K8_S_DBR_CLUSTER_LAUNCH_TIMEOUT = 'K8S_DBR_CLUSTER_LAUNCH_TIMEOUT' METASTORE_COMPONENT_UNHEALTHY = 'METASTORE_COMPONENT_UNHEALTHY' NEPHOS_RESOURCE_MANAGEMENT = 'NEPHOS_RESOURCE_MANAGEMENT' NETWORK_CONFIGURATION_FAILURE = 'NETWORK_CONFIGURATION_FAILURE' diff --git a/databricks/sdk/service/iam.py b/databricks/sdk/service/iam.py index 5240e6d3..abd2692f 100755 --- a/databricks/sdk/service/iam.py +++ b/databricks/sdk/service/iam.py @@ -537,7 +537,7 @@ class PatchOp(Enum): class PatchSchema(Enum): - URN_IETF_PARAMS_SCIM_API_MESSAGES_PATCHOP = 'urn:ietf:params:scim:api:messages:2.0:PatchOp' + URN_IETF_PARAMS_SCIM_API_MESSAGES20_PATCH_OP = 'urn:ietf:params:scim:api:messages:2.0:PatchOp' @dataclass diff --git a/databricks/sdk/service/jobs.py b/databricks/sdk/service/jobs.py index 6b1df828..eb4a9f01 100755 --- a/databricks/sdk/service/jobs.py +++ b/databricks/sdk/service/jobs.py @@ -498,14 +498,14 @@ class GetRunRequest: class GitProvider(Enum): - AWSCODECOMMIT = 'awsCodeCommit' - AZUREDEVOPSSERVICES = 'azureDevOpsServices' - BITBUCKETCLOUD = 'bitbucketCloud' - BITBUCKETSERVER = 'bitbucketServer' - GITHUB = 'gitHub' - GITHUBENTERPRISE = 'gitHubEnterprise' - GITLAB = 'gitLab' - GITLABENTERPRISEEDITION = 'gitLabEnterpriseEdition' + AWS_CODE_COMMIT = 'awsCodeCommit' + AZURE_DEV_OPS_SERVICES = 'azureDevOpsServices' + BITBUCKET_CLOUD = 'bitbucketCloud' + BITBUCKET_SERVER = 'bitbucketServer' + GIT_HUB = 'gitHub' + GIT_HUB_ENTERPRISE = 'gitHubEnterprise' + GIT_LAB = 'gitLab' + GIT_LAB_ENTERPRISE_EDITION = 'gitLabEnterpriseEdition' @dataclass diff --git a/databricks/sdk/service/ml.py b/databricks/sdk/service/ml.py index 6774342c..45b8b4c2 100755 --- a/databricks/sdk/service/ml.py +++ b/databricks/sdk/service/ml.py @@ -555,7 +555,7 @@ class DeleteTransitionRequestRequest: class DeleteTransitionRequestStage(Enum): ARCHIVED = 'Archived' - NONE_ = 'None' + NONE = 'None' PRODUCTION = 'Production' STAGING = 'Staging' @@ -1925,7 +1925,7 @@ class Stage(Enum): """This describes an enum""" ARCHIVED = 'Archived' - NONE_ = 'None' + NONE = 'None' PRODUCTION = 'Production' STAGING = 'Staging' diff --git a/databricks/sdk/service/provisioning.py b/databricks/sdk/service/provisioning.py index c66aa98d..b911e450 100755 --- a/databricks/sdk/service/provisioning.py +++ b/databricks/sdk/service/provisioning.py @@ -432,8 +432,8 @@ class ErrorType(Enum): network ACL.""" CREDENTIALS = 'credentials' - NETWORKACL = 'networkAcl' - SECURITYGROUP = 'securityGroup' + NETWORK_ACL = 'networkAcl' + SECURITY_GROUP = 'securityGroup' SUBNET = 'subnet' VPC = 'vpc' @@ -988,7 +988,7 @@ class VpcStatus(Enum): class WarningType(Enum): """The AWS resource associated with this warning: a subnet or a security group.""" - SECURITYGROUP = 'securityGroup' + SECURITY_GROUP = 'securityGroup' SUBNET = 'subnet' diff --git a/databricks/sdk/service/sql.py b/databricks/sdk/service/sql.py index f5cf7093..be1a8fbd 100755 --- a/databricks/sdk/service/sql.py +++ b/databricks/sdk/service/sql.py @@ -2229,8 +2229,8 @@ class TerminationReasonCode(Enum): INVALID_SPARK_IMAGE = 'INVALID_SPARK_IMAGE' IP_EXHAUSTION_FAILURE = 'IP_EXHAUSTION_FAILURE' JOB_FINISHED = 'JOB_FINISHED' - KS_AUTOSCALING_FAILURE = 'K8S_AUTOSCALING_FAILURE' - KS_DBR_CLUSTER_LAUNCH_TIMEOUT = 'K8S_DBR_CLUSTER_LAUNCH_TIMEOUT' + K8_S_AUTOSCALING_FAILURE = 'K8S_AUTOSCALING_FAILURE' + K8_S_DBR_CLUSTER_LAUNCH_TIMEOUT = 'K8S_DBR_CLUSTER_LAUNCH_TIMEOUT' METASTORE_COMPONENT_UNHEALTHY = 'METASTORE_COMPONENT_UNHEALTHY' NEPHOS_RESOURCE_MANAGEMENT = 'NEPHOS_RESOURCE_MANAGEMENT' NETWORK_CONFIGURATION_FAILURE = 'NETWORK_CONFIGURATION_FAILURE' diff --git a/examples/clusters/ensure_cluster_is_running_commands_direct_usage.py b/examples/clusters/ensure_cluster_is_running_commands_direct_usage.py index 82fcfece..4d93f3d3 100755 --- a/examples/clusters/ensure_cluster_is_running_commands_direct_usage.py +++ b/examples/clusters/ensure_cluster_is_running_commands_direct_usage.py @@ -7,7 +7,7 @@ cluster_id = os.environ["TEST_DEFAULT_CLUSTER_ID"] -context = w.command_execution.create(cluster_id=cluster_id, language=compute.Language.python).result() +context = w.command_execution.create(cluster_id=cluster_id, language=compute.Language.PYTHON).result() w.clusters.ensure_cluster_is_running(cluster_id) diff --git a/examples/command_execution/create_commands_direct_usage.py b/examples/command_execution/create_commands_direct_usage.py index c5c8e335..fc61e55f 100755 --- a/examples/command_execution/create_commands_direct_usage.py +++ b/examples/command_execution/create_commands_direct_usage.py @@ -7,7 +7,7 @@ cluster_id = os.environ["TEST_DEFAULT_CLUSTER_ID"] -context = w.command_execution.create(cluster_id=cluster_id, language=compute.Language.python).result() +context = w.command_execution.create(cluster_id=cluster_id, language=compute.Language.PYTHON).result() # cleanup w.command_execution.destroy(cluster_id=cluster_id, context_id=context.id) diff --git a/examples/command_execution/execute_commands_direct_usage.py b/examples/command_execution/execute_commands_direct_usage.py index 15297b76..98fa13a1 100755 --- a/examples/command_execution/execute_commands_direct_usage.py +++ b/examples/command_execution/execute_commands_direct_usage.py @@ -7,11 +7,11 @@ cluster_id = os.environ["TEST_DEFAULT_CLUSTER_ID"] -context = w.command_execution.create(cluster_id=cluster_id, language=compute.Language.python).result() +context = w.command_execution.create(cluster_id=cluster_id, language=compute.Language.PYTHON).result() text_results = w.command_execution.execute(cluster_id=cluster_id, context_id=context.id, - language=compute.Language.python, + language=compute.Language.PYTHON, command="print(1)").result() # cleanup diff --git a/examples/command_execution/start_commands.py b/examples/command_execution/start_commands.py index 261f9fc0..9901a2f2 100755 --- a/examples/command_execution/start_commands.py +++ b/examples/command_execution/start_commands.py @@ -7,4 +7,4 @@ cluster_id = os.environ["TEST_DEFAULT_CLUSTER_ID"] -command_context = w.command_execution.start(cluster_id, compute.Language.python) +command_context = w.command_execution.start(cluster_id, compute.Language.PYTHON) diff --git a/examples/grants/get_effective_tables.py b/examples/grants/get_effective_tables.py index ea7ccc19..ce846186 100755 --- a/examples/grants/get_effective_tables.py +++ b/examples/grants/get_effective_tables.py @@ -21,7 +21,7 @@ created_table = w.tables.get(get=table_full_name) -grants = w.grants.get_effective(get_effective=catalog.SecurableType.table) +grants = w.grants.get_effective(get_effective=catalog.SecurableType.TABLE) # cleanup w.schemas.delete(delete=created_schema.full_name) diff --git a/examples/grants/update_tables.py b/examples/grants/update_tables.py index f91e2f00..ea7b14c2 100755 --- a/examples/grants/update_tables.py +++ b/examples/grants/update_tables.py @@ -24,7 +24,7 @@ created_table = w.tables.get(get=table_full_name) x = w.grants.update(full_name=created_table.full_name, - securable_type=catalog.SecurableType.table, + securable_type=catalog.SecurableType.TABLE, changes=[ catalog.PermissionsChange(add=[catalog.Privilege.MODIFY, catalog.Privilege.SELECT], principal=account_level_group_name) diff --git a/examples/users/list_users.py b/examples/users/list_users.py index 87c66adf..fbc477cb 100755 --- a/examples/users/list_users.py +++ b/examples/users/list_users.py @@ -5,4 +5,4 @@ all_users = w.users.list(attributes="id,userName", sort_by="userName", - sort_order=iam.ListSortOrder.descending) + sort_order=iam.ListSortOrder.DESCENDING)