Skip to main content

unitycatalog_client/codegen/external_locations/
resource.rs

1// @generated — do not edit by hand.
2#![allow(unused_imports)]
3use super::builders::*;
4use super::client::ExternalLocationServiceClient;
5use unitycatalog_common::models::external_locations::v1::*;
6/// A client scoped to a single `external_location`.
7#[derive(Clone)]
8pub struct ExternalLocationClient {
9    pub(crate) external_location_name: String,
10    pub(crate) client: ExternalLocationServiceClient,
11}
12impl ExternalLocationClient {
13    /// Create a client bound to the resource's name components.
14    pub fn new(
15        external_location_name: impl Into<String>,
16        client: ExternalLocationServiceClient,
17    ) -> Self {
18        Self {
19            external_location_name: external_location_name.into(),
20            client,
21        }
22    }
23    /// This resource's own name (the leaf component).
24    pub fn name(&self) -> &str {
25        &self.external_location_name
26    }
27    /// The fully-qualified name of this resource.
28    pub fn full_name(&self) -> String {
29        self.external_location_name.clone()
30    }
31    /// Get an external location
32    pub fn get(&self) -> GetExternalLocationBuilder {
33        GetExternalLocationBuilder::new(self.client.clone(), &self.external_location_name)
34    }
35    /// Update an external location
36    pub fn update(&self) -> UpdateExternalLocationBuilder {
37        UpdateExternalLocationBuilder::new(self.client.clone(), &self.external_location_name)
38    }
39    /// Delete an external location
40    pub fn delete(&self) -> DeleteExternalLocationBuilder {
41        DeleteExternalLocationBuilder::new(self.client.clone(), &self.external_location_name)
42    }
43}