blob: 0cfce2d2077d519371516a12b015d2d7d6403b76 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.sys2;
using fuchsia.component;
/// A reference to a capability source or destination relative to this
/// component.
flexible union Ref {
1: ParentRef parent;
2: SelfRef self;
3: ChildRef child;
4: CollectionRef collection;
5: FrameworkRef framework;
/// A reference to a component’s parent instance.
struct ParentRef {
/// A reference to the component itself.
struct SelfRef {
/// A reference to one of the component's child instances.
struct ChildRef {
/// The name assigned to the child by its parent. If `collection` is set,
/// `name` is scoped to `collection` and the child is a dynamic instance.
/// Required. name;
/// The collection `name` belongs to. If omitted, `name` references a static
/// instance. This field must be omitted if the `ChildRef` is being used in
/// a component declaration. Optional. collection;
/// A reference to one of the component's collections.
struct CollectionRef { name;
/// A reference to the component framework itself.
struct FrameworkRef {