Skip to main content

unitycatalog_client/codegen/
client.rs

1// @generated — do not edit by hand.
2#![allow(unused_imports)]
3use crate::codegen::agent_skills::*;
4use crate::codegen::agents::*;
5use crate::codegen::catalogs::*;
6use crate::codegen::credentials::*;
7use crate::codegen::entity_tag_assignments::*;
8use crate::codegen::external_locations::*;
9use crate::codegen::functions::*;
10use crate::codegen::model_versions::*;
11use crate::codegen::policies::*;
12use crate::codegen::providers::*;
13use crate::codegen::recipients::*;
14use crate::codegen::registered_models::*;
15use crate::codegen::schemas::*;
16use crate::codegen::shares::*;
17use crate::codegen::staging_tables::*;
18use crate::codegen::tables::*;
19use crate::codegen::tag_policies::*;
20use crate::codegen::temporary_credentials::*;
21use crate::codegen::volumes::*;
22#[cfg(not(target_arch = "wasm32"))]
23use ::olai_http::CloudClient as Transport;
24#[cfg(target_arch = "wasm32")]
25use ::olai_http_wasm::WasmClient as Transport;
26use unitycatalog_common::models::agent_skills::v0alpha1::*;
27use unitycatalog_common::models::agents::v0alpha1::*;
28use unitycatalog_common::models::catalogs::v1::*;
29use unitycatalog_common::models::credentials::v1::*;
30use unitycatalog_common::models::external_locations::v1::*;
31use unitycatalog_common::models::functions::v1::*;
32use unitycatalog_common::models::model_versions::v1::*;
33use unitycatalog_common::models::policies::v1::*;
34use unitycatalog_common::models::providers::v1::*;
35use unitycatalog_common::models::recipients::v1::*;
36use unitycatalog_common::models::registered_models::v1::*;
37use unitycatalog_common::models::schemas::v1::*;
38use unitycatalog_common::models::shares::v1::*;
39use unitycatalog_common::models::staging_tables::v1::*;
40use unitycatalog_common::models::tables::v1::*;
41use unitycatalog_common::models::tags::v1::*;
42use unitycatalog_common::models::temporary_credentials::v1::*;
43use unitycatalog_common::models::volumes::v1::*;
44use url::Url;
45#[derive(Clone)]
46pub struct UnityCatalogClient {
47    client: Transport,
48    base_url: Url,
49}
50impl UnityCatalogClient {
51    /// Create a new aggregate client from a cloud client and base URL.
52    ///
53    /// Per-service clients are constructed on demand (they only hold a cheaply-cloneable
54    /// `CloudClient` + `Url`), so nothing is allocated per service here.
55    pub fn new(client: Transport, mut base_url: Url) -> Self {
56        if !base_url.path().ends_with('/') {
57            base_url.set_path(&format!("{}/", base_url.path()));
58        }
59        Self { client, base_url }
60    }
61    #[cfg(not(target_arch = "wasm32"))]
62    /// Create a new aggregate client with no authentication.
63    pub fn new_unauthenticated(base_url: Url) -> Self {
64        Self::new(Transport::new_unauthenticated(), base_url)
65    }
66    #[cfg(not(target_arch = "wasm32"))]
67    /// Create a new aggregate client authenticating with a bearer token.
68    pub fn new_with_token(base_url: Url, token: impl ToString) -> Self {
69        Self::new(Transport::new_with_token(token), base_url)
70    }
71    #[cfg(target_arch = "wasm32")]
72    /// Create a new aggregate client. The browser supplies the session
73    /// (cookies / forwarded auth) on each request.
74    pub fn new_in_browser(base_url: Url) -> Self {
75        Self::new(Transport::new(), base_url)
76    }
77    ///Low-level `agent_skills` client exposing request/response passthrough methods.
78    pub fn agent_skills_client(&self) -> crate::codegen::agent_skills::AgentSkillServiceClient {
79        crate::codegen::agent_skills::AgentSkillServiceClient::new(
80            self.client.clone(),
81            self.base_url.clone(),
82        )
83    }
84    ///Low-level `agents` client exposing request/response passthrough methods.
85    pub fn agents_client(&self) -> crate::codegen::agents::AgentServiceClient {
86        crate::codegen::agents::AgentServiceClient::new(self.client.clone(), self.base_url.clone())
87    }
88    ///Low-level `catalogs` client exposing request/response passthrough methods.
89    pub fn catalogs_client(&self) -> crate::codegen::catalogs::CatalogServiceClient {
90        crate::codegen::catalogs::CatalogServiceClient::new(
91            self.client.clone(),
92            self.base_url.clone(),
93        )
94    }
95    ///Low-level `credentials` client exposing request/response passthrough methods.
96    pub fn credentials_client(&self) -> crate::codegen::credentials::CredentialServiceClient {
97        crate::codegen::credentials::CredentialServiceClient::new(
98            self.client.clone(),
99            self.base_url.clone(),
100        )
101    }
102    ///Low-level `entity_tag_assignments` client exposing request/response passthrough methods.
103    pub fn entity_tag_assignments_client(
104        &self,
105    ) -> crate::codegen::entity_tag_assignments::EntityTagAssignmentClient {
106        crate::codegen::entity_tag_assignments::EntityTagAssignmentClient::new(
107            self.client.clone(),
108            self.base_url.clone(),
109        )
110    }
111    ///Low-level `external_locations` client exposing request/response passthrough methods.
112    pub fn external_locations_client(
113        &self,
114    ) -> crate::codegen::external_locations::ExternalLocationServiceClient {
115        crate::codegen::external_locations::ExternalLocationServiceClient::new(
116            self.client.clone(),
117            self.base_url.clone(),
118        )
119    }
120    ///Low-level `functions` client exposing request/response passthrough methods.
121    pub fn functions_client(&self) -> crate::codegen::functions::FunctionServiceClient {
122        crate::codegen::functions::FunctionServiceClient::new(
123            self.client.clone(),
124            self.base_url.clone(),
125        )
126    }
127    ///Low-level `model_versions` client exposing request/response passthrough methods.
128    pub fn model_versions_client(
129        &self,
130    ) -> crate::codegen::model_versions::ModelVersionServiceClient {
131        crate::codegen::model_versions::ModelVersionServiceClient::new(
132            self.client.clone(),
133            self.base_url.clone(),
134        )
135    }
136    ///Low-level `policies` client exposing request/response passthrough methods.
137    pub fn policies_client(&self) -> crate::codegen::policies::PolicyServiceClient {
138        crate::codegen::policies::PolicyServiceClient::new(
139            self.client.clone(),
140            self.base_url.clone(),
141        )
142    }
143    ///Low-level `providers` client exposing request/response passthrough methods.
144    pub fn providers_client(&self) -> crate::codegen::providers::ProviderServiceClient {
145        crate::codegen::providers::ProviderServiceClient::new(
146            self.client.clone(),
147            self.base_url.clone(),
148        )
149    }
150    ///Low-level `recipients` client exposing request/response passthrough methods.
151    pub fn recipients_client(&self) -> crate::codegen::recipients::RecipientServiceClient {
152        crate::codegen::recipients::RecipientServiceClient::new(
153            self.client.clone(),
154            self.base_url.clone(),
155        )
156    }
157    ///Low-level `registered_models` client exposing request/response passthrough methods.
158    pub fn registered_models_client(
159        &self,
160    ) -> crate::codegen::registered_models::RegisteredModelServiceClient {
161        crate::codegen::registered_models::RegisteredModelServiceClient::new(
162            self.client.clone(),
163            self.base_url.clone(),
164        )
165    }
166    ///Low-level `schemas` client exposing request/response passthrough methods.
167    pub fn schemas_client(&self) -> crate::codegen::schemas::SchemaServiceClient {
168        crate::codegen::schemas::SchemaServiceClient::new(
169            self.client.clone(),
170            self.base_url.clone(),
171        )
172    }
173    ///Low-level `shares` client exposing request/response passthrough methods.
174    pub fn shares_client(&self) -> crate::codegen::shares::ShareServiceClient {
175        crate::codegen::shares::ShareServiceClient::new(self.client.clone(), self.base_url.clone())
176    }
177    ///Low-level `staging_tables` client exposing request/response passthrough methods.
178    pub fn staging_tables_client(
179        &self,
180    ) -> crate::codegen::staging_tables::StagingTableServiceClient {
181        crate::codegen::staging_tables::StagingTableServiceClient::new(
182            self.client.clone(),
183            self.base_url.clone(),
184        )
185    }
186    ///Low-level `tables` client exposing request/response passthrough methods.
187    pub fn tables_client(&self) -> crate::codegen::tables::TableServiceClient {
188        crate::codegen::tables::TableServiceClient::new(self.client.clone(), self.base_url.clone())
189    }
190    ///Low-level `tag_policies` client exposing request/response passthrough methods.
191    pub fn tag_policies_client(&self) -> crate::codegen::tag_policies::TagPolicyServiceClient {
192        crate::codegen::tag_policies::TagPolicyServiceClient::new(
193            self.client.clone(),
194            self.base_url.clone(),
195        )
196    }
197    ///Low-level `temporary_credentials` client exposing request/response passthrough methods.
198    pub fn temporary_credentials_client(
199        &self,
200    ) -> crate::codegen::temporary_credentials::TemporaryCredentialClient {
201        crate::codegen::temporary_credentials::TemporaryCredentialClient::new(
202            self.client.clone(),
203            self.base_url.clone(),
204        )
205    }
206    ///Low-level `volumes` client exposing request/response passthrough methods.
207    pub fn volumes_client(&self) -> crate::codegen::volumes::VolumeServiceClient {
208        crate::codegen::volumes::VolumeServiceClient::new(
209            self.client.clone(),
210            self.base_url.clone(),
211        )
212    }
213    /// Lists agent skills.
214    ///
215    /// # Arguments
216    ///
217    /// * `catalog_name` - The identifier of the catalog.
218    /// * `schema_name` - The identifier of the schema.
219    pub fn list_agent_skills(
220        &self,
221        catalog_name: impl Into<String>,
222        schema_name: impl Into<String>,
223    ) -> ListAgentSkillsBuilder {
224        ListAgentSkillsBuilder::new(
225            crate::codegen::agent_skills::AgentSkillServiceClient::new(
226                self.client.clone(),
227                self.base_url.clone(),
228            ),
229            catalog_name,
230            schema_name,
231        )
232    }
233    /// # Arguments
234    ///
235    /// * `catalog_name` - The identifier of the catalog.
236    /// * `schema_name` - The identifier of the schema.
237    /// * `name` - The identifier of the agent skill.
238    /// * `agent_skill_type` - How the storage location is provisioned (external or managed).
239    pub fn create_agent_skill(
240        &self,
241        catalog_name: impl Into<String>,
242        schema_name: impl Into<String>,
243        name: impl Into<String>,
244        agent_skill_type: AgentSkillType,
245    ) -> CreateAgentSkillBuilder {
246        CreateAgentSkillBuilder::new(
247            crate::codegen::agent_skills::AgentSkillServiceClient::new(
248                self.client.clone(),
249                self.base_url.clone(),
250            ),
251            catalog_name,
252            schema_name,
253            name,
254            agent_skill_type,
255        )
256    }
257    /// Access the `agent_skill` resource scoped to the given name.
258    pub fn agent_skill(
259        &self,
260        catalog_name: impl Into<String>,
261        schema_name: impl Into<String>,
262        agent_skill_name: impl Into<String>,
263    ) -> AgentSkillClient {
264        AgentSkillClient::new(
265            catalog_name,
266            schema_name,
267            agent_skill_name,
268            crate::codegen::agent_skills::AgentSkillServiceClient::new(
269                self.client.clone(),
270                self.base_url.clone(),
271            ),
272        )
273    }
274    /// Access the `agent_skill` resource from its dot-joined full name.
275    pub fn agent_skill_from_full_name(&self, full_name: impl Into<String>) -> AgentSkillClient {
276        AgentSkillClient::from_full_name(
277            full_name,
278            crate::codegen::agent_skills::AgentSkillServiceClient::new(
279                self.client.clone(),
280                self.base_url.clone(),
281            ),
282        )
283    }
284    /// Lists agents.
285    ///
286    /// # Arguments
287    ///
288    /// * `catalog_name` - The identifier of the catalog.
289    /// * `schema_name` - The identifier of the schema.
290    pub fn list_agents(
291        &self,
292        catalog_name: impl Into<String>,
293        schema_name: impl Into<String>,
294    ) -> ListAgentsBuilder {
295        ListAgentsBuilder::new(
296            crate::codegen::agents::AgentServiceClient::new(
297                self.client.clone(),
298                self.base_url.clone(),
299            ),
300            catalog_name,
301            schema_name,
302        )
303    }
304    /// # Arguments
305    ///
306    /// * `catalog_name` - The identifier of the catalog.
307    /// * `schema_name` - The identifier of the schema.
308    /// * `name` - The identifier of the agent.
309    /// * `invocation_protocol` - The protocol a recipient uses to invoke the agent.
310    /// * `endpoint` - The agent's invocation endpoint URL.
311    pub fn create_agent(
312        &self,
313        catalog_name: impl Into<String>,
314        schema_name: impl Into<String>,
315        name: impl Into<String>,
316        invocation_protocol: InvocationProtocol,
317        endpoint: impl Into<String>,
318    ) -> CreateAgentBuilder {
319        CreateAgentBuilder::new(
320            crate::codegen::agents::AgentServiceClient::new(
321                self.client.clone(),
322                self.base_url.clone(),
323            ),
324            catalog_name,
325            schema_name,
326            name,
327            invocation_protocol,
328            endpoint,
329        )
330    }
331    /// Access the `agent` resource scoped to the given name.
332    pub fn agent(
333        &self,
334        catalog_name: impl Into<String>,
335        schema_name: impl Into<String>,
336        agent_name: impl Into<String>,
337    ) -> AgentClient {
338        AgentClient::new(
339            catalog_name,
340            schema_name,
341            agent_name,
342            crate::codegen::agents::AgentServiceClient::new(
343                self.client.clone(),
344                self.base_url.clone(),
345            ),
346        )
347    }
348    /// Access the `agent` resource from its dot-joined full name.
349    pub fn agent_from_full_name(&self, full_name: impl Into<String>) -> AgentClient {
350        AgentClient::from_full_name(
351            full_name,
352            crate::codegen::agents::AgentServiceClient::new(
353                self.client.clone(),
354                self.base_url.clone(),
355            ),
356        )
357    }
358    /// List catalogs
359    ///
360    /// Gets an array of catalogs in the metastore. If the caller is the metastore admin,
361    /// all catalogs will be retrieved. Otherwise, only catalogs owned by the caller
362    /// (or for which the caller has the USE_CATALOG privilege) will be retrieved.
363    /// There is no guarantee of a specific ordering of the elements in the array.
364    pub fn list_catalogs(&self) -> ListCatalogsBuilder {
365        ListCatalogsBuilder::new(crate::codegen::catalogs::CatalogServiceClient::new(
366            self.client.clone(),
367            self.base_url.clone(),
368        ))
369    }
370    /// Create a new catalog
371    ///
372    /// Creates a new catalog instance in the parent metastore if the caller
373    /// is a metastore admin or has the CREATE_CATALOG privilege.
374    ///
375    /// # Arguments
376    ///
377    /// * `name` - Name of catalog.
378    pub fn create_catalog(&self, name: impl Into<String>) -> CreateCatalogBuilder {
379        CreateCatalogBuilder::new(
380            crate::codegen::catalogs::CatalogServiceClient::new(
381                self.client.clone(),
382                self.base_url.clone(),
383            ),
384            name,
385        )
386    }
387    /// Access the `catalog` resource scoped to the given name.
388    pub fn catalog(&self, catalog_name: impl Into<String>) -> CatalogClient {
389        CatalogClient::new(
390            catalog_name,
391            crate::codegen::catalogs::CatalogServiceClient::new(
392                self.client.clone(),
393                self.base_url.clone(),
394            ),
395        )
396    }
397    pub fn list_credentials(&self) -> ListCredentialsBuilder {
398        ListCredentialsBuilder::new(crate::codegen::credentials::CredentialServiceClient::new(
399            self.client.clone(),
400            self.base_url.clone(),
401        ))
402    }
403    /// # Arguments
404    ///
405    /// * `name` - The credential name. The name must be unique among storage and service credentials within the metastore.
406    /// * `purpose` - Indicates the purpose of the credential.
407    pub fn create_credential(
408        &self,
409        name: impl Into<String>,
410        purpose: Purpose,
411    ) -> CreateCredentialBuilder {
412        CreateCredentialBuilder::new(
413            crate::codegen::credentials::CredentialServiceClient::new(
414                self.client.clone(),
415                self.base_url.clone(),
416            ),
417            name,
418            purpose,
419        )
420    }
421    /// Access the `credential` resource scoped to the given name.
422    pub fn credential(&self, credential_name: impl Into<String>) -> CredentialClient {
423        CredentialClient::new(
424            credential_name,
425            crate::codegen::credentials::CredentialServiceClient::new(
426                self.client.clone(),
427                self.base_url.clone(),
428            ),
429        )
430    }
431    /// List entity tag assignments
432    ///
433    /// Gets the tag assignments for the specified entity.
434    ///
435    /// # Arguments
436    ///
437    /// * `entity_type` - The type of the entity whose tag assignments to list.
438    /// * `entity_name` - The fully qualified name of the entity whose tag assignments to list.
439    pub fn list_entity_tag_assignments(
440        &self,
441        entity_type: impl Into<String>,
442        entity_name: impl Into<String>,
443    ) -> ListEntityTagAssignmentsBuilder {
444        ListEntityTagAssignmentsBuilder::new(
445            crate::codegen::entity_tag_assignments::EntityTagAssignmentClient::new(
446                self.client.clone(),
447                self.base_url.clone(),
448            ),
449            entity_type,
450            entity_name,
451        )
452    }
453    /// Create an entity tag assignment
454    ///
455    /// Assigns a tag to a Unity Catalog entity.
456    ///
457    /// # Arguments
458    ///
459    /// * `tag_assignment` - The tag assignment to create.
460    pub fn create_entity_tag_assignment(
461        &self,
462        tag_assignment: EntityTagAssignment,
463    ) -> CreateEntityTagAssignmentBuilder {
464        CreateEntityTagAssignmentBuilder::new(
465            crate::codegen::entity_tag_assignments::EntityTagAssignmentClient::new(
466                self.client.clone(),
467                self.base_url.clone(),
468            ),
469            tag_assignment,
470        )
471    }
472    /// Get an entity tag assignment
473    ///
474    /// Gets the tag assignment for the specified entity and tag key.
475    ///
476    /// # Arguments
477    ///
478    /// * `entity_type` - The type of the entity to which the tag is assigned.
479    /// * `entity_name` - The fully qualified name of the entity to which the tag is assigned.
480    /// * `tag_key` - The key of the tag.
481    pub fn get_entity_tag_assignment(
482        &self,
483        entity_type: impl Into<String>,
484        entity_name: impl Into<String>,
485        tag_key: impl Into<String>,
486    ) -> GetEntityTagAssignmentBuilder {
487        GetEntityTagAssignmentBuilder::new(
488            crate::codegen::entity_tag_assignments::EntityTagAssignmentClient::new(
489                self.client.clone(),
490                self.base_url.clone(),
491            ),
492            entity_type,
493            entity_name,
494            tag_key,
495        )
496    }
497    /// Update an entity tag assignment
498    ///
499    /// Updates the tag assignment for the specified entity and tag key.
500    ///
501    /// # Arguments
502    ///
503    /// * `entity_type` - The type of the entity to which the tag is assigned.
504    /// * `entity_name` - The fully qualified name of the entity to which the tag is assigned.
505    /// * `tag_key` - The key of the tag to update.
506    /// * `tag_assignment` - The tag assignment with the updated fields.
507    pub fn update_entity_tag_assignment(
508        &self,
509        entity_type: impl Into<String>,
510        entity_name: impl Into<String>,
511        tag_key: impl Into<String>,
512        tag_assignment: EntityTagAssignment,
513    ) -> UpdateEntityTagAssignmentBuilder {
514        UpdateEntityTagAssignmentBuilder::new(
515            crate::codegen::entity_tag_assignments::EntityTagAssignmentClient::new(
516                self.client.clone(),
517                self.base_url.clone(),
518            ),
519            entity_type,
520            entity_name,
521            tag_key,
522            tag_assignment,
523        )
524    }
525    /// Delete an entity tag assignment
526    ///
527    /// Deletes the tag assignment for the specified entity and tag key.
528    ///
529    /// # Arguments
530    ///
531    /// * `entity_type` - The type of the entity to which the tag is assigned.
532    /// * `entity_name` - The fully qualified name of the entity to which the tag is assigned.
533    /// * `tag_key` - The key of the tag to delete.
534    pub fn delete_entity_tag_assignment(
535        &self,
536        entity_type: impl Into<String>,
537        entity_name: impl Into<String>,
538        tag_key: impl Into<String>,
539    ) -> DeleteEntityTagAssignmentBuilder {
540        DeleteEntityTagAssignmentBuilder::new(
541            crate::codegen::entity_tag_assignments::EntityTagAssignmentClient::new(
542                self.client.clone(),
543                self.base_url.clone(),
544            ),
545            entity_type,
546            entity_name,
547            tag_key,
548        )
549    }
550    /// List external locations
551    pub fn list_external_locations(&self) -> ListExternalLocationsBuilder {
552        ListExternalLocationsBuilder::new(
553            crate::codegen::external_locations::ExternalLocationServiceClient::new(
554                self.client.clone(),
555                self.base_url.clone(),
556            ),
557        )
558    }
559    /// Create a new external location
560    ///
561    /// # Arguments
562    ///
563    /// * `name` - Name of external location.
564    /// * `url` - Path URL of the external location.
565    /// * `credential_name` - Name of the storage credential used with this location.
566    pub fn create_external_location(
567        &self,
568        name: impl Into<String>,
569        url: impl Into<String>,
570        credential_name: impl Into<String>,
571    ) -> CreateExternalLocationBuilder {
572        CreateExternalLocationBuilder::new(
573            crate::codegen::external_locations::ExternalLocationServiceClient::new(
574                self.client.clone(),
575                self.base_url.clone(),
576            ),
577            name,
578            url,
579            credential_name,
580        )
581    }
582    /// Access the `external_location` resource scoped to the given name.
583    pub fn external_location(
584        &self,
585        external_location_name: impl Into<String>,
586    ) -> ExternalLocationClient {
587        ExternalLocationClient::new(
588            external_location_name,
589            crate::codegen::external_locations::ExternalLocationServiceClient::new(
590                self.client.clone(),
591                self.base_url.clone(),
592            ),
593        )
594    }
595    /// List functions
596    ///
597    /// List functions within the specified parent catalog and schema. If the caller is the metastore
598    /// admin, all functions are returned in the response. Otherwise, the caller must have USE_CATALOG
599    /// on the parent catalog and USE_SCHEMA on the parent schema, and the function must either be
600    /// owned by the caller or have SELECT on the function.
601    ///
602    /// # Arguments
603    ///
604    /// * `catalog_name` - Name of parent catalog for functions of interest.
605    /// * `schema_name` - Parent schema of functions.
606    pub fn list_functions(
607        &self,
608        catalog_name: impl Into<String>,
609        schema_name: impl Into<String>,
610    ) -> ListFunctionsBuilder {
611        ListFunctionsBuilder::new(
612            crate::codegen::functions::FunctionServiceClient::new(
613                self.client.clone(),
614                self.base_url.clone(),
615            ),
616            catalog_name,
617            schema_name,
618        )
619    }
620    /// Create a function
621    ///
622    /// Creates a new function. The caller must be a metastore admin or have the CREATE_FUNCTION
623    /// privilege on the parent catalog and schema.
624    ///
625    /// # Arguments
626    ///
627    /// * `function_info` - The function to create.
628    pub fn create_function(&self, function_info: CreateFunction) -> CreateFunctionBuilder {
629        CreateFunctionBuilder::new(
630            crate::codegen::functions::FunctionServiceClient::new(
631                self.client.clone(),
632                self.base_url.clone(),
633            ),
634            function_info,
635        )
636    }
637    /// Access the `function` resource scoped to the given name.
638    pub fn function(
639        &self,
640        catalog_name: impl Into<String>,
641        schema_name: impl Into<String>,
642        function_name: impl Into<String>,
643    ) -> FunctionClient {
644        FunctionClient::new(
645            catalog_name,
646            schema_name,
647            function_name,
648            crate::codegen::functions::FunctionServiceClient::new(
649                self.client.clone(),
650                self.base_url.clone(),
651            ),
652        )
653    }
654    /// Access the `function` resource from its dot-joined full name.
655    pub fn function_from_full_name(&self, full_name: impl Into<String>) -> FunctionClient {
656        FunctionClient::from_full_name(
657            full_name,
658            crate::codegen::functions::FunctionServiceClient::new(
659                self.client.clone(),
660                self.base_url.clone(),
661            ),
662        )
663    }
664    /// List model versions
665    ///
666    /// List the model versions of the specified registered model. If the caller is
667    /// the metastore admin, all model versions are returned. Otherwise, the caller
668    /// must have the appropriate privileges on the parent model.
669    ///
670    /// # Arguments
671    ///
672    /// * `full_name` - The full three-level name of the registered model (catalog.schema.model)
673    /// whose versions are being listed.
674    pub fn list_model_versions(&self, full_name: impl Into<String>) -> ListModelVersionsBuilder {
675        ListModelVersionsBuilder::new(
676            crate::codegen::model_versions::ModelVersionServiceClient::new(
677                self.client.clone(),
678                self.base_url.clone(),
679            ),
680            full_name,
681        )
682    }
683    /// Create a model version
684    ///
685    /// Creates a new model version in PENDING_REGISTRATION status. The server
686    /// assigns the version number and a storage location for the artifacts. The
687    /// caller must be a metastore admin or the owner of the parent registered model.
688    ///
689    /// # Arguments
690    ///
691    /// * `model_name` - Name of the parent registered model, relative to parent schema.
692    /// * `catalog_name` - Name of parent catalog.
693    /// * `schema_name` - Name of parent schema.
694    /// * `source` - URI indicating the location of the source artifacts (e.g. an MLflow run
695    /// artifact path) used to create the model version.
696    pub fn create_model_version(
697        &self,
698        model_name: impl Into<String>,
699        catalog_name: impl Into<String>,
700        schema_name: impl Into<String>,
701        source: impl Into<String>,
702    ) -> CreateModelVersionBuilder {
703        CreateModelVersionBuilder::new(
704            crate::codegen::model_versions::ModelVersionServiceClient::new(
705                self.client.clone(),
706                self.base_url.clone(),
707            ),
708            model_name,
709            catalog_name,
710            schema_name,
711            source,
712        )
713    }
714    /// Get a model version
715    ///
716    /// Gets a model version by its parent model name and version number.
717    ///
718    /// # Arguments
719    ///
720    /// * `full_name` - The full three-level name of the parent registered model
721    /// (catalog.schema.model).
722    /// * `version` - The integer version number of the model version.
723    pub fn get_model_version(
724        &self,
725        full_name: impl Into<String>,
726        version: i64,
727    ) -> GetModelVersionBuilder {
728        GetModelVersionBuilder::new(
729            crate::codegen::model_versions::ModelVersionServiceClient::new(
730                self.client.clone(),
731                self.base_url.clone(),
732            ),
733            full_name,
734            version,
735        )
736    }
737    /// Update a model version
738    ///
739    /// Updates the model version that matches the supplied name and version.
740    ///
741    /// # Arguments
742    ///
743    /// * `full_name` - The full three-level name of the parent registered model
744    /// (catalog.schema.model).
745    /// * `version` - The integer version number of the model version.
746    pub fn update_model_version(
747        &self,
748        full_name: impl Into<String>,
749        version: i64,
750    ) -> UpdateModelVersionBuilder {
751        UpdateModelVersionBuilder::new(
752            crate::codegen::model_versions::ModelVersionServiceClient::new(
753                self.client.clone(),
754                self.base_url.clone(),
755            ),
756            full_name,
757            version,
758        )
759    }
760    /// Delete a model version
761    ///
762    /// Deletes the model version that matches the supplied name and version. For the
763    /// deletion to succeed, the caller must be the owner of the parent registered
764    /// model.
765    ///
766    /// # Arguments
767    ///
768    /// * `full_name` - The full three-level name of the parent registered model
769    /// (catalog.schema.model).
770    /// * `version` - The integer version number of the model version.
771    pub fn delete_model_version(
772        &self,
773        full_name: impl Into<String>,
774        version: i64,
775    ) -> DeleteModelVersionBuilder {
776        DeleteModelVersionBuilder::new(
777            crate::codegen::model_versions::ModelVersionServiceClient::new(
778                self.client.clone(),
779                self.base_url.clone(),
780            ),
781            full_name,
782            version,
783        )
784    }
785    /// Finalize a model version
786    ///
787    /// Transitions a model version to READY once all artifacts have been written to
788    /// its storage location.
789    ///
790    /// # Arguments
791    ///
792    /// * `full_name` - The full three-level name of the parent registered model
793    /// (catalog.schema.model).
794    /// * `version` - The integer version number of the model version to finalize.
795    pub fn finalize_model_version(
796        &self,
797        full_name: impl Into<String>,
798        version: i64,
799    ) -> FinalizeModelVersionBuilder {
800        FinalizeModelVersionBuilder::new(
801            crate::codegen::model_versions::ModelVersionServiceClient::new(
802                self.client.clone(),
803                self.base_url.clone(),
804            ),
805            full_name,
806            version,
807        )
808    }
809    /// List policies
810    ///
811    /// Gets an array of policies defined on the specified securable. There is no guarantee
812    /// of a specific ordering of the elements in the array.
813    ///
814    /// # Arguments
815    ///
816    /// * `on_securable_type` - The type of the securable to list policies on.
817    ///
818    /// Supported values: catalogs, schemas, tables.
819    /// * `on_securable_fullname` - The fully qualified name of the securable to list policies on.
820    pub fn list_policies(
821        &self,
822        on_securable_type: impl Into<String>,
823        on_securable_fullname: impl Into<String>,
824    ) -> ListPoliciesBuilder {
825        ListPoliciesBuilder::new(
826            crate::codegen::policies::PolicyServiceClient::new(
827                self.client.clone(),
828                self.base_url.clone(),
829            ),
830            on_securable_type,
831            on_securable_fullname,
832        )
833    }
834    /// Access the `policy` resource scoped to the given name.
835    pub fn policy(&self, policy_name: impl Into<String>) -> PolicyClient {
836        PolicyClient::new(
837            policy_name,
838            crate::codegen::policies::PolicyServiceClient::new(
839                self.client.clone(),
840                self.base_url.clone(),
841            ),
842        )
843    }
844    /// List providers.
845    pub fn list_providers(&self) -> ListProvidersBuilder {
846        ListProvidersBuilder::new(crate::codegen::providers::ProviderServiceClient::new(
847            self.client.clone(),
848            self.base_url.clone(),
849        ))
850    }
851    /// Create a new provider.
852    ///
853    /// # Arguments
854    ///
855    /// * `name` - Name of the provider.
856    /// * `authentication_type` - The delta sharing authentication type.
857    pub fn create_provider(
858        &self,
859        name: impl Into<String>,
860        authentication_type: ProviderAuthenticationType,
861    ) -> CreateProviderBuilder {
862        CreateProviderBuilder::new(
863            crate::codegen::providers::ProviderServiceClient::new(
864                self.client.clone(),
865                self.base_url.clone(),
866            ),
867            name,
868            authentication_type,
869        )
870    }
871    /// Access the `provider` resource scoped to the given name.
872    pub fn provider(&self, provider_name: impl Into<String>) -> ProviderClient {
873        ProviderClient::new(
874            provider_name,
875            crate::codegen::providers::ProviderServiceClient::new(
876                self.client.clone(),
877                self.base_url.clone(),
878            ),
879        )
880    }
881    /// List recipients.
882    pub fn list_recipients(&self) -> ListRecipientsBuilder {
883        ListRecipientsBuilder::new(crate::codegen::recipients::RecipientServiceClient::new(
884            self.client.clone(),
885            self.base_url.clone(),
886        ))
887    }
888    /// Create a new recipient.
889    ///
890    /// # Arguments
891    ///
892    /// * `name` - Name of the recipient.
893    /// * `authentication_type` - The delta sharing authentication type.
894    /// * `owner` - Username of the recipient owner.
895    pub fn create_recipient(
896        &self,
897        name: impl Into<String>,
898        authentication_type: AuthenticationType,
899        owner: impl Into<String>,
900    ) -> CreateRecipientBuilder {
901        CreateRecipientBuilder::new(
902            crate::codegen::recipients::RecipientServiceClient::new(
903                self.client.clone(),
904                self.base_url.clone(),
905            ),
906            name,
907            authentication_type,
908            owner,
909        )
910    }
911    /// Access the `recipient` resource scoped to the given name.
912    pub fn recipient(&self, recipient_name: impl Into<String>) -> RecipientClient {
913        RecipientClient::new(
914            recipient_name,
915            crate::codegen::recipients::RecipientServiceClient::new(
916                self.client.clone(),
917                self.base_url.clone(),
918            ),
919        )
920    }
921    /// List registered models
922    ///
923    /// List registered models within the specified parent catalog and schema. If
924    /// the caller is the metastore admin, all registered models are returned in the
925    /// response. Otherwise, the caller must have USE_CATALOG on the parent catalog
926    /// and USE_SCHEMA on the parent schema, and the model must either be owned by
927    /// the caller or the caller must have a privilege on the model.
928    pub fn list_registered_models(&self) -> ListRegisteredModelsBuilder {
929        ListRegisteredModelsBuilder::new(
930            crate::codegen::registered_models::RegisteredModelServiceClient::new(
931                self.client.clone(),
932                self.base_url.clone(),
933            ),
934        )
935    }
936    /// Create a registered model
937    ///
938    /// Creates a new registered model. The caller must be a metastore admin or have
939    /// the CREATE_MODEL privilege on the parent catalog and schema.
940    ///
941    /// # Arguments
942    ///
943    /// * `name` - Name of registered model, relative to parent schema.
944    /// * `catalog_name` - Name of parent catalog.
945    /// * `schema_name` - Name of parent schema.
946    pub fn create_registered_model(
947        &self,
948        name: impl Into<String>,
949        catalog_name: impl Into<String>,
950        schema_name: impl Into<String>,
951    ) -> CreateRegisteredModelBuilder {
952        CreateRegisteredModelBuilder::new(
953            crate::codegen::registered_models::RegisteredModelServiceClient::new(
954                self.client.clone(),
955                self.base_url.clone(),
956            ),
957            name,
958            catalog_name,
959            schema_name,
960        )
961    }
962    /// Access the `registered_model` resource scoped to the given name.
963    pub fn registered_model(
964        &self,
965        catalog_name: impl Into<String>,
966        schema_name: impl Into<String>,
967        registered_model_name: impl Into<String>,
968    ) -> RegisteredModelClient {
969        RegisteredModelClient::new(
970            catalog_name,
971            schema_name,
972            registered_model_name,
973            crate::codegen::registered_models::RegisteredModelServiceClient::new(
974                self.client.clone(),
975                self.base_url.clone(),
976            ),
977        )
978    }
979    /// Access the `registered_model` resource from its dot-joined full name.
980    pub fn registered_model_from_full_name(
981        &self,
982        full_name: impl Into<String>,
983    ) -> RegisteredModelClient {
984        RegisteredModelClient::from_full_name(
985            full_name,
986            crate::codegen::registered_models::RegisteredModelServiceClient::new(
987                self.client.clone(),
988                self.base_url.clone(),
989            ),
990        )
991    }
992    /// Gets an array of schemas for a catalog in the metastore. If the caller is the metastore
993    /// admin or the owner of the parent catalog, all schemas for the catalog will be retrieved.
994    /// Otherwise, only schemas owned by the caller (or for which the caller has the USE_SCHEMA privilege)
995    /// will be retrieved. There is no guarantee of a specific ordering of the elements in the array.
996    ///
997    /// # Arguments
998    ///
999    /// * `catalog_name` - Name of parent catalog.
1000    pub fn list_schemas(&self, catalog_name: impl Into<String>) -> ListSchemasBuilder {
1001        ListSchemasBuilder::new(
1002            crate::codegen::schemas::SchemaServiceClient::new(
1003                self.client.clone(),
1004                self.base_url.clone(),
1005            ),
1006            catalog_name,
1007        )
1008    }
1009    /// Creates a new schema for catalog in the Metatastore. The caller must be a metastore admin,
1010    /// or have the CREATE_SCHEMA privilege in the parent catalog.
1011    ///
1012    /// # Arguments
1013    ///
1014    /// * `name` - Name of schema, relative to parent catalog.
1015    /// * `catalog_name` - Name of parent catalog.
1016    pub fn create_schema(
1017        &self,
1018        name: impl Into<String>,
1019        catalog_name: impl Into<String>,
1020    ) -> CreateSchemaBuilder {
1021        CreateSchemaBuilder::new(
1022            crate::codegen::schemas::SchemaServiceClient::new(
1023                self.client.clone(),
1024                self.base_url.clone(),
1025            ),
1026            name,
1027            catalog_name,
1028        )
1029    }
1030    /// Access the `schema` resource scoped to the given name.
1031    pub fn schema(
1032        &self,
1033        catalog_name: impl Into<String>,
1034        schema_name: impl Into<String>,
1035    ) -> SchemaClient {
1036        SchemaClient::new(
1037            catalog_name,
1038            schema_name,
1039            crate::codegen::schemas::SchemaServiceClient::new(
1040                self.client.clone(),
1041                self.base_url.clone(),
1042            ),
1043        )
1044    }
1045    /// Access the `schema` resource from its dot-joined full name.
1046    pub fn schema_from_full_name(&self, full_name: impl Into<String>) -> SchemaClient {
1047        SchemaClient::from_full_name(
1048            full_name,
1049            crate::codegen::schemas::SchemaServiceClient::new(
1050                self.client.clone(),
1051                self.base_url.clone(),
1052            ),
1053        )
1054    }
1055    /// List shares.
1056    pub fn list_shares(&self) -> ListSharesBuilder {
1057        ListSharesBuilder::new(crate::codegen::shares::ShareServiceClient::new(
1058            self.client.clone(),
1059            self.base_url.clone(),
1060        ))
1061    }
1062    /// Create a new share.
1063    ///
1064    /// # Arguments
1065    ///
1066    /// * `name` - Name of the share.
1067    pub fn create_share(&self, name: impl Into<String>) -> CreateShareBuilder {
1068        CreateShareBuilder::new(
1069            crate::codegen::shares::ShareServiceClient::new(
1070                self.client.clone(),
1071                self.base_url.clone(),
1072            ),
1073            name,
1074        )
1075    }
1076    /// Access the `share` resource scoped to the given name.
1077    pub fn share(&self, share_name: impl Into<String>) -> ShareClient {
1078        ShareClient::new(
1079            share_name,
1080            crate::codegen::shares::ShareServiceClient::new(
1081                self.client.clone(),
1082                self.base_url.clone(),
1083            ),
1084        )
1085    }
1086    /// Creates a new staging table, allocating an immutable table id and a storage
1087    /// location under the parent schema/catalog managed storage root. The caller
1088    /// must have the CREATE privilege on the parent schema.
1089    ///
1090    /// # Arguments
1091    ///
1092    /// * `name` - Name of the staging table, relative to the parent schema.
1093    /// * `catalog_name` - Name of the parent catalog.
1094    /// * `schema_name` - Name of the parent schema relative to its parent catalog.
1095    pub fn create_staging_table(
1096        &self,
1097        name: impl Into<String>,
1098        catalog_name: impl Into<String>,
1099        schema_name: impl Into<String>,
1100    ) -> CreateStagingTableBuilder {
1101        CreateStagingTableBuilder::new(
1102            crate::codegen::staging_tables::StagingTableServiceClient::new(
1103                self.client.clone(),
1104                self.base_url.clone(),
1105            ),
1106            name,
1107            catalog_name,
1108            schema_name,
1109        )
1110    }
1111    /// Access the `staging_table` resource scoped to the given name.
1112    pub fn staging_table(&self, staging_table_name: impl Into<String>) -> StagingTableClient {
1113        StagingTableClient::new(
1114            staging_table_name,
1115            crate::codegen::staging_tables::StagingTableServiceClient::new(
1116                self.client.clone(),
1117                self.base_url.clone(),
1118            ),
1119        )
1120    }
1121    /// Gets an array of summaries for tables for a schema and catalog within the metastore. The table summaries returned are either:
1122    /// - summaries for tables (within the current metastore and parent catalog and schema), when the user is a metastore admin, or:
1123    /// - summaries for tables and schemas (within the current metastore and parent catalog) for which the user has ownership or the
1124    /// SELECT privilege on the table and ownership or USE_SCHEMA privilege on the schema, provided that the user also has ownership
1125    /// or the USE_CATALOG privilege on the parent catalog.
1126    ///
1127    /// There is no guarantee of a specific ordering of the elements in the array.
1128    ///
1129    /// # Arguments
1130    ///
1131    /// * `catalog_name` - Name of parent catalog for tables of interest.
1132    pub fn list_table_summaries(
1133        &self,
1134        catalog_name: impl Into<String>,
1135    ) -> ListTableSummariesBuilder {
1136        ListTableSummariesBuilder::new(
1137            crate::codegen::tables::TableServiceClient::new(
1138                self.client.clone(),
1139                self.base_url.clone(),
1140            ),
1141            catalog_name,
1142        )
1143    }
1144    /// Gets an array of all tables for the current metastore under the parent catalog and schema.
1145    ///
1146    /// The caller must be a metastore admin or an owner of (or have the SELECT privilege on) the table.
1147    /// For the latter case, the caller must also be the owner or have the USE_CATALOG privilege on the
1148    /// parent catalog and the USE_SCHEMA privilege on the parent schema. There is no guarantee of a
1149    /// specific ordering of the elements in the array.
1150    ///
1151    /// # Arguments
1152    ///
1153    /// * `catalog_name` - Name of parent catalog for tables of interest.
1154    /// * `schema_name` - Name of parent schema for tables of interest.
1155    pub fn list_tables(
1156        &self,
1157        catalog_name: impl Into<String>,
1158        schema_name: impl Into<String>,
1159    ) -> ListTablesBuilder {
1160        ListTablesBuilder::new(
1161            crate::codegen::tables::TableServiceClient::new(
1162                self.client.clone(),
1163                self.base_url.clone(),
1164            ),
1165            catalog_name,
1166            schema_name,
1167        )
1168    }
1169    /// Create a table
1170    ///
1171    /// # Arguments
1172    ///
1173    /// * `name` - Name of table, relative to parent schema.
1174    /// * `schema_name` - Name of parent schema relative to its parent catalog.
1175    /// * `catalog_name` - Name of parent catalog.
1176    pub fn create_table(
1177        &self,
1178        name: impl Into<String>,
1179        schema_name: impl Into<String>,
1180        catalog_name: impl Into<String>,
1181        table_type: TableType,
1182        data_source_format: DataSourceFormat,
1183    ) -> CreateTableBuilder {
1184        CreateTableBuilder::new(
1185            crate::codegen::tables::TableServiceClient::new(
1186                self.client.clone(),
1187                self.base_url.clone(),
1188            ),
1189            name,
1190            schema_name,
1191            catalog_name,
1192            table_type,
1193            data_source_format,
1194        )
1195    }
1196    /// Access the `table` resource scoped to the given name.
1197    pub fn table(
1198        &self,
1199        catalog_name: impl Into<String>,
1200        schema_name: impl Into<String>,
1201        table_name: impl Into<String>,
1202    ) -> TableClient {
1203        TableClient::new(
1204            catalog_name,
1205            schema_name,
1206            table_name,
1207            crate::codegen::tables::TableServiceClient::new(
1208                self.client.clone(),
1209                self.base_url.clone(),
1210            ),
1211        )
1212    }
1213    /// Access the `table` resource from its dot-joined full name.
1214    pub fn table_from_full_name(&self, full_name: impl Into<String>) -> TableClient {
1215        TableClient::from_full_name(
1216            full_name,
1217            crate::codegen::tables::TableServiceClient::new(
1218                self.client.clone(),
1219                self.base_url.clone(),
1220            ),
1221        )
1222    }
1223    /// List tag policies
1224    ///
1225    /// Gets an array of tag policies. There is no guarantee of a specific ordering
1226    /// of the elements in the array.
1227    pub fn list_tag_policies(&self) -> ListTagPoliciesBuilder {
1228        ListTagPoliciesBuilder::new(crate::codegen::tag_policies::TagPolicyServiceClient::new(
1229            self.client.clone(),
1230            self.base_url.clone(),
1231        ))
1232    }
1233    /// Create a new tag policy
1234    ///
1235    /// Creates a new governed tag definition.
1236    ///
1237    /// # Arguments
1238    ///
1239    /// * `tag_policy` - The tag policy to create.
1240    pub fn create_tag_policy(&self, tag_policy: TagPolicy) -> CreateTagPolicyBuilder {
1241        CreateTagPolicyBuilder::new(
1242            crate::codegen::tag_policies::TagPolicyServiceClient::new(
1243                self.client.clone(),
1244                self.base_url.clone(),
1245            ),
1246            tag_policy,
1247        )
1248    }
1249    /// Access the `tag_policy` resource scoped to the given name.
1250    pub fn tag_policy(&self, tag_policy_name: impl Into<String>) -> TagPolicyClient {
1251        TagPolicyClient::new(
1252            tag_policy_name,
1253            crate::codegen::tag_policies::TagPolicyServiceClient::new(
1254                self.client.clone(),
1255                self.base_url.clone(),
1256            ),
1257        )
1258    }
1259    /// Generate a new set of credentials for a table.
1260    ///
1261    /// # Arguments
1262    ///
1263    /// * `table_id` - UUID of the table to read or write.
1264    /// * `operation` - The operation performed against the table data, either READ or READ_WRITE.
1265    /// If READ_WRITE is specified, the credentials returned will have write
1266    /// permissions, otherwise, it will be read only.
1267    pub fn generate_temporary_table_credentials(
1268        &self,
1269        table_id: impl Into<String>,
1270        operation: generate_temporary_table_credentials_request::Operation,
1271    ) -> GenerateTemporaryTableCredentialsBuilder {
1272        GenerateTemporaryTableCredentialsBuilder::new(
1273            crate::codegen::temporary_credentials::TemporaryCredentialClient::new(
1274                self.client.clone(),
1275                self.base_url.clone(),
1276            ),
1277            table_id,
1278            operation,
1279        )
1280    }
1281    /// Generate a new set of credentials for a path.
1282    ///
1283    /// # Arguments
1284    ///
1285    /// * `url` - URL for path-based access.
1286    /// * `operation` - The operation being performed on the path.
1287    pub fn generate_temporary_path_credentials(
1288        &self,
1289        url: impl Into<String>,
1290        operation: generate_temporary_path_credentials_request::Operation,
1291    ) -> GenerateTemporaryPathCredentialsBuilder {
1292        GenerateTemporaryPathCredentialsBuilder::new(
1293            crate::codegen::temporary_credentials::TemporaryCredentialClient::new(
1294                self.client.clone(),
1295                self.base_url.clone(),
1296            ),
1297            url,
1298            operation,
1299        )
1300    }
1301    /// Generate a new set of credentials for a volume.
1302    ///
1303    /// The metastore must have the `external_access_enabled` flag set to true
1304    /// (default false). The caller must have the `EXTERNAL_USE_SCHEMA`
1305    /// privilege on the parent schema (granted by a catalog owner).
1306    ///
1307    /// # Arguments
1308    ///
1309    /// * `volume_id` - UUID of the volume to read or write.
1310    /// * `operation` - The operation performed against the volume data, either READ_VOLUME or
1311    /// WRITE_VOLUME. If WRITE_VOLUME is specified, the credentials returned will
1312    /// have write permissions, otherwise, it will be read only.
1313    pub fn generate_temporary_volume_credentials(
1314        &self,
1315        volume_id: impl Into<String>,
1316        operation: generate_temporary_volume_credentials_request::Operation,
1317    ) -> GenerateTemporaryVolumeCredentialsBuilder {
1318        GenerateTemporaryVolumeCredentialsBuilder::new(
1319            crate::codegen::temporary_credentials::TemporaryCredentialClient::new(
1320                self.client.clone(),
1321                self.base_url.clone(),
1322            ),
1323            volume_id,
1324            operation,
1325        )
1326    }
1327    /// Generate a new set of credentials for a model version.
1328    ///
1329    /// The metastore must have the `external_access_enabled` flag set to true
1330    /// (default false). The caller must have the `EXTERNAL_USE_SCHEMA`
1331    /// privilege on the parent schema (granted by a catalog owner).
1332    ///
1333    /// # Arguments
1334    ///
1335    /// * `catalog_name` - Name of parent catalog of the model version.
1336    /// * `schema_name` - Name of parent schema of the model version.
1337    /// * `model_name` - Name of the parent registered model.
1338    /// * `version` - The integer version number of the model version.
1339    /// * `operation` - The operation performed against the model version data, either
1340    /// READ_MODEL_VERSION or READ_WRITE_MODEL_VERSION. If READ_WRITE_MODEL_VERSION
1341    /// is specified, the credentials returned will have write permissions,
1342    /// otherwise, it will be read only.
1343    pub fn generate_temporary_model_version_credentials(
1344        &self,
1345        catalog_name: impl Into<String>,
1346        schema_name: impl Into<String>,
1347        model_name: impl Into<String>,
1348        version: i64,
1349        operation: generate_temporary_model_version_credentials_request::Operation,
1350    ) -> GenerateTemporaryModelVersionCredentialsBuilder {
1351        GenerateTemporaryModelVersionCredentialsBuilder::new(
1352            crate::codegen::temporary_credentials::TemporaryCredentialClient::new(
1353                self.client.clone(),
1354                self.base_url.clone(),
1355            ),
1356            catalog_name,
1357            schema_name,
1358            model_name,
1359            version,
1360            operation,
1361        )
1362    }
1363    /// Lists volumes.
1364    ///
1365    /// # Arguments
1366    ///
1367    /// * `catalog_name` - The identifier of the catalog
1368    /// * `schema_name` - The identifier of the schema
1369    pub fn list_volumes(
1370        &self,
1371        catalog_name: impl Into<String>,
1372        schema_name: impl Into<String>,
1373    ) -> ListVolumesBuilder {
1374        ListVolumesBuilder::new(
1375            crate::codegen::volumes::VolumeServiceClient::new(
1376                self.client.clone(),
1377                self.base_url.clone(),
1378            ),
1379            catalog_name,
1380            schema_name,
1381        )
1382    }
1383    /// # Arguments
1384    ///
1385    /// * `catalog_name` - The identifier of the catalog
1386    /// * `schema_name` - The identifier of the schema
1387    /// * `name` - The identifier of the volume
1388    /// * `volume_type` - The type of the volume.
1389    ///
1390    /// An external volume is located in the specified external location.
1391    /// A managed volume is located in the default location which is specified
1392    /// by the parent schema, or the parent catalog, or the Metastore.
1393    pub fn create_volume(
1394        &self,
1395        catalog_name: impl Into<String>,
1396        schema_name: impl Into<String>,
1397        name: impl Into<String>,
1398        volume_type: VolumeType,
1399    ) -> CreateVolumeBuilder {
1400        CreateVolumeBuilder::new(
1401            crate::codegen::volumes::VolumeServiceClient::new(
1402                self.client.clone(),
1403                self.base_url.clone(),
1404            ),
1405            catalog_name,
1406            schema_name,
1407            name,
1408            volume_type,
1409        )
1410    }
1411    /// Access the `volume` resource scoped to the given name.
1412    pub fn volume(
1413        &self,
1414        catalog_name: impl Into<String>,
1415        schema_name: impl Into<String>,
1416        volume_name: impl Into<String>,
1417    ) -> VolumeClient {
1418        VolumeClient::new(
1419            catalog_name,
1420            schema_name,
1421            volume_name,
1422            crate::codegen::volumes::VolumeServiceClient::new(
1423                self.client.clone(),
1424                self.base_url.clone(),
1425            ),
1426        )
1427    }
1428    /// Access the `volume` resource from its dot-joined full name.
1429    pub fn volume_from_full_name(&self, full_name: impl Into<String>) -> VolumeClient {
1430        VolumeClient::from_full_name(
1431            full_name,
1432            crate::codegen::volumes::VolumeServiceClient::new(
1433                self.client.clone(),
1434                self.base_url.clone(),
1435            ),
1436        )
1437    }
1438}