#[non_exhaustive]pub struct ResourceHierarchy {
pub child_resource_type: String,
pub parent_resource_type: String,
pub parent_field_name: String,
pub parent_singular: Option<String>,
}Expand description
Describes one ancestor step in a managed resource’s parent chain, derived from
google.api.resource_reference { child_type } annotations on List request fields.
Entries in ServicePlan::hierarchy are ordered root-first (shallowest ancestor first),
so iterating them in order produces the correct param list for resource accessors (e.g.
["catalog_name", "schema_name"] for a Table, where catalog is depth 0 and schema depth 1).
Built during analysis via the cross-service global parent map and stored on ServicePlan.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.child_resource_type: StringThe service’s managed resource type string (e.g. "unitycatalog.io/Table").
Note: on flat APIs this equals the child_type annotation value, but the actual
resource type of the ancestor is parent_resource_type, which may differ.
parent_resource_type: StringThe actual resource type of the ancestor identified by parent_field_name
(e.g. "unitycatalog.io/Catalog" for the catalog_name field on ListTablesRequest).
This may differ from child_resource_type for grandparent fields on flat APIs
(e.g. catalog_name on ListTablesRequest has child_type = Table but the field
actually identifies a Catalog resource).
parent_field_name: StringThe proto field name carrying the ancestor identifier (e.g. "catalog_name").
parent_singular: Option<String>The singular name of the ancestor resource (e.g. "catalog"), resolved by stripping
"_name" from parent_field_name and matching against known resource descriptors.
None when the singular cannot be resolved.
Trait Implementations§
Source§impl Clone for ResourceHierarchy
impl Clone for ResourceHierarchy
Source§fn clone(&self) -> ResourceHierarchy
fn clone(&self) -> ResourceHierarchy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ResourceHierarchy
impl RefUnwindSafe for ResourceHierarchy
impl Send for ResourceHierarchy
impl Sync for ResourceHierarchy
impl Unpin for ResourceHierarchy
impl UnsafeUnpin for ResourceHierarchy
impl UnwindSafe for ResourceHierarchy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more