diff --git a/.codegen/service.py.tmpl b/.codegen/service.py.tmpl index b5d175f1..d21e8840 100644 --- a/.codegen/service.py.tmpl +++ b/.codegen/service.py.tmpl @@ -310,7 +310,7 @@ self._api.do('{{.Verb}}', {{define "method-return-type" -}} {{if and .Wait (and (not .IsCrudRead) (not (eq .SnakeName "get_run"))) }} -> Wait[{{.Wait.Poll.Response.PascalName}}] {{- else if .Response}} -> {{if .Response.ArrayValue -}} - Iterator[{{.Response.ArrayValue.PascalName}}] + Iterator[{{template "type" .Response.ArrayValue}}] {{- else if .Pagination -}} Iterator[{{.Pagination.Entity.PascalName}}] {{- else -}} diff --git a/databricks/sdk/service/catalog.py b/databricks/sdk/service/catalog.py index f9c3e8f8..2a5fbaf9 100755 --- a/databricks/sdk/service/catalog.py +++ b/databricks/sdk/service/catalog.py @@ -3201,7 +3201,7 @@ def get(self, workspace_id: int) -> AccountsMetastoreAssignment: headers=headers) return AccountsMetastoreAssignment.from_dict(res) - def list(self, metastore_id: str) -> Iterator[MetastoreAssignment]: + def list(self, metastore_id: str) -> Iterator['MetastoreAssignment']: """Get all workspaces assigned to a metastore. Gets a list of all Databricks workspace IDs that have been assigned to given metastore. @@ -3427,7 +3427,7 @@ def get(self, metastore_id: str, name: str) -> AccountsStorageCredentialInfo: headers=headers) return AccountsStorageCredentialInfo.from_dict(res) - def list(self, metastore_id: str) -> Iterator[StorageCredentialInfo]: + def list(self, metastore_id: str) -> Iterator['StorageCredentialInfo']: """Get all storage credentials assigned to a metastore. Gets a list of all storage credentials that have been assigned to given metastore. diff --git a/databricks/sdk/service/provisioning.py b/databricks/sdk/service/provisioning.py index c1b99daa..9b8e3279 100755 --- a/databricks/sdk/service/provisioning.py +++ b/databricks/sdk/service/provisioning.py @@ -1081,7 +1081,7 @@ def get(self, credentials_id: str) -> Credential: headers=headers) return Credential.from_dict(res) - def list(self) -> Iterator[Credential]: + def list(self) -> Iterator['Credential']: """Get all credential configurations. Gets all Databricks credential configurations associated with an account specified by ID. @@ -1198,7 +1198,7 @@ def get(self, customer_managed_key_id: str) -> CustomerManagedKey: headers=headers) return CustomerManagedKey.from_dict(res) - def list(self) -> Iterator[CustomerManagedKey]: + def list(self) -> Iterator['CustomerManagedKey']: """Get all encryption key configurations. Gets all customer-managed key configuration objects for an account. If the key is specified as a @@ -1314,7 +1314,7 @@ def get(self, network_id: str) -> Network: headers=headers) return Network.from_dict(res) - def list(self) -> Iterator[Network]: + def list(self) -> Iterator['Network']: """Get all network configurations. Gets a list of all Databricks network configurations for an account, specified by ID. @@ -1449,7 +1449,7 @@ def get(self, private_access_settings_id: str) -> PrivateAccessSettings: headers=headers) return PrivateAccessSettings.from_dict(res) - def list(self) -> Iterator[PrivateAccessSettings]: + def list(self) -> Iterator['PrivateAccessSettings']: """Get all private access settings objects. Gets a list of all private access settings objects for an account, specified by ID. @@ -1616,7 +1616,7 @@ def get(self, storage_configuration_id: str) -> StorageConfiguration: headers=headers) return StorageConfiguration.from_dict(res) - def list(self) -> Iterator[StorageConfiguration]: + def list(self) -> Iterator['StorageConfiguration']: """Get all storage configurations. Gets a list of all Databricks storage configurations for your account, specified by ID. @@ -1725,7 +1725,7 @@ def get(self, vpc_endpoint_id: str) -> VpcEndpoint: headers=headers) return VpcEndpoint.from_dict(res) - def list(self) -> Iterator[VpcEndpoint]: + def list(self) -> Iterator['VpcEndpoint']: """Get all VPC endpoint configurations. Gets a list of all VPC endpoints for an account, specified by ID. @@ -2022,7 +2022,7 @@ def get(self, workspace_id: int) -> Workspace: headers=headers) return Workspace.from_dict(res) - def list(self) -> Iterator[Workspace]: + def list(self) -> Iterator['Workspace']: """Get all workspaces. Gets a list of all workspaces associated with an account, specified by ID. diff --git a/databricks/sdk/service/sql.py b/databricks/sdk/service/sql.py index a61d92b2..f5e56823 100755 --- a/databricks/sdk/service/sql.py +++ b/databricks/sdk/service/sql.py @@ -205,7 +205,6 @@ def from_dict(cls, d: Dict[str, any]) -> 'ChannelInfo': class ChannelName(Enum): - """Name of the channel""" CHANNEL_NAME_CURRENT = 'CHANNEL_NAME_CURRENT' CHANNEL_NAME_CUSTOM = 'CHANNEL_NAME_CUSTOM' @@ -2590,7 +2589,7 @@ def get(self, alert_id: str) -> Alert: res = self._api.do('GET', f'/api/2.0/preview/sql/alerts/{alert_id}', headers=headers) return Alert.from_dict(res) - def list(self) -> Iterator[Alert]: + def list(self) -> Iterator['Alert']: """Get alerts. Gets a list of alerts. @@ -2865,7 +2864,7 @@ class DataSourcesAPI: def __init__(self, api_client): self._api = api_client - def list(self) -> Iterator[DataSource]: + def list(self) -> Iterator['DataSource']: """Get a list of SQL warehouses. Retrieves a full list of SQL warehouses available in this workspace. All fields that appear in this