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::policies::*;
11use crate::codegen::providers::*;
12use crate::codegen::recipients::*;
13use crate::codegen::schemas::*;
14use crate::codegen::shares::*;
15use crate::codegen::staging_tables::*;
16use crate::codegen::tables::*;
17use crate::codegen::tag_policies::*;
18use crate::codegen::temporary_credentials::*;
19use crate::codegen::volumes::*;
20use olai_http::CloudClient;
21use unitycatalog_common::models::agent_skills::v0alpha1::*;
22use unitycatalog_common::models::agents::v0alpha1::*;
23use unitycatalog_common::models::catalogs::v1::*;
24use unitycatalog_common::models::credentials::v1::*;
25use unitycatalog_common::models::external_locations::v1::*;
26use unitycatalog_common::models::functions::v1::*;
27use unitycatalog_common::models::policies::v1::*;
28use unitycatalog_common::models::providers::v1::*;
29use unitycatalog_common::models::recipients::v1::*;
30use unitycatalog_common::models::schemas::v1::*;
31use unitycatalog_common::models::shares::v1::*;
32use unitycatalog_common::models::staging_tables::v1::*;
33use unitycatalog_common::models::tables::v1::*;
34use unitycatalog_common::models::tags::v1::*;
35use unitycatalog_common::models::temporary_credentials::v1::*;
36use unitycatalog_common::models::volumes::v1::*;
37use url::Url;
38#[derive(Clone)]
39pub struct UnityCatalogClient {
40    client: CloudClient,
41    base_url: Url,
42}
43impl UnityCatalogClient {
44    /// Create a new aggregate client from a cloud client and base URL.
45    ///
46    /// Per-service clients are constructed on demand (they only hold a cheaply-cloneable
47    /// `CloudClient` + `Url`), so nothing is allocated per service here.
48    pub fn new(client: CloudClient, mut base_url: Url) -> Self {
49        if !base_url.path().ends_with('/') {
50            base_url.set_path(&format!("{}/", base_url.path()));
51        }
52        Self { client, base_url }
53    }
54    /// Create a new aggregate client with no authentication.
55    pub fn new_unauthenticated(base_url: Url) -> Self {
56        Self::new(CloudClient::new_unauthenticated(), base_url)
57    }
58    /// Create a new aggregate client authenticating with a bearer token.
59    pub fn new_with_token(base_url: Url, token: impl ToString) -> Self {
60        Self::new(CloudClient::new_with_token(token), base_url)
61    }
62    ///Low-level `agent_skills` client exposing request/response passthrough methods.
63    pub fn agent_skills_client(&self) -> crate::codegen::agent_skills::AgentSkillServiceClient {
64        crate::codegen::agent_skills::AgentSkillServiceClient::new(
65            self.client.clone(),
66            self.base_url.clone(),
67        )
68    }
69    ///Low-level `agents` client exposing request/response passthrough methods.
70    pub fn agents_client(&self) -> crate::codegen::agents::AgentServiceClient {
71        crate::codegen::agents::AgentServiceClient::new(self.client.clone(), self.base_url.clone())
72    }
73    ///Low-level `catalogs` client exposing request/response passthrough methods.
74    pub fn catalogs_client(&self) -> crate::codegen::catalogs::CatalogServiceClient {
75        crate::codegen::catalogs::CatalogServiceClient::new(
76            self.client.clone(),
77            self.base_url.clone(),
78        )
79    }
80    ///Low-level `credentials` client exposing request/response passthrough methods.
81    pub fn credentials_client(&self) -> crate::codegen::credentials::CredentialServiceClient {
82        crate::codegen::credentials::CredentialServiceClient::new(
83            self.client.clone(),
84            self.base_url.clone(),
85        )
86    }
87    ///Low-level `entity_tag_assignments` client exposing request/response passthrough methods.
88    pub fn entity_tag_assignments_client(
89        &self,
90    ) -> crate::codegen::entity_tag_assignments::EntityTagAssignmentClient {
91        crate::codegen::entity_tag_assignments::EntityTagAssignmentClient::new(
92            self.client.clone(),
93            self.base_url.clone(),
94        )
95    }
96    ///Low-level `external_locations` client exposing request/response passthrough methods.
97    pub fn external_locations_client(
98        &self,
99    ) -> crate::codegen::external_locations::ExternalLocationServiceClient {
100        crate::codegen::external_locations::ExternalLocationServiceClient::new(
101            self.client.clone(),
102            self.base_url.clone(),
103        )
104    }
105    ///Low-level `functions` client exposing request/response passthrough methods.
106    pub fn functions_client(&self) -> crate::codegen::functions::FunctionServiceClient {
107        crate::codegen::functions::FunctionServiceClient::new(
108            self.client.clone(),
109            self.base_url.clone(),
110        )
111    }
112    ///Low-level `policies` client exposing request/response passthrough methods.
113    pub fn policies_client(&self) -> crate::codegen::policies::PolicyServiceClient {
114        crate::codegen::policies::PolicyServiceClient::new(
115            self.client.clone(),
116            self.base_url.clone(),
117        )
118    }
119    ///Low-level `providers` client exposing request/response passthrough methods.
120    pub fn providers_client(&self) -> crate::codegen::providers::ProviderServiceClient {
121        crate::codegen::providers::ProviderServiceClient::new(
122            self.client.clone(),
123            self.base_url.clone(),
124        )
125    }
126    ///Low-level `recipients` client exposing request/response passthrough methods.
127    pub fn recipients_client(&self) -> crate::codegen::recipients::RecipientServiceClient {
128        crate::codegen::recipients::RecipientServiceClient::new(
129            self.client.clone(),
130            self.base_url.clone(),
131        )
132    }
133    ///Low-level `schemas` client exposing request/response passthrough methods.
134    pub fn schemas_client(&self) -> crate::codegen::schemas::SchemaServiceClient {
135        crate::codegen::schemas::SchemaServiceClient::new(
136            self.client.clone(),
137            self.base_url.clone(),
138        )
139    }
140    ///Low-level `shares` client exposing request/response passthrough methods.
141    pub fn shares_client(&self) -> crate::codegen::shares::ShareServiceClient {
142        crate::codegen::shares::ShareServiceClient::new(self.client.clone(), self.base_url.clone())
143    }
144    ///Low-level `staging_tables` client exposing request/response passthrough methods.
145    pub fn staging_tables_client(
146        &self,
147    ) -> crate::codegen::staging_tables::StagingTableServiceClient {
148        crate::codegen::staging_tables::StagingTableServiceClient::new(
149            self.client.clone(),
150            self.base_url.clone(),
151        )
152    }
153    ///Low-level `tables` client exposing request/response passthrough methods.
154    pub fn tables_client(&self) -> crate::codegen::tables::TableServiceClient {
155        crate::codegen::tables::TableServiceClient::new(self.client.clone(), self.base_url.clone())
156    }
157    ///Low-level `tag_policies` client exposing request/response passthrough methods.
158    pub fn tag_policies_client(&self) -> crate::codegen::tag_policies::TagPolicyServiceClient {
159        crate::codegen::tag_policies::TagPolicyServiceClient::new(
160            self.client.clone(),
161            self.base_url.clone(),
162        )
163    }
164    ///Low-level `temporary_credentials` client exposing request/response passthrough methods.
165    pub fn temporary_credentials_client(
166        &self,
167    ) -> crate::codegen::temporary_credentials::TemporaryCredentialClient {
168        crate::codegen::temporary_credentials::TemporaryCredentialClient::new(
169            self.client.clone(),
170            self.base_url.clone(),
171        )
172    }
173    ///Low-level `volumes` client exposing request/response passthrough methods.
174    pub fn volumes_client(&self) -> crate::codegen::volumes::VolumeServiceClient {
175        crate::codegen::volumes::VolumeServiceClient::new(
176            self.client.clone(),
177            self.base_url.clone(),
178        )
179    }
180    /// Lists agent skills.
181    ///
182    /// # Arguments
183    ///
184    /// * `catalog_name` - The identifier of the catalog.
185    /// * `schema_name` - The identifier of the schema.
186    pub fn list_agent_skills(
187        &self,
188        catalog_name: impl Into<String>,
189        schema_name: impl Into<String>,
190    ) -> ListAgentSkillsBuilder {
191        ListAgentSkillsBuilder::new(
192            crate::codegen::agent_skills::AgentSkillServiceClient::new(
193                self.client.clone(),
194                self.base_url.clone(),
195            ),
196            catalog_name,
197            schema_name,
198        )
199    }
200    /// # Arguments
201    ///
202    /// * `catalog_name` - The identifier of the catalog.
203    /// * `schema_name` - The identifier of the schema.
204    /// * `name` - The identifier of the agent skill.
205    /// * `agent_skill_type` - How the storage location is provisioned (external or managed).
206    pub fn create_agent_skill(
207        &self,
208        catalog_name: impl Into<String>,
209        schema_name: impl Into<String>,
210        name: impl Into<String>,
211        agent_skill_type: AgentSkillType,
212    ) -> CreateAgentSkillBuilder {
213        CreateAgentSkillBuilder::new(
214            crate::codegen::agent_skills::AgentSkillServiceClient::new(
215                self.client.clone(),
216                self.base_url.clone(),
217            ),
218            catalog_name,
219            schema_name,
220            name,
221            agent_skill_type,
222        )
223    }
224    /// Access the `agent_skill` resource scoped to the given name.
225    pub fn agent_skill(
226        &self,
227        catalog_name: impl Into<String>,
228        schema_name: impl Into<String>,
229        agent_skill_name: impl Into<String>,
230    ) -> AgentSkillClient {
231        AgentSkillClient::new(
232            catalog_name,
233            schema_name,
234            agent_skill_name,
235            crate::codegen::agent_skills::AgentSkillServiceClient::new(
236                self.client.clone(),
237                self.base_url.clone(),
238            ),
239        )
240    }
241    /// Access the `agent_skill` resource from its dot-joined full name.
242    pub fn agent_skill_from_full_name(&self, full_name: impl Into<String>) -> AgentSkillClient {
243        AgentSkillClient::from_full_name(
244            full_name,
245            crate::codegen::agent_skills::AgentSkillServiceClient::new(
246                self.client.clone(),
247                self.base_url.clone(),
248            ),
249        )
250    }
251    /// Lists agents.
252    ///
253    /// # Arguments
254    ///
255    /// * `catalog_name` - The identifier of the catalog.
256    /// * `schema_name` - The identifier of the schema.
257    pub fn list_agents(
258        &self,
259        catalog_name: impl Into<String>,
260        schema_name: impl Into<String>,
261    ) -> ListAgentsBuilder {
262        ListAgentsBuilder::new(
263            crate::codegen::agents::AgentServiceClient::new(
264                self.client.clone(),
265                self.base_url.clone(),
266            ),
267            catalog_name,
268            schema_name,
269        )
270    }
271    /// # Arguments
272    ///
273    /// * `catalog_name` - The identifier of the catalog.
274    /// * `schema_name` - The identifier of the schema.
275    /// * `name` - The identifier of the agent.
276    /// * `invocation_protocol` - The protocol a recipient uses to invoke the agent.
277    /// * `endpoint` - The agent's invocation endpoint URL.
278    pub fn create_agent(
279        &self,
280        catalog_name: impl Into<String>,
281        schema_name: impl Into<String>,
282        name: impl Into<String>,
283        invocation_protocol: InvocationProtocol,
284        endpoint: impl Into<String>,
285    ) -> CreateAgentBuilder {
286        CreateAgentBuilder::new(
287            crate::codegen::agents::AgentServiceClient::new(
288                self.client.clone(),
289                self.base_url.clone(),
290            ),
291            catalog_name,
292            schema_name,
293            name,
294            invocation_protocol,
295            endpoint,
296        )
297    }
298    /// Access the `agent` resource scoped to the given name.
299    pub fn agent(
300        &self,
301        catalog_name: impl Into<String>,
302        schema_name: impl Into<String>,
303        agent_name: impl Into<String>,
304    ) -> AgentClient {
305        AgentClient::new(
306            catalog_name,
307            schema_name,
308            agent_name,
309            crate::codegen::agents::AgentServiceClient::new(
310                self.client.clone(),
311                self.base_url.clone(),
312            ),
313        )
314    }
315    /// Access the `agent` resource from its dot-joined full name.
316    pub fn agent_from_full_name(&self, full_name: impl Into<String>) -> AgentClient {
317        AgentClient::from_full_name(
318            full_name,
319            crate::codegen::agents::AgentServiceClient::new(
320                self.client.clone(),
321                self.base_url.clone(),
322            ),
323        )
324    }
325    /// List catalogs
326    ///
327    /// Gets an array of catalogs in the metastore. If the caller is the metastore admin,
328    /// all catalogs will be retrieved. Otherwise, only catalogs owned by the caller
329    /// (or for which the caller has the USE_CATALOG privilege) will be retrieved.
330    /// There is no guarantee of a specific ordering of the elements in the array.
331    pub fn list_catalogs(&self) -> ListCatalogsBuilder {
332        ListCatalogsBuilder::new(crate::codegen::catalogs::CatalogServiceClient::new(
333            self.client.clone(),
334            self.base_url.clone(),
335        ))
336    }
337    /// Create a new catalog
338    ///
339    /// Creates a new catalog instance in the parent metastore if the caller
340    /// is a metastore admin or has the CREATE_CATALOG privilege.
341    ///
342    /// # Arguments
343    ///
344    /// * `name` - Name of catalog.
345    pub fn create_catalog(&self, name: impl Into<String>) -> CreateCatalogBuilder {
346        CreateCatalogBuilder::new(
347            crate::codegen::catalogs::CatalogServiceClient::new(
348                self.client.clone(),
349                self.base_url.clone(),
350            ),
351            name,
352        )
353    }
354    /// Access the `catalog` resource scoped to the given name.
355    pub fn catalog(&self, catalog_name: impl Into<String>) -> CatalogClient {
356        CatalogClient::new(
357            catalog_name,
358            crate::codegen::catalogs::CatalogServiceClient::new(
359                self.client.clone(),
360                self.base_url.clone(),
361            ),
362        )
363    }
364    pub fn list_credentials(&self) -> ListCredentialsBuilder {
365        ListCredentialsBuilder::new(crate::codegen::credentials::CredentialServiceClient::new(
366            self.client.clone(),
367            self.base_url.clone(),
368        ))
369    }
370    /// # Arguments
371    ///
372    /// * `name` - The credential name. The name must be unique among storage and service credentials within the metastore.
373    /// * `purpose` - Indicates the purpose of the credential.
374    pub fn create_credential(
375        &self,
376        name: impl Into<String>,
377        purpose: Purpose,
378    ) -> CreateCredentialBuilder {
379        CreateCredentialBuilder::new(
380            crate::codegen::credentials::CredentialServiceClient::new(
381                self.client.clone(),
382                self.base_url.clone(),
383            ),
384            name,
385            purpose,
386        )
387    }
388    /// Access the `credential` resource scoped to the given name.
389    pub fn credential(&self, credential_name: impl Into<String>) -> CredentialClient {
390        CredentialClient::new(
391            credential_name,
392            crate::codegen::credentials::CredentialServiceClient::new(
393                self.client.clone(),
394                self.base_url.clone(),
395            ),
396        )
397    }
398    /// List entity tag assignments
399    ///
400    /// Gets the tag assignments for the specified entity.
401    ///
402    /// # Arguments
403    ///
404    /// * `entity_type` - The type of the entity whose tag assignments to list.
405    /// * `entity_name` - The fully qualified name of the entity whose tag assignments to list.
406    pub fn list_entity_tag_assignments(
407        &self,
408        entity_type: impl Into<String>,
409        entity_name: impl Into<String>,
410    ) -> ListEntityTagAssignmentsBuilder {
411        ListEntityTagAssignmentsBuilder::new(
412            crate::codegen::entity_tag_assignments::EntityTagAssignmentClient::new(
413                self.client.clone(),
414                self.base_url.clone(),
415            ),
416            entity_type,
417            entity_name,
418        )
419    }
420    /// Create an entity tag assignment
421    ///
422    /// Assigns a tag to a Unity Catalog entity.
423    ///
424    /// # Arguments
425    ///
426    /// * `tag_assignment` - The tag assignment to create.
427    pub fn create_entity_tag_assignment(
428        &self,
429        tag_assignment: EntityTagAssignment,
430    ) -> CreateEntityTagAssignmentBuilder {
431        CreateEntityTagAssignmentBuilder::new(
432            crate::codegen::entity_tag_assignments::EntityTagAssignmentClient::new(
433                self.client.clone(),
434                self.base_url.clone(),
435            ),
436            tag_assignment,
437        )
438    }
439    /// Get an entity tag assignment
440    ///
441    /// Gets the tag assignment for the specified entity and tag key.
442    ///
443    /// # Arguments
444    ///
445    /// * `entity_type` - The type of the entity to which the tag is assigned.
446    /// * `entity_name` - The fully qualified name of the entity to which the tag is assigned.
447    /// * `tag_key` - The key of the tag.
448    pub fn get_entity_tag_assignment(
449        &self,
450        entity_type: impl Into<String>,
451        entity_name: impl Into<String>,
452        tag_key: impl Into<String>,
453    ) -> GetEntityTagAssignmentBuilder {
454        GetEntityTagAssignmentBuilder::new(
455            crate::codegen::entity_tag_assignments::EntityTagAssignmentClient::new(
456                self.client.clone(),
457                self.base_url.clone(),
458            ),
459            entity_type,
460            entity_name,
461            tag_key,
462        )
463    }
464    /// Update an entity tag assignment
465    ///
466    /// Updates the tag assignment for the specified entity and tag key.
467    ///
468    /// # Arguments
469    ///
470    /// * `entity_type` - The type of the entity to which the tag is assigned.
471    /// * `entity_name` - The fully qualified name of the entity to which the tag is assigned.
472    /// * `tag_key` - The key of the tag to update.
473    /// * `tag_assignment` - The tag assignment with the updated fields.
474    pub fn update_entity_tag_assignment(
475        &self,
476        entity_type: impl Into<String>,
477        entity_name: impl Into<String>,
478        tag_key: impl Into<String>,
479        tag_assignment: EntityTagAssignment,
480    ) -> UpdateEntityTagAssignmentBuilder {
481        UpdateEntityTagAssignmentBuilder::new(
482            crate::codegen::entity_tag_assignments::EntityTagAssignmentClient::new(
483                self.client.clone(),
484                self.base_url.clone(),
485            ),
486            entity_type,
487            entity_name,
488            tag_key,
489            tag_assignment,
490        )
491    }
492    /// Delete an entity tag assignment
493    ///
494    /// Deletes the tag assignment for the specified entity and tag key.
495    ///
496    /// # Arguments
497    ///
498    /// * `entity_type` - The type of the entity to which the tag is assigned.
499    /// * `entity_name` - The fully qualified name of the entity to which the tag is assigned.
500    /// * `tag_key` - The key of the tag to delete.
501    pub fn delete_entity_tag_assignment(
502        &self,
503        entity_type: impl Into<String>,
504        entity_name: impl Into<String>,
505        tag_key: impl Into<String>,
506    ) -> DeleteEntityTagAssignmentBuilder {
507        DeleteEntityTagAssignmentBuilder::new(
508            crate::codegen::entity_tag_assignments::EntityTagAssignmentClient::new(
509                self.client.clone(),
510                self.base_url.clone(),
511            ),
512            entity_type,
513            entity_name,
514            tag_key,
515        )
516    }
517    /// List external locations
518    pub fn list_external_locations(&self) -> ListExternalLocationsBuilder {
519        ListExternalLocationsBuilder::new(
520            crate::codegen::external_locations::ExternalLocationServiceClient::new(
521                self.client.clone(),
522                self.base_url.clone(),
523            ),
524        )
525    }
526    /// Create a new external location
527    ///
528    /// # Arguments
529    ///
530    /// * `name` - Name of external location.
531    /// * `url` - Path URL of the external location.
532    /// * `credential_name` - Name of the storage credential used with this location.
533    pub fn create_external_location(
534        &self,
535        name: impl Into<String>,
536        url: impl Into<String>,
537        credential_name: impl Into<String>,
538    ) -> CreateExternalLocationBuilder {
539        CreateExternalLocationBuilder::new(
540            crate::codegen::external_locations::ExternalLocationServiceClient::new(
541                self.client.clone(),
542                self.base_url.clone(),
543            ),
544            name,
545            url,
546            credential_name,
547        )
548    }
549    /// Access the `external_location` resource scoped to the given name.
550    pub fn external_location(
551        &self,
552        external_location_name: impl Into<String>,
553    ) -> ExternalLocationClient {
554        ExternalLocationClient::new(
555            external_location_name,
556            crate::codegen::external_locations::ExternalLocationServiceClient::new(
557                self.client.clone(),
558                self.base_url.clone(),
559            ),
560        )
561    }
562    /// List functions
563    ///
564    /// List functions within the specified parent catalog and schema. If the caller is the metastore
565    /// admin, all functions are returned in the response. Otherwise, the caller must have USE_CATALOG
566    /// on the parent catalog and USE_SCHEMA on the parent schema, and the function must either be
567    /// owned by the caller or have SELECT on the function.
568    ///
569    /// # Arguments
570    ///
571    /// * `catalog_name` - Name of parent catalog for functions of interest.
572    /// * `schema_name` - Parent schema of functions.
573    pub fn list_functions(
574        &self,
575        catalog_name: impl Into<String>,
576        schema_name: impl Into<String>,
577    ) -> ListFunctionsBuilder {
578        ListFunctionsBuilder::new(
579            crate::codegen::functions::FunctionServiceClient::new(
580                self.client.clone(),
581                self.base_url.clone(),
582            ),
583            catalog_name,
584            schema_name,
585        )
586    }
587    /// Create a function
588    ///
589    /// Creates a new function. The caller must be a metastore admin or have the CREATE_FUNCTION
590    /// privilege on the parent catalog and schema.
591    ///
592    /// # Arguments
593    ///
594    /// * `name` - Name of function, relative to parent schema.
595    /// * `catalog_name` - Name of parent catalog.
596    /// * `schema_name` - Name of parent schema.
597    /// * `data_type` - Full data type specification of the return type of the function.
598    /// * `full_data_type` - Full data type specification as SQL/catalogString text.
599    /// * `parameter_style` - The parameter-passing style.
600    /// * `is_deterministic` - Indicates whether the function is deterministic.
601    /// * `sql_data_access` - SQL data access information.
602    /// * `is_null_call` - Indicates whether the function is null-calling.
603    /// * `security_type` - The security type of the function.
604    /// * `routine_body` - The routine body.
605    pub fn create_function(
606        &self,
607        name: impl Into<String>,
608        catalog_name: impl Into<String>,
609        schema_name: impl Into<String>,
610        data_type: impl Into<String>,
611        full_data_type: impl Into<String>,
612        parameter_style: ParameterStyle,
613        is_deterministic: bool,
614        sql_data_access: SqlDataAccess,
615        is_null_call: bool,
616        security_type: SecurityType,
617        routine_body: RoutineBody,
618    ) -> CreateFunctionBuilder {
619        CreateFunctionBuilder::new(
620            crate::codegen::functions::FunctionServiceClient::new(
621                self.client.clone(),
622                self.base_url.clone(),
623            ),
624            name,
625            catalog_name,
626            schema_name,
627            data_type,
628            full_data_type,
629            parameter_style,
630            is_deterministic,
631            sql_data_access,
632            is_null_call,
633            security_type,
634            routine_body,
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 policies
665    ///
666    /// Gets an array of policies defined on the specified securable. There is no guarantee
667    /// of a specific ordering of the elements in the array.
668    ///
669    /// # Arguments
670    ///
671    /// * `on_securable_type` - The type of the securable to list policies on.
672    ///
673    /// Supported values: catalogs, schemas, tables.
674    /// * `on_securable_fullname` - The fully qualified name of the securable to list policies on.
675    pub fn list_policies(
676        &self,
677        on_securable_type: impl Into<String>,
678        on_securable_fullname: impl Into<String>,
679    ) -> ListPoliciesBuilder {
680        ListPoliciesBuilder::new(
681            crate::codegen::policies::PolicyServiceClient::new(
682                self.client.clone(),
683                self.base_url.clone(),
684            ),
685            on_securable_type,
686            on_securable_fullname,
687        )
688    }
689    /// Access the `policy` resource scoped to the given name.
690    pub fn policy(&self, policy_name: impl Into<String>) -> PolicyClient {
691        PolicyClient::new(
692            policy_name,
693            crate::codegen::policies::PolicyServiceClient::new(
694                self.client.clone(),
695                self.base_url.clone(),
696            ),
697        )
698    }
699    /// List providers.
700    pub fn list_providers(&self) -> ListProvidersBuilder {
701        ListProvidersBuilder::new(crate::codegen::providers::ProviderServiceClient::new(
702            self.client.clone(),
703            self.base_url.clone(),
704        ))
705    }
706    /// Create a new provider.
707    ///
708    /// # Arguments
709    ///
710    /// * `name` - Name of the provider.
711    /// * `authentication_type` - The delta sharing authentication type.
712    pub fn create_provider(
713        &self,
714        name: impl Into<String>,
715        authentication_type: ProviderAuthenticationType,
716    ) -> CreateProviderBuilder {
717        CreateProviderBuilder::new(
718            crate::codegen::providers::ProviderServiceClient::new(
719                self.client.clone(),
720                self.base_url.clone(),
721            ),
722            name,
723            authentication_type,
724        )
725    }
726    /// Access the `provider` resource scoped to the given name.
727    pub fn provider(&self, provider_name: impl Into<String>) -> ProviderClient {
728        ProviderClient::new(
729            provider_name,
730            crate::codegen::providers::ProviderServiceClient::new(
731                self.client.clone(),
732                self.base_url.clone(),
733            ),
734        )
735    }
736    /// List recipients.
737    pub fn list_recipients(&self) -> ListRecipientsBuilder {
738        ListRecipientsBuilder::new(crate::codegen::recipients::RecipientServiceClient::new(
739            self.client.clone(),
740            self.base_url.clone(),
741        ))
742    }
743    /// Create a new recipient.
744    ///
745    /// # Arguments
746    ///
747    /// * `name` - Name of the recipient.
748    /// * `authentication_type` - The delta sharing authentication type.
749    /// * `owner` - Username of the recipient owner.
750    pub fn create_recipient(
751        &self,
752        name: impl Into<String>,
753        authentication_type: AuthenticationType,
754        owner: impl Into<String>,
755    ) -> CreateRecipientBuilder {
756        CreateRecipientBuilder::new(
757            crate::codegen::recipients::RecipientServiceClient::new(
758                self.client.clone(),
759                self.base_url.clone(),
760            ),
761            name,
762            authentication_type,
763            owner,
764        )
765    }
766    /// Access the `recipient` resource scoped to the given name.
767    pub fn recipient(&self, recipient_name: impl Into<String>) -> RecipientClient {
768        RecipientClient::new(
769            recipient_name,
770            crate::codegen::recipients::RecipientServiceClient::new(
771                self.client.clone(),
772                self.base_url.clone(),
773            ),
774        )
775    }
776    /// Gets an array of schemas for a catalog in the metastore. If the caller is the metastore
777    /// admin or the owner of the parent catalog, all schemas for the catalog will be retrieved.
778    /// Otherwise, only schemas owned by the caller (or for which the caller has the USE_SCHEMA privilege)
779    /// will be retrieved. There is no guarantee of a specific ordering of the elements in the array.
780    ///
781    /// # Arguments
782    ///
783    /// * `catalog_name` - Name of parent catalog.
784    pub fn list_schemas(&self, catalog_name: impl Into<String>) -> ListSchemasBuilder {
785        ListSchemasBuilder::new(
786            crate::codegen::schemas::SchemaServiceClient::new(
787                self.client.clone(),
788                self.base_url.clone(),
789            ),
790            catalog_name,
791        )
792    }
793    /// Creates a new schema for catalog in the Metatastore. The caller must be a metastore admin,
794    /// or have the CREATE_SCHEMA privilege in the parent catalog.
795    ///
796    /// # Arguments
797    ///
798    /// * `name` - Name of schema, relative to parent catalog.
799    /// * `catalog_name` - Name of parent catalog.
800    pub fn create_schema(
801        &self,
802        name: impl Into<String>,
803        catalog_name: impl Into<String>,
804    ) -> CreateSchemaBuilder {
805        CreateSchemaBuilder::new(
806            crate::codegen::schemas::SchemaServiceClient::new(
807                self.client.clone(),
808                self.base_url.clone(),
809            ),
810            name,
811            catalog_name,
812        )
813    }
814    /// Access the `schema` resource scoped to the given name.
815    pub fn schema(
816        &self,
817        catalog_name: impl Into<String>,
818        schema_name: impl Into<String>,
819    ) -> SchemaClient {
820        SchemaClient::new(
821            catalog_name,
822            schema_name,
823            crate::codegen::schemas::SchemaServiceClient::new(
824                self.client.clone(),
825                self.base_url.clone(),
826            ),
827        )
828    }
829    /// Access the `schema` resource from its dot-joined full name.
830    pub fn schema_from_full_name(&self, full_name: impl Into<String>) -> SchemaClient {
831        SchemaClient::from_full_name(
832            full_name,
833            crate::codegen::schemas::SchemaServiceClient::new(
834                self.client.clone(),
835                self.base_url.clone(),
836            ),
837        )
838    }
839    /// List shares.
840    pub fn list_shares(&self) -> ListSharesBuilder {
841        ListSharesBuilder::new(crate::codegen::shares::ShareServiceClient::new(
842            self.client.clone(),
843            self.base_url.clone(),
844        ))
845    }
846    /// Create a new share.
847    ///
848    /// # Arguments
849    ///
850    /// * `name` - Name of the share.
851    pub fn create_share(&self, name: impl Into<String>) -> CreateShareBuilder {
852        CreateShareBuilder::new(
853            crate::codegen::shares::ShareServiceClient::new(
854                self.client.clone(),
855                self.base_url.clone(),
856            ),
857            name,
858        )
859    }
860    /// Access the `share` resource scoped to the given name.
861    pub fn share(&self, share_name: impl Into<String>) -> ShareClient {
862        ShareClient::new(
863            share_name,
864            crate::codegen::shares::ShareServiceClient::new(
865                self.client.clone(),
866                self.base_url.clone(),
867            ),
868        )
869    }
870    /// Creates a new staging table, allocating an immutable table id and a storage
871    /// location under the parent schema/catalog managed storage root. The caller
872    /// must have the CREATE privilege on the parent schema.
873    ///
874    /// # Arguments
875    ///
876    /// * `name` - Name of the staging table, relative to the parent schema.
877    /// * `catalog_name` - Name of the parent catalog.
878    /// * `schema_name` - Name of the parent schema relative to its parent catalog.
879    pub fn create_staging_table(
880        &self,
881        name: impl Into<String>,
882        catalog_name: impl Into<String>,
883        schema_name: impl Into<String>,
884    ) -> CreateStagingTableBuilder {
885        CreateStagingTableBuilder::new(
886            crate::codegen::staging_tables::StagingTableServiceClient::new(
887                self.client.clone(),
888                self.base_url.clone(),
889            ),
890            name,
891            catalog_name,
892            schema_name,
893        )
894    }
895    /// Access the `staging_table` resource scoped to the given name.
896    pub fn staging_table(&self, staging_table_name: impl Into<String>) -> StagingTableClient {
897        StagingTableClient::new(
898            staging_table_name,
899            crate::codegen::staging_tables::StagingTableServiceClient::new(
900                self.client.clone(),
901                self.base_url.clone(),
902            ),
903        )
904    }
905    /// Gets an array of summaries for tables for a schema and catalog within the metastore. The table summaries returned are either:
906    /// - summaries for tables (within the current metastore and parent catalog and schema), when the user is a metastore admin, or:
907    /// - summaries for tables and schemas (within the current metastore and parent catalog) for which the user has ownership or the
908    /// SELECT privilege on the table and ownership or USE_SCHEMA privilege on the schema, provided that the user also has ownership
909    /// or the USE_CATALOG privilege on the parent catalog.
910    ///
911    /// There is no guarantee of a specific ordering of the elements in the array.
912    ///
913    /// # Arguments
914    ///
915    /// * `catalog_name` - Name of parent catalog for tables of interest.
916    pub fn list_table_summaries(
917        &self,
918        catalog_name: impl Into<String>,
919    ) -> ListTableSummariesBuilder {
920        ListTableSummariesBuilder::new(
921            crate::codegen::tables::TableServiceClient::new(
922                self.client.clone(),
923                self.base_url.clone(),
924            ),
925            catalog_name,
926        )
927    }
928    /// Gets an array of all tables for the current metastore under the parent catalog and schema.
929    ///
930    /// The caller must be a metastore admin or an owner of (or have the SELECT privilege on) the table.
931    /// For the latter case, the caller must also be the owner or have the USE_CATALOG privilege on the
932    /// parent catalog and the USE_SCHEMA privilege on the parent schema. There is no guarantee of a
933    /// specific ordering of the elements in the array.
934    ///
935    /// # Arguments
936    ///
937    /// * `catalog_name` - Name of parent catalog for tables of interest.
938    /// * `schema_name` - Name of parent schema for tables of interest.
939    pub fn list_tables(
940        &self,
941        catalog_name: impl Into<String>,
942        schema_name: impl Into<String>,
943    ) -> ListTablesBuilder {
944        ListTablesBuilder::new(
945            crate::codegen::tables::TableServiceClient::new(
946                self.client.clone(),
947                self.base_url.clone(),
948            ),
949            catalog_name,
950            schema_name,
951        )
952    }
953    /// Create a table
954    ///
955    /// # Arguments
956    ///
957    /// * `name` - Name of table, relative to parent schema.
958    /// * `schema_name` - Name of parent schema relative to its parent catalog.
959    /// * `catalog_name` - Name of parent catalog.
960    pub fn create_table(
961        &self,
962        name: impl Into<String>,
963        schema_name: impl Into<String>,
964        catalog_name: impl Into<String>,
965        table_type: TableType,
966        data_source_format: DataSourceFormat,
967    ) -> CreateTableBuilder {
968        CreateTableBuilder::new(
969            crate::codegen::tables::TableServiceClient::new(
970                self.client.clone(),
971                self.base_url.clone(),
972            ),
973            name,
974            schema_name,
975            catalog_name,
976            table_type,
977            data_source_format,
978        )
979    }
980    /// Access the `table` resource scoped to the given name.
981    pub fn table(
982        &self,
983        catalog_name: impl Into<String>,
984        schema_name: impl Into<String>,
985        table_name: impl Into<String>,
986    ) -> TableClient {
987        TableClient::new(
988            catalog_name,
989            schema_name,
990            table_name,
991            crate::codegen::tables::TableServiceClient::new(
992                self.client.clone(),
993                self.base_url.clone(),
994            ),
995        )
996    }
997    /// Access the `table` resource from its dot-joined full name.
998    pub fn table_from_full_name(&self, full_name: impl Into<String>) -> TableClient {
999        TableClient::from_full_name(
1000            full_name,
1001            crate::codegen::tables::TableServiceClient::new(
1002                self.client.clone(),
1003                self.base_url.clone(),
1004            ),
1005        )
1006    }
1007    /// List tag policies
1008    ///
1009    /// Gets an array of tag policies. There is no guarantee of a specific ordering
1010    /// of the elements in the array.
1011    pub fn list_tag_policies(&self) -> ListTagPoliciesBuilder {
1012        ListTagPoliciesBuilder::new(crate::codegen::tag_policies::TagPolicyServiceClient::new(
1013            self.client.clone(),
1014            self.base_url.clone(),
1015        ))
1016    }
1017    /// Create a new tag policy
1018    ///
1019    /// Creates a new governed tag definition.
1020    ///
1021    /// # Arguments
1022    ///
1023    /// * `tag_policy` - The tag policy to create.
1024    pub fn create_tag_policy(&self, tag_policy: TagPolicy) -> CreateTagPolicyBuilder {
1025        CreateTagPolicyBuilder::new(
1026            crate::codegen::tag_policies::TagPolicyServiceClient::new(
1027                self.client.clone(),
1028                self.base_url.clone(),
1029            ),
1030            tag_policy,
1031        )
1032    }
1033    /// Access the `tag_policy` resource scoped to the given name.
1034    pub fn tag_policy(&self, tag_policy_name: impl Into<String>) -> TagPolicyClient {
1035        TagPolicyClient::new(
1036            tag_policy_name,
1037            crate::codegen::tag_policies::TagPolicyServiceClient::new(
1038                self.client.clone(),
1039                self.base_url.clone(),
1040            ),
1041        )
1042    }
1043    /// Generate a new set of credentials for a table.
1044    ///
1045    /// # Arguments
1046    ///
1047    /// * `table_id` - UUID of the table to read or write.
1048    /// * `operation` - The operation performed against the table data, either READ or READ_WRITE.
1049    /// If READ_WRITE is specified, the credentials returned will have write
1050    /// permissions, otherwise, it will be read only.
1051    pub fn generate_temporary_table_credentials(
1052        &self,
1053        table_id: impl Into<String>,
1054        operation: generate_temporary_table_credentials_request::Operation,
1055    ) -> GenerateTemporaryTableCredentialsBuilder {
1056        GenerateTemporaryTableCredentialsBuilder::new(
1057            crate::codegen::temporary_credentials::TemporaryCredentialClient::new(
1058                self.client.clone(),
1059                self.base_url.clone(),
1060            ),
1061            table_id,
1062            operation,
1063        )
1064    }
1065    /// Generate a new set of credentials for a path.
1066    ///
1067    /// # Arguments
1068    ///
1069    /// * `url` - URL for path-based access.
1070    /// * `operation` - The operation being performed on the path.
1071    pub fn generate_temporary_path_credentials(
1072        &self,
1073        url: impl Into<String>,
1074        operation: generate_temporary_path_credentials_request::Operation,
1075    ) -> GenerateTemporaryPathCredentialsBuilder {
1076        GenerateTemporaryPathCredentialsBuilder::new(
1077            crate::codegen::temporary_credentials::TemporaryCredentialClient::new(
1078                self.client.clone(),
1079                self.base_url.clone(),
1080            ),
1081            url,
1082            operation,
1083        )
1084    }
1085    /// Generate a new set of credentials for a volume.
1086    ///
1087    /// The metastore must have the `external_access_enabled` flag set to true
1088    /// (default false). The caller must have the `EXTERNAL_USE_SCHEMA`
1089    /// privilege on the parent schema (granted by a catalog owner).
1090    ///
1091    /// # Arguments
1092    ///
1093    /// * `volume_id` - UUID of the volume to read or write.
1094    /// * `operation` - The operation performed against the volume data, either READ_VOLUME or
1095    /// WRITE_VOLUME. If WRITE_VOLUME is specified, the credentials returned will
1096    /// have write permissions, otherwise, it will be read only.
1097    pub fn generate_temporary_volume_credentials(
1098        &self,
1099        volume_id: impl Into<String>,
1100        operation: generate_temporary_volume_credentials_request::Operation,
1101    ) -> GenerateTemporaryVolumeCredentialsBuilder {
1102        GenerateTemporaryVolumeCredentialsBuilder::new(
1103            crate::codegen::temporary_credentials::TemporaryCredentialClient::new(
1104                self.client.clone(),
1105                self.base_url.clone(),
1106            ),
1107            volume_id,
1108            operation,
1109        )
1110    }
1111    /// Lists volumes.
1112    ///
1113    /// # Arguments
1114    ///
1115    /// * `catalog_name` - The identifier of the catalog
1116    /// * `schema_name` - The identifier of the schema
1117    pub fn list_volumes(
1118        &self,
1119        catalog_name: impl Into<String>,
1120        schema_name: impl Into<String>,
1121    ) -> ListVolumesBuilder {
1122        ListVolumesBuilder::new(
1123            crate::codegen::volumes::VolumeServiceClient::new(
1124                self.client.clone(),
1125                self.base_url.clone(),
1126            ),
1127            catalog_name,
1128            schema_name,
1129        )
1130    }
1131    /// # Arguments
1132    ///
1133    /// * `catalog_name` - The identifier of the catalog
1134    /// * `schema_name` - The identifier of the schema
1135    /// * `name` - The identifier of the volume
1136    /// * `volume_type` - The type of the volume.
1137    ///
1138    /// An external volume is located in the specified external location.
1139    /// A managed volume is located in the default location which is specified
1140    /// by the parent schema, or the parent catalog, or the Metastore.
1141    pub fn create_volume(
1142        &self,
1143        catalog_name: impl Into<String>,
1144        schema_name: impl Into<String>,
1145        name: impl Into<String>,
1146        volume_type: VolumeType,
1147    ) -> CreateVolumeBuilder {
1148        CreateVolumeBuilder::new(
1149            crate::codegen::volumes::VolumeServiceClient::new(
1150                self.client.clone(),
1151                self.base_url.clone(),
1152            ),
1153            catalog_name,
1154            schema_name,
1155            name,
1156            volume_type,
1157        )
1158    }
1159    /// Access the `volume` resource scoped to the given name.
1160    pub fn volume(
1161        &self,
1162        catalog_name: impl Into<String>,
1163        schema_name: impl Into<String>,
1164        volume_name: impl Into<String>,
1165    ) -> VolumeClient {
1166        VolumeClient::new(
1167            catalog_name,
1168            schema_name,
1169            volume_name,
1170            crate::codegen::volumes::VolumeServiceClient::new(
1171                self.client.clone(),
1172                self.base_url.clone(),
1173            ),
1174        )
1175    }
1176    /// Access the `volume` resource from its dot-joined full name.
1177    pub fn volume_from_full_name(&self, full_name: impl Into<String>) -> VolumeClient {
1178        VolumeClient::from_full_name(
1179            full_name,
1180            crate::codegen::volumes::VolumeServiceClient::new(
1181                self.client.clone(),
1182                self.base_url.clone(),
1183            ),
1184        )
1185    }
1186}