blob: 76c3fd48d08a3cbd1b0407b8f73087d394794f06 [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.component.test
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div>
## **PROTOCOLS**
## Builder {#Builder}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=136)*
### Build {#Builder.Build}
<p>Assembles the realm being constructed and returns the URL for the root
component in the realm, which may then be used to create a new component
in any collection where fuchsia-test-component is properly set up. Once
this is called, any Realm channels for the realm will no longer be
usable. The <code>runner</code> argument must be provided if the <code>AddLocalChild</code>
function has been used in this realm, as this runner channel will be
used to inform the client when to start and stop running any local
component implementations.</p>
<p>Errors:</p>
<ul>
<li><code>INVALID_COMPONENT_DECL</code>: A component declaration failed validaiton.</li>
<li><code>BUILD_ALREADY_CALLED</code>: The <code>Build</code> function has been called multiple
times on this channel.</li>
</ul>
#### Request {#Builder.Build_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>runner</code></td>
<td>
<code><a class='link' href='../fuchsia.component.runner/'>fuchsia.component.runner</a>/<a class='link' href='../fuchsia.component.runner/#ComponentRunner'>ComponentRunner</a></code>
</td>
</tr>
</table>
#### Response {#Builder.Build_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Builder_Build_Result'>Builder_Build_Result</a></code>
</td>
</tr>
</table>
## Realm {#Realm}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=356)*
### AddChild {#Realm.AddChild}
<p>Adds a component to the realm.</p>
<p>Errors:</p>
<ul>
<li><code>CHILD_ALREADY_EXISTS</code>: this realm already contains a child with the
given name.</li>
<li><code>INVALID_MANIFEST_EXTENSION</code>: <code>url</code> ends with <code>.cmx</code>, and thus should
be used with <code>AddLegacyChild</code> instead of <code>AddChild</code>.</li>
<li><code>DECL_NOT_FOUND</code>: The test package does not contain the component
declaration referenced by a relative URL.</li>
<li><code>DECL_READ_ERROR</code>: Encountered an I/O error when attempting to read a
component declaration referenced by a relative URL from the test
package.</li>
<li><code>BUILD_ALREADY_CALLED</code>: The <code>Builder.Build</code> function has been called
for this realm, and thus this <code>Realm</code> channel can no longer be used.</li>
</ul>
#### Request {#Realm.AddChild_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#child_name'>child_name</a></code>
</td>
</tr>
<tr>
<td><code>url</code></td>
<td>
<code><a class='link' href='../fuchsia.url/'>fuchsia.url</a>/<a class='link' href='../fuchsia.url/#Url'>Url</a></code>
</td>
</tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#ChildOptions'>ChildOptions</a></code>
</td>
</tr>
</table>
#### Response {#Realm.AddChild_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Realm_AddChild_Result'>Realm_AddChild_Result</a></code>
</td>
</tr>
</table>
### AddChildFromDecl {#Realm.AddChildFromDecl}
<p>Adds a component to this realm whose declaration is set to <code>decl</code>. When
launched, the component will share the test package as its package
directory, and may access any resources from it.</p>
<p>Errors:</p>
<ul>
<li><code>CHILD_ALREADY_EXISTS</code>: this realm already contains a child with the
given name.</li>
<li><code>INVALID_COMPONENT_DECL</code>: <code>decl</code> failed validation.</li>
<li><code>BUILD_ALREADY_CALLED</code>: The <code>Builder.Build</code> function has been called
for this realm, and thus this <code>Realm</code> channel can no longer be used.</li>
</ul>
#### Request {#Realm.AddChildFromDecl_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#child_name'>child_name</a></code>
</td>
</tr>
<tr>
<td><code>decl</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#Component'>Component</a></code>
</td>
</tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#ChildOptions'>ChildOptions</a></code>
</td>
</tr>
</table>
#### Response {#Realm.AddChildFromDecl_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Realm_AddChildFromDecl_Result'>Realm_AddChildFromDecl_Result</a></code>
</td>
</tr>
</table>
### AddChildRealm {#Realm.AddChildRealm}
<p>Adds a child realm which can be built with the client end of
<code>child_realm</code>.</p>
<p>Errors:</p>
<ul>
<li><code>CHILD_ALREADY_EXISTS</code>: this realm already contains a child with the
given name.</li>
<li><code>BUILD_ALREADY_CALLED</code>: The <code>Builder.Build</code> function has been called
for this realm, and thus this <code>Realm</code> channel can no longer be used.</li>
</ul>
#### Request {#Realm.AddChildRealm_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
</tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#ChildOptions'>ChildOptions</a></code>
</td>
</tr>
<tr>
<td><code>child_realm</code></td>
<td>
<code>server_end&lt;<a class='link' href='#Realm'>Realm</a>&gt;</code>
</td>
</tr>
</table>
#### Response {#Realm.AddChildRealm_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Realm_AddChildRealm_Result'>Realm_AddChildRealm_Result</a></code>
</td>
</tr>
</table>
### AddLegacyChild {#Realm.AddLegacyChild}
<p>Adds a <a href="https://fuchsia.dev/fuchsia-src/concepts/components/v1">legacy
component</a> to
the realm. When the component is launched, RealmBuilder will reach out
to appmgr to assist with launching the component, and the component will
be able to utilize all of the features of the legacy component
framework. Note that <em>only</em> protocol capabilities may be routed to this
component. Capabilities of any other type (such as a directory) are
unsupported for legacy components launched by RealmBuilder, and this
legacy component should instead use the CMX features to access things
such as storage.</p>
<p>Errors:</p>
<ul>
<li><code>CHILD_ALREADY_EXISTS</code>: this realm already contains a child with the
given name.</li>
<li><code>INVALID_MANIFEST_EXTENSION</code>: <code>url</code> does not end with <code>.cmx</code>, and thus
should be used with <code>AddChild</code> instead of <code>AddLegacyChild</code>.</li>
<li><code>BUILD_ALREADY_CALLED</code>: The <code>Builder.Build</code> function has been called
for this realm, and thus this <code>Realm</code> channel can no longer be used.</li>
</ul>
#### Request {#Realm.AddLegacyChild_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#child_name'>child_name</a></code>
</td>
</tr>
<tr>
<td><code>legacy_url</code></td>
<td>
<code><a class='link' href='../fuchsia.url/'>fuchsia.url</a>/<a class='link' href='../fuchsia.url/#Url'>Url</a></code>
</td>
</tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#ChildOptions'>ChildOptions</a></code>
</td>
</tr>
</table>
#### Response {#Realm.AddLegacyChild_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Realm_AddLegacyChild_Result'>Realm_AddLegacyChild_Result</a></code>
</td>
</tr>
</table>
### AddLocalChild {#Realm.AddLocalChild}
<p>Adds a component to the realm whose implementation will be provided by
the client. When this component should be started, the runner channel
passed into <code>Build</code> will receive a start request for a component whose
<code>ProgramDecl</code> contains the relative moniker from the root of the
constructed realm for the child that is to be run under the <code>program</code>
key <code>LOCAL_COMPONENT_NAME</code>.</p>
<p>Errors:</p>
<ul>
<li><code>CHILD_ALREADY_EXISTS</code>: this realm already contains a child with the
given name.</li>
<li><code>BUILD_ALREADY_CALLED</code>: The <code>Builder.Build</code> function has been called
for this realm, and thus this <code>Realm</code> channel can no longer be used.</li>
</ul>
#### Request {#Realm.AddLocalChild_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#child_name'>child_name</a></code>
</td>
</tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#ChildOptions'>ChildOptions</a></code>
</td>
</tr>
</table>
#### Response {#Realm.AddLocalChild_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Realm_AddLocalChild_Result'>Realm_AddLocalChild_Result</a></code>
</td>
</tr>
</table>
### AddRoute {#Realm.AddRoute}
<p>Mutates component manifests in the realm such that every component in
<code>to</code> will have a valid capability route for each item in <code>capabilities</code>
provided by <code>from</code>.</p>
<p>Errors:</p>
<ul>
<li><code>NO_SUCH_SOURCE</code>: <code>from</code> references a non-existent child.</li>
<li><code>NO_SUCH_TARGET</code>: <code>to</code> references a non-existent child.</li>
<li><code>CAPABILITIES_EMPTY</code>: <code>capabilities</code> is empty.</li>
<li><code>TARGETS_EMPTY</code>: <code>to</code> is empty.</li>
<li><code>SOURCE_AND_TARGET_MATCH</code>: <code>from</code> is equal to one of the elements in
<code>to</code>.</li>
<li><code>INVALID_COMPONENT_DECL</code>: The requested route caused one of the
involved manifests to fail validation.</li>
<li><code>BUILD_ALREADY_CALLED</code>: The <code>Builder.Build</code> function has been called
for this realm, and thus this <code>Realm</code> channel can no longer be used.</li>
</ul>
#### Request {#Realm.AddRoute_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>capabilities</code></td>
<td>
<code>vector&lt;<a class='link' href='#Capability'>Capability</a>&gt;</code>
</td>
</tr>
<tr>
<td><code>from</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#Ref'>Ref</a></code>
</td>
</tr>
<tr>
<td><code>to</code></td>
<td>
<code>vector&lt;<a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#Ref'>Ref</a>&gt;</code>
</td>
</tr>
</table>
#### Response {#Realm.AddRoute_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Realm_AddRoute_Result'>Realm_AddRoute_Result</a></code>
</td>
</tr>
</table>
### GetComponentDecl {#Realm.GetComponentDecl}
<p>Returns the component decl for the given component. <code>name</code> must refer to
a component that is one of the following:</p>
<ul>
<li>A component with a local implementation</li>
<li>A legacy component</li>
<li>A component added with a relative URL</li>
<li>An automatically generated realm (ex: the root)</li>
</ul>
<p>Errors:</p>
<ul>
<li><code>NO_SUCH_CHILD</code>: This realm does not contain a child with the given
name.</li>
<li><code>CHILD_DECL_NOT_VISIBLE</code>: The component decl cannot be fetched for
the referenced child, because the child was added to the realm using
an absolute (not-relative) and modern (not legacy) URL.</li>
<li><code>BUILD_ALREADY_CALLED</code>: The <code>Builder.Build</code> function has been called
for this realm, and thus this <code>Realm</code> channel can no longer be used.</li>
</ul>
#### Request {#Realm.GetComponentDecl_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#child_name'>child_name</a></code>
</td>
</tr>
</table>
#### Response {#Realm.GetComponentDecl_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Realm_GetComponentDecl_Result'>Realm_GetComponentDecl_Result</a></code>
</td>
</tr>
</table>
### GetRealmDecl {#Realm.GetRealmDecl}
<p>Returns the component decl for this realm.</p>
<p>Errors:</p>
<ul>
<li><code>BUILD_ALREADY_CALLED</code>: The <code>Builder.Build</code> function has been called
for this realm, and thus this <code>Realm</code> channel can no longer be used.</li>
</ul>
#### Request {#Realm.GetRealmDecl_Request}
&lt;EMPTY&gt;
#### Response {#Realm.GetRealmDecl_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Realm_GetRealmDecl_Result'>Realm_GetRealmDecl_Result</a></code>
</td>
</tr>
</table>
### InitMutableConfigFromPackage {#Realm.InitMutableConfigFromPackage}
<p>Load any packaged configuration for <code>name</code> before using values provided to
the builder.</p>
<p>Allows calling <code>SetConfigValue</code> to override packaged configuration.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 9</span></div>
#### Request {#Realm.InitMutableConfigFromPackage_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
</tr>
</table>
#### Response {#Realm.InitMutableConfigFromPackage_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Realm_InitMutableConfigFromPackage_Result'>Realm_InitMutableConfigFromPackage_Result</a></code>
</td>
</tr>
</table>
### InitMutableConfigToEmpty {#Realm.InitMutableConfigToEmpty}
<p>Use only values provided to the builder for <code>name</code>'s configuration.</p>
<p>Allows calling <code>SetConfigValue</code> to provide configuration.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 9</span></div>
#### Request {#Realm.InitMutableConfigToEmpty_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
</tr>
</table>
#### Response {#Realm.InitMutableConfigToEmpty_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Realm_InitMutableConfigToEmpty_Result'>Realm_InitMutableConfigToEmpty_Result</a></code>
</td>
</tr>
</table>
### ReadOnlyDirectory {#Realm.ReadOnlyDirectory}
<p>Offers a directory capability to a component in this realm. The
directory will be read-only (i.e. have <code>r*</code> rights), and will have the
contents described in <code>directory_contents</code>.</p>
<p>Errors:</p>
<ul>
<li><code>NO_SUCH_TARGET</code>: <code>offer-to</code> references a non-existent child.</li>
<li><code>BUILD_ALREADY_CALLED</code>: The <code>Builder.Build</code> function has been called
for this realm, and thus this <code>Realm</code> channel can no longer be used.</li>
</ul>
#### Request {#Realm.ReadOnlyDirectory_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
</tr>
<tr>
<td><code>to</code></td>
<td>
<code>vector&lt;<a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#Ref'>Ref</a>&gt;</code>
</td>
</tr>
<tr>
<td><code>directory_contents</code></td>
<td>
<code><a class='link' href='#DirectoryContents'>DirectoryContents</a></code>
</td>
</tr>
</table>
#### Response {#Realm.ReadOnlyDirectory_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Realm_ReadOnlyDirectory_Result'>Realm_ReadOnlyDirectory_Result</a></code>
</td>
</tr>
</table>
### ReplaceComponentDecl {#Realm.ReplaceComponentDecl}
<p>Replaces the component decl for the given component. <code>name</code> must
refer to a component that is one of the following:</p>
<ul>
<li>A component with a local implementation</li>
<li>A legacy component</li>
<li>A component added with a relative URL</li>
<li>An automatically generated realm (ex: the root)</li>
</ul>
<p>Errors:</p>
<ul>
<li><code>NO_SUCH_CHILD</code>: This realm does not contain a child with the given
name.</li>
<li><code>CHILD_ALREADY_EXISTS</code>: The component whose decl is being replaced has
had a child added to it through realm builder with the same name as an
element in <code>component_decl.children</code>.</li>
<li><code>CHILD_DECL_NOT_VISIBLE</code>: The component decl cannot be manipulated for
the referenced child, because the child was added to the realm using
an absolute (not relative) and modern (not legacy) URL.</li>
<li><code>INVALID_COMPONENT_DECL</code>: <code>component_decl</code> failed validation.</li>
<li><code>BUILD_ALREADY_CALLED</code>: The <code>Builder.Build</code> function has been called
for this realm, and thus this <code>Realm</code> channel can no longer be used.</li>
</ul>
#### Request {#Realm.ReplaceComponentDecl_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#child_name'>child_name</a></code>
</td>
</tr>
<tr>
<td><code>component_decl</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#Component'>Component</a></code>
</td>
</tr>
</table>
#### Response {#Realm.ReplaceComponentDecl_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Realm_ReplaceComponentDecl_Result'>Realm_ReplaceComponentDecl_Result</a></code>
</td>
</tr>
</table>
### ReplaceConfigValue {#Realm.ReplaceConfigValue}
#### Request {#Realm.ReplaceConfigValue_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
</tr>
<tr>
<td><code>key</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#ConfigKey'>ConfigKey</a></code>
</td>
</tr>
<tr>
<td><code>value</code></td>
<td>
<code><a class='link' href='../fuchsia.component.config/'>fuchsia.component.config</a>/<a class='link' href='../fuchsia.component.config/#ValueSpec'>ValueSpec</a></code>
</td>
</tr>
</table>
#### Response {#Realm.ReplaceConfigValue_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Realm_ReplaceConfigValue_Result'>Realm_ReplaceConfigValue_Result</a></code>
</td>
</tr>
</table>
### ReplaceRealmDecl {#Realm.ReplaceRealmDecl}
<p>Replaces the component decl for this realm.</p>
<p>Errors:</p>
<ul>
<li><code>INVALID_COMPONENT_DECL</code>: <code>component_decl</code> failed validation.</li>
<li><code>BUILD_ALREADY_CALLED</code>: The <code>Builder.Build</code> function has been called
for this realm, and thus this <code>Realm</code> channel can no longer be used.</li>
</ul>
#### Request {#Realm.ReplaceRealmDecl_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>component_decl</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#Component'>Component</a></code>
</td>
</tr>
</table>
#### Response {#Realm.ReplaceRealmDecl_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Realm_ReplaceRealmDecl_Result'>Realm_ReplaceRealmDecl_Result</a></code>
</td>
</tr>
</table>
### SetConfigValue {#Realm.SetConfigValue}
<p>Sets the configuration value for a field specified by <code>key</code>.
The component specified must have a config schema with this field.
The value must conform to all constraints as defined by the schema.</p>
<p>This method must be called after either <code>InitMutableConfigFromPackage</code> or
<code>InitMutableConfigToEmpty</code>.</p>
<p>Errors:</p>
<ul>
<li><code>NO_CONFIG_SCHEMA</code>: component does not have a config schema</li>
<li><code>NO_SUCH_CONFIG_FIELD</code>: <code>key</code> could not be found in component's config schema</li>
<li><code>CONFIG_VALUE_INVALID</code>: <code>value</code> does not meet config schema constraints</li>
</ul>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 9</span></div>
#### Request {#Realm.SetConfigValue_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
</tr>
<tr>
<td><code>key</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#ConfigKey'>ConfigKey</a></code>
</td>
</tr>
<tr>
<td><code>value</code></td>
<td>
<code><a class='link' href='../fuchsia.component.config/'>fuchsia.component.config</a>/<a class='link' href='../fuchsia.component.config/#ValueSpec'>ValueSpec</a></code>
</td>
</tr>
</table>
#### Response {#Realm.SetConfigValue_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Realm_SetConfigValue_Result'>Realm_SetConfigValue_Result</a></code>
</td>
</tr>
</table>
## RealmBuilderFactory {#RealmBuilderFactory}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=25)*
<p>This protocol can be used to instruct the Realm Builder Server to begin
creating a new realm.</p>
### Create {#RealmBuilderFactory.Create}
<p>Creates a new RealmBuilder. The client end of <code>realm_server_end</code> can be
used to mutate the realm that is being constructed, by doing things such
as adding new children to the realm or adding capability routes between
them. The client end of <code>builder_server_end</code> is used to finalize the
realm, after which point it can be launched in a collection.</p>
#### Request {#RealmBuilderFactory.Create_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>pkg_dir_handle</code></td>
<td>
<code><a class='link' href='../fuchsia.io/'>fuchsia.io</a>/<a class='link' href='../fuchsia.io/#Directory'>Directory</a></code>
</td>
</tr>
<tr>
<td><code>realm_server_end</code></td>
<td>
<code>server_end&lt;<a class='link' href='#Realm'>Realm</a>&gt;</code>
</td>
</tr>
<tr>
<td><code>builder_server_end</code></td>
<td>
<code>server_end&lt;<a class='link' href='#Builder'>Builder</a>&gt;</code>
</td>
</tr>
</table>
#### Response {#RealmBuilderFactory.Create_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#RealmBuilderFactory_Create_Result'>RealmBuilderFactory_Create_Result</a></code>
</td>
</tr>
</table>
### CreateFromRelativeUrl {#RealmBuilderFactory.CreateFromRelativeUrl}
<p>Identical to <code>Create</code>, but instead of the realm being empty by default
it contains the contents of the manifest located at <code>relative_url</code>
within <code>pkg_dir_handle</code>.</p>
#### Request {#RealmBuilderFactory.CreateFromRelativeUrl_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>pkg_dir_handle</code></td>
<td>
<code><a class='link' href='../fuchsia.io/'>fuchsia.io</a>/<a class='link' href='../fuchsia.io/#Directory'>Directory</a></code>
</td>
</tr>
<tr>
<td><code>relative_url</code></td>
<td>
<code><a class='link' href='../fuchsia.url/'>fuchsia.url</a>/<a class='link' href='../fuchsia.url/#Url'>Url</a></code>
</td>
</tr>
<tr>
<td><code>realm_server_end</code></td>
<td>
<code>server_end&lt;<a class='link' href='#Realm'>Realm</a>&gt;</code>
</td>
</tr>
<tr>
<td><code>builder_server_end</code></td>
<td>
<code>server_end&lt;<a class='link' href='#Builder'>Builder</a>&gt;</code>
</td>
</tr>
</table>
#### Response {#RealmBuilderFactory.CreateFromRelativeUrl_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#RealmBuilderFactory_CreateFromRelativeUrl_Result'>RealmBuilderFactory_CreateFromRelativeUrl_Result</a></code>
</td>
</tr>
</table>
## **STRUCTS**
### Builder_Build_Response {#Builder_Build_Response data-text="Builder_Build_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=152)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Builder_Build_Response.root_component_url">
<td><code>root_component_url</code></td>
<td>
<code>string[4096]</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### DirectoryContents [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#DirectoryContents data-text="DirectoryContents"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=342)*
<p>The contents of a directory that should be provided by the realm builder
server.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="DirectoryContents.entries">
<td><code>entries</code></td>
<td>
<code>vector&lt;<a class='link' href='#DirectoryEntry'>DirectoryEntry</a>&gt;[1024]</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### DirectoryEntry [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#DirectoryEntry data-text="DirectoryEntry"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=347)*
<p>An entry in a directory.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="DirectoryEntry.file_path">
<td><code>file_path</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
<td><p>The path to the file. Valid examples include <code>foo.txt</code> and
<code>foo/bar.json</code>.</p>
</td>
<td>No default</td>
</tr>
<tr id="DirectoryEntry.file_contents">
<td><code>file_contents</code></td>
<td>
<code><a class='link' href='../fuchsia.mem/'>fuchsia.mem</a>/<a class='link' href='../fuchsia.mem/#Buffer'>Buffer</a></code>
</td>
<td><p>The contents of the file.</p>
</td>
<td>No default</td>
</tr>
</table>
### RealmBuilderFactory_CreateFromRelativeUrl_Response {#RealmBuilderFactory_CreateFromRelativeUrl_Response data-text="RealmBuilderFactory_CreateFromRelativeUrl_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=45)*
&lt;EMPTY&gt;
### RealmBuilderFactory_Create_Response {#RealmBuilderFactory_Create_Response data-text="RealmBuilderFactory_Create_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=35)*
&lt;EMPTY&gt;
### Realm_AddChildFromDecl_Response {#Realm_AddChildFromDecl_Response data-text="Realm_AddChildFromDecl_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=430)*
&lt;EMPTY&gt;
### Realm_AddChildRealm_Response {#Realm_AddChildRealm_Response data-text="Realm_AddChildRealm_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=470)*
&lt;EMPTY&gt;
### Realm_AddChild_Response {#Realm_AddChild_Response data-text="Realm_AddChild_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=380)*
&lt;EMPTY&gt;
### Realm_AddLegacyChild_Response {#Realm_AddLegacyChild_Response data-text="Realm_AddLegacyChild_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=409)*
&lt;EMPTY&gt;
### Realm_AddLocalChild_Response {#Realm_AddLocalChild_Response data-text="Realm_AddLocalChild_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=450)*
&lt;EMPTY&gt;
### Realm_AddRoute_Response {#Realm_AddRoute_Response data-text="Realm_AddRoute_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=567)*
&lt;EMPTY&gt;
### Realm_GetComponentDecl_Response {#Realm_GetComponentDecl_Response data-text="Realm_GetComponentDecl_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=491)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Realm_GetComponentDecl_Response.component_decl">
<td><code>component_decl</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#Component'>Component</a></code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### Realm_GetRealmDecl_Response {#Realm_GetRealmDecl_Response data-text="Realm_GetRealmDecl_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=528)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Realm_GetRealmDecl_Response.component_decl">
<td><code>component_decl</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#Component'>Component</a></code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### Realm_InitMutableConfigFromPackage_Response {#Realm_InitMutableConfigFromPackage_Response data-text="Realm_InitMutableConfigFromPackage_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=595)*
&lt;EMPTY&gt;
### Realm_InitMutableConfigToEmpty_Response {#Realm_InitMutableConfigToEmpty_Response data-text="Realm_InitMutableConfigToEmpty_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=603)*
&lt;EMPTY&gt;
### Realm_ReadOnlyDirectory_Response {#Realm_ReadOnlyDirectory_Response data-text="Realm_ReadOnlyDirectory_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=586)*
&lt;EMPTY&gt;
### Realm_ReplaceComponentDecl_Response {#Realm_ReplaceComponentDecl_Response data-text="Realm_ReplaceComponentDecl_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=521)*
&lt;EMPTY&gt;
### Realm_ReplaceConfigValue_Response {#Realm_ReplaceConfigValue_Response data-text="Realm_ReplaceConfigValue_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=610)*
&lt;EMPTY&gt;
### Realm_ReplaceRealmDecl_Response {#Realm_ReplaceRealmDecl_Response data-text="Realm_ReplaceRealmDecl_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=541)*
&lt;EMPTY&gt;
### Realm_SetConfigValue_Response {#Realm_SetConfigValue_Response data-text="Realm_SetConfigValue_Response"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=633)*
&lt;EMPTY&gt;
## **ENUMS**
### RealmBuilderError [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#RealmBuilderError data-text="RealmBuilderError"}
Type: <code>uint32</code>
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=52)*
<p>Errors that may be returned by the <code>Realm</code> and <code>Builder</code> protocols.</p>
<p>Will be renamed to <code>RealmBuilderError</code> once the other definition under this
name earlier in this file is removed.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="RealmBuilderError.CHILD_ALREADY_EXISTS">
<td><h3 id="RealmBuilderError.CHILD_ALREADY_EXISTS" class="add-link hide-from-toc">CHILD_ALREADY_EXISTS</h3></td>
<td><code>0</code></td>
<td><p>Child cannot be added to the realm, as there is already a child in the
realm with that name.</p>
</td>
</tr>
<tr id="RealmBuilderError.INVALID_MANIFEST_EXTENSION">
<td><h3 id="RealmBuilderError.INVALID_MANIFEST_EXTENSION" class="add-link hide-from-toc">INVALID_MANIFEST_EXTENSION</h3></td>
<td><code>1</code></td>
<td><p>A legacy component URL was given to <code>AddChild</code>, or a modern component
url was given to <code>AddLegacyChild</code>.</p>
</td>
</tr>
<tr id="RealmBuilderError.INVALID_COMPONENT_DECL">
<td><h3 id="RealmBuilderError.INVALID_COMPONENT_DECL" class="add-link hide-from-toc">INVALID_COMPONENT_DECL</h3></td>
<td><code>2</code></td>
<td><p>A component declaration failed validation.</p>
</td>
</tr>
<tr id="RealmBuilderError.NO_SUCH_CHILD">
<td><h3 id="RealmBuilderError.NO_SUCH_CHILD" class="add-link hide-from-toc">NO_SUCH_CHILD</h3></td>
<td><code>3</code></td>
<td><p>The referenced child does not exist.</p>
</td>
</tr>
<tr id="RealmBuilderError.CHILD_DECL_NOT_VISIBLE">
<td><h3 id="RealmBuilderError.CHILD_DECL_NOT_VISIBLE" class="add-link hide-from-toc">CHILD_DECL_NOT_VISIBLE</h3></td>
<td><code>4</code></td>
<td><p>The component declaration for the referenced child cannot be viewed nor
manipulated by RealmBuilder, because the child was added to the realm
using an URL that was neither a relative nor a legacy URL.</p>
</td>
</tr>
<tr id="RealmBuilderError.NO_SUCH_SOURCE">
<td><h3 id="RealmBuilderError.NO_SUCH_SOURCE" class="add-link hide-from-toc">NO_SUCH_SOURCE</h3></td>
<td><code>5</code></td>
<td><p>The source does not exist.</p>
</td>
</tr>
<tr id="RealmBuilderError.NO_SUCH_TARGET">
<td><h3 id="RealmBuilderError.NO_SUCH_TARGET" class="add-link hide-from-toc">NO_SUCH_TARGET</h3></td>
<td><code>6</code></td>
<td><p>A target does not exist.</p>
</td>
</tr>
<tr id="RealmBuilderError.CAPABILITIES_EMPTY">
<td><h3 id="RealmBuilderError.CAPABILITIES_EMPTY" class="add-link hide-from-toc">CAPABILITIES_EMPTY</h3></td>
<td><code>7</code></td>
<td><p>The <code>capabilities</code> field is empty.</p>
</td>
</tr>
<tr id="RealmBuilderError.TARGETS_EMPTY">
<td><h3 id="RealmBuilderError.TARGETS_EMPTY" class="add-link hide-from-toc">TARGETS_EMPTY</h3></td>
<td><code>8</code></td>
<td><p>The <code>targets</code> field is empty.</p>
</td>
</tr>
<tr id="RealmBuilderError.SOURCE_AND_TARGET_MATCH">
<td><h3 id="RealmBuilderError.SOURCE_AND_TARGET_MATCH" class="add-link hide-from-toc">SOURCE_AND_TARGET_MATCH</h3></td>
<td><code>9</code></td>
<td><p>The <code>from</code> value is equal to one of the elements in <code>to</code>.</p>
</td>
</tr>
<tr id="RealmBuilderError.DECL_NOT_FOUND">
<td><h3 id="RealmBuilderError.DECL_NOT_FOUND" class="add-link hide-from-toc">DECL_NOT_FOUND</h3></td>
<td><code>10</code></td>
<td><p>The test package does not contain the component declaration referenced
by a relative URL.</p>
</td>
</tr>
<tr id="RealmBuilderError.DECL_READ_ERROR">
<td><h3 id="RealmBuilderError.DECL_READ_ERROR" class="add-link hide-from-toc">DECL_READ_ERROR</h3></td>
<td><code>11</code></td>
<td><p>Encountered an I/O error when attempting to read a component declaration
referenced by a relative URL from the test package.</p>
</td>
</tr>
<tr id="RealmBuilderError.BUILD_ALREADY_CALLED">
<td><h3 id="RealmBuilderError.BUILD_ALREADY_CALLED" class="add-link hide-from-toc">BUILD_ALREADY_CALLED</h3></td>
<td><code>12</code></td>
<td><p>The <code>Build</code> function has been called multiple times on this channel.</p>
</td>
</tr>
<tr id="RealmBuilderError.CAPABILITY_INVALID">
<td><h3 id="RealmBuilderError.CAPABILITY_INVALID" class="add-link hide-from-toc">CAPABILITY_INVALID</h3></td>
<td><code>13</code></td>
<td><p>A capability is invalid. This may occur if a required field is empty or
if an unsupported type is received.</p>
</td>
</tr>
<tr id="RealmBuilderError.INVALID_CHILD_REALM_HANDLE">
<td><h3 id="RealmBuilderError.INVALID_CHILD_REALM_HANDLE" class="add-link hide-from-toc">INVALID_CHILD_REALM_HANDLE</h3></td>
<td><code>14</code></td>
<td><p>The handle the client provided for the child realm is not usable.</p>
</td>
</tr>
<tr id="RealmBuilderError.IMMUTABLE_PROGRAM">
<td><h3 id="RealmBuilderError.IMMUTABLE_PROGRAM" class="add-link hide-from-toc">IMMUTABLE_PROGRAM</h3></td>
<td><code>15</code></td>
<td><p><code>ReplaceComponentDecl</code> was called on a legacy or local component with a
program declaration that did not match the one from the old component
declaration. This could render a legacy or local component
non-functional, and is disallowed.</p>
</td>
</tr>
<tr id="RealmBuilderError.URL_IS_NOT_RELATIVE">
<td><h3 id="RealmBuilderError.URL_IS_NOT_RELATIVE" class="add-link hide-from-toc">URL_IS_NOT_RELATIVE</h3></td>
<td><code>16</code></td>
<td><p>The URL provided to <code>RealmBuilderFactory.CreateFromRelativeURL</code> is not a
relative URL.</p>
</td>
</tr>
<tr id="RealmBuilderError.INVALID_PKG_DIR_HANDLE">
<td><h3 id="RealmBuilderError.INVALID_PKG_DIR_HANDLE" class="add-link hide-from-toc">INVALID_PKG_DIR_HANDLE</h3></td>
<td><code>17</code></td>
<td><p>The handle the client provided for the test's pkg directory is not
usable.</p>
</td>
</tr>
<tr id="RealmBuilderError.NO_CONFIG_SCHEMA">
<td><h3 id="RealmBuilderError.NO_CONFIG_SCHEMA" class="add-link hide-from-toc">NO_CONFIG_SCHEMA</h3></td>
<td><code>18</code></td>
<td><p>The component does not have a config schema defined. Attempting to
set a config value is not allowed.</p>
</td>
</tr>
<tr id="RealmBuilderError.NO_SUCH_CONFIG_FIELD">
<td><h3 id="RealmBuilderError.NO_SUCH_CONFIG_FIELD" class="add-link hide-from-toc">NO_SUCH_CONFIG_FIELD</h3></td>
<td><code>19</code></td>
<td><p>The component's config schema does not have a field with that name.</p>
</td>
</tr>
<tr id="RealmBuilderError.CONFIG_VALUE_INVALID">
<td><h3 id="RealmBuilderError.CONFIG_VALUE_INVALID" class="add-link hide-from-toc">CONFIG_VALUE_INVALID</h3></td>
<td><code>20</code></td>
<td><p>A config value is invalid. This may mean a type mismatch or an issue
with constraints like string/vector length.</p>
</td>
</tr>
<tr id="RealmBuilderError.CONFIG_OVERRIDE_UNSUPPORTED">
<td><h3 id="RealmBuilderError.CONFIG_OVERRIDE_UNSUPPORTED" class="add-link hide-from-toc">CONFIG_OVERRIDE_UNSUPPORTED</h3></td>
<td><code>21</code></td>
<td><p>A config value cannot be set because the realm has not chosen its override
policy.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 9</span></div>
</td>
</tr>
</table>
## **TABLES**
### ChildOptions {#ChildOptions data-text="ChildOptions"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=322)*
<p>Properties that may be set on a child when it is added to a realm.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="ChildOptions.startup">
<td><h3 id="ChildOptions.startup" class="add-link hide-from-toc">1</h3></td>
<td><code>startup</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#StartupMode'>StartupMode</a></code>
</td>
<td><p>For information on this type, see
https://fuchsia.dev/go/components/declaration#StartupMode.
Defaults to <code>LAZY</code>.</p>
</td>
</tr>
<tr id="ChildOptions.environment">
<td><h3 id="ChildOptions.environment" class="add-link hide-from-toc">2</h3></td>
<td><code>environment</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
<td><p>Specify a custom environment for the child to run under.</p>
</td>
</tr>
<tr id="ChildOptions.on_terminate">
<td><h3 id="ChildOptions.on_terminate" class="add-link hide-from-toc">3</h3></td>
<td><code>on_terminate</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#OnTerminate'>OnTerminate</a></code>
</td>
<td><p>For information on this type, see
https://fuchsia.dev/go/components/declaration#OnTerminate.
Defaults to <code>NONE</code>.</p>
</td>
</tr>
</table>
### Directory {#Directory data-text="Directory"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=202)*
<p>A directory capability.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="Directory.name">
<td><h3 id="Directory.name" class="add-link hide-from-toc">1</h3></td>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
<td><p>The name of the capability. This is not the path of the directory.
Instead it is a name used for routing.</p>
</td>
</tr>
<tr id="Directory.as">
<td><h3 id="Directory.as" class="add-link hide-from-toc">2</h3></td>
<td><code>as</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
<td><p>A rename of the capability, which can be set when routing to another
component. This field is optional.</p>
</td>
</tr>
<tr id="Directory.type">
<td><h3 id="Directory.type" class="add-link hide-from-toc">3</h3></td>
<td><code>type</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#DependencyType'>DependencyType</a></code>
</td>
<td><p>For information on this type, see
https://fuchsia.dev/go/components/declaration#DependencyType.
This field is optional and defaults to <code>STRONG</code>.</p>
</td>
</tr>
<tr id="Directory.subdir">
<td><h3 id="Directory.subdir" class="add-link hide-from-toc">4</h3></td>
<td><code>subdir</code></td>
<td>
<code>string[1024]</code>
</td>
<td><p>The subdirectory of this directory to offer instead of the root. For
example, if you set <code>bar/baz</code> as the subdir of <code>foo</code>, then <code>bar/baz</code>
will be the root of the target's <code>foo</code>. This field is optional.</p>
</td>
</tr>
<tr id="Directory.rights">
<td><h3 id="Directory.rights" class="add-link hide-from-toc">5</h3></td>
<td><code>rights</code></td>
<td>
<code><a class='link' href='../fuchsia.io/'>fuchsia.io</a>/<a class='link' href='../fuchsia.io/#Rights'>Rights</a></code>
</td>
<td><p>The maximum rights that can be set by a component using this directory.
This field is required if it is being routed to a local component,
otherwise, it is optional.</p>
</td>
</tr>
<tr id="Directory.path">
<td><h3 id="Directory.path" class="add-link hide-from-toc">6</h3></td>
<td><code>path</code></td>
<td>
<code>string[1024]</code>
</td>
<td><p>The path in which to install the directory. The path should have a
leading slash but no trailing slash, e.g. <code>/config/data</code>. This field
is required.</p>
</td>
</tr>
<tr id="Directory.availability">
<td><h3 id="Directory.availability" class="add-link hide-from-toc">7</h3></td>
<td><code>availability</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#Availability'>Availability</a></code>
</td>
<td><p>Optional. Cannot be set to <code>SameAsTarget</code> if <code>to</code> contains a local
component.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 10</span></div>
</td>
</tr>
</table>
### Event {#Event data-text="Event"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=283)*
<p>An event capability</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="Event.name">
<td><h3 id="Event.name" class="add-link hide-from-toc">1</h3></td>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
<td><p>The name of the capability.</p>
</td>
</tr>
<tr id="Event.as">
<td><h3 id="Event.as" class="add-link hide-from-toc">2</h3></td>
<td><code>as</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
<td><p>A rename of the capability, which can be set when routing to another
component. This field is optional.</p>
</td>
</tr>
<tr id="Event.filter">
<td><h3 id="Event.filter" class="add-link hide-from-toc">3</h3></td>
<td><code>filter</code></td>
<td>
<code><a class='link' href='../fuchsia.data/'>fuchsia.data</a>/<a class='link' href='../fuchsia.data/#Dictionary'>Dictionary</a></code>
</td>
<td><p>A filter to apply on the event.</p>
</td>
</tr>
<tr id="Event.availability">
<td><h3 id="Event.availability" class="add-link hide-from-toc">4</h3></td>
<td><code>availability</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#Availability'>Availability</a></code>
</td>
<td><p>Optional. Cannot be set to <code>SameAsTarget</code> if <code>to</code> contains a local
component.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 10</span></div>
</td>
</tr>
</table>
### EventStream {#EventStream data-text="EventStream"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=302)*
<p>An event_stream capability</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 9</span></div>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="EventStream.name">
<td><h3 id="EventStream.name" class="add-link hide-from-toc">1</h3></td>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
<td><p>The name of the capability.</p>
</td>
</tr>
<tr id="EventStream.as">
<td><h3 id="EventStream.as" class="add-link hide-from-toc">2</h3></td>
<td><code>as</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
<td><p>A rename of the capability, which can be set when routing to another</p>
</td>
</tr>
<tr id="EventStream.path">
<td><h3 id="EventStream.path" class="add-link hide-from-toc">3</h3></td>
<td><code>path</code></td>
<td>
<code>string[1024]</code>
</td>
<td><p>Sets the path in which the event_stream is installed.</p>
</td>
</tr>
<tr id="EventStream.filter">
<td><h3 id="EventStream.filter" class="add-link hide-from-toc">4</h3></td>
<td><code>filter</code></td>
<td>
<code><a class='link' href='../fuchsia.data/'>fuchsia.data</a>/<a class='link' href='../fuchsia.data/#Dictionary'>Dictionary</a></code>
</td>
<td><p>A filter to apply on the event.</p>
</td>
</tr>
<tr id="EventStream.scope">
<td><h3 id="EventStream.scope" class="add-link hide-from-toc">5</h3></td>
<td><code>scope</code></td>
<td>
<code>vector&lt;<a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#Ref'>Ref</a>&gt;</code>
</td>
<td><p>A list of objects underneath this component to downscope the event to.
Example: #my_child_component, #my_child_collection.</p>
</td>
</tr>
</table>
### Protocol {#Protocol data-text="Protocol"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=173)*
<p>A protocol capability</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="Protocol.name">
<td><h3 id="Protocol.name" class="add-link hide-from-toc">1</h3></td>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
<td><p>The name of the capability. This is usually the name of the FIDL
protocol, e.g. <code>fuchsia.logger.LogSink</code>. If path is not set, the
protocol will be installed in a target component's namespace at
<code>/svc/{name}</code>.</p>
</td>
</tr>
<tr id="Protocol.as">
<td><h3 id="Protocol.as" class="add-link hide-from-toc">2</h3></td>
<td><code>as</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
<td><p>A rename of the capability, which can be set when routing to another
component. This field is optional.</p>
</td>
</tr>
<tr id="Protocol.type">
<td><h3 id="Protocol.type" class="add-link hide-from-toc">3</h3></td>
<td><code>type</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#DependencyType'>DependencyType</a></code>
</td>
<td><p>For information on this type, see
https://fuchsia.dev/go/components/declaration#DependencyType.
This field is optional and defaults to <code>STRONG</code>.</p>
</td>
</tr>
<tr id="Protocol.path">
<td><h3 id="Protocol.path" class="add-link hide-from-toc">4</h3></td>
<td><code>path</code></td>
<td>
<code>string[1024]</code>
</td>
<td><p>Override the path in which the protocol is installed. Instead of
<code>/svc/{name}</code>, this value will be used. Path should begin with a
leading slash and omit a trailing slash, e.g.
<code>/foo/fuchsia.logger.LogSink</code>. This field is optional.</p>
</td>
</tr>
<tr id="Protocol.availability">
<td><h3 id="Protocol.availability" class="add-link hide-from-toc">5</h3></td>
<td><code>availability</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#Availability'>Availability</a></code>
</td>
<td><p>Optional. Cannot be set to <code>SameAsTarget</code> if <code>to</code> contains a local
component.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 10</span></div>
</td>
</tr>
</table>
### Service {#Service data-text="Service"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=259)*
<p>A service capability</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="Service.name">
<td><h3 id="Service.name" class="add-link hide-from-toc">1</h3></td>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
<td><p>The name of the capability. This is usually the name of the FIDL
service, e.g. <code>fuchsia.echo.EchoService</code>. If path is not set, the
service will be installed in a target component's namespace at
<code>/svc/{name}</code>.</p>
</td>
</tr>
<tr id="Service.as">
<td><h3 id="Service.as" class="add-link hide-from-toc">2</h3></td>
<td><code>as</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
<td><p>A rename of the capability, which can be set when routing to another
component. This field is optional.</p>
</td>
</tr>
<tr id="Service.path">
<td><h3 id="Service.path" class="add-link hide-from-toc">3</h3></td>
<td><code>path</code></td>
<td>
<code>string[1024]</code>
</td>
<td><p>Override the path in which the service is installed. Instead of
<code>/svc/{name}</code>, this value will be used. Path should begin with a
leading slash and omit a trailing slash, e.g.
<code>/foo/fuchsia.echo.EchoService</code>. This field is optional.</p>
</td>
</tr>
<tr id="Service.availability">
<td><h3 id="Service.availability" class="add-link hide-from-toc">4</h3></td>
<td><code>availability</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#Availability'>Availability</a></code>
</td>
<td><p>Optional. Cannot be set to <code>SameAsTarget</code> if <code>to</code> contains a local
component.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 10</span></div>
</td>
</tr>
</table>
### Storage {#Storage data-text="Storage"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=238)*
<p>A storage capability</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="Storage.name">
<td><h3 id="Storage.name" class="add-link hide-from-toc">1</h3></td>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
<td><p>The name of the capability. This is not the path of the directory.
Instead it is a name used for routing.</p>
</td>
</tr>
<tr id="Storage.as">
<td><h3 id="Storage.as" class="add-link hide-from-toc">2</h3></td>
<td><code>as</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
<td><p>A rename of the capability, which can be set when routing to another
component. This field is optional.</p>
</td>
</tr>
<tr id="Storage.path">
<td><h3 id="Storage.path" class="add-link hide-from-toc">3</h3></td>
<td><code>path</code></td>
<td>
<code><a class='link' href='../fuchsia.component/'>fuchsia.component</a>/<a class='link' href='../fuchsia.component/#name'>name</a></code>
</td>
<td><p>The path in which to install the directory. The path should have a
leading slash but no trailing slash, e.g. <code>/config/data</code>. This field
is required.</p>
</td>
</tr>
<tr id="Storage.availability">
<td><h3 id="Storage.availability" class="add-link hide-from-toc">4</h3></td>
<td><code>availability</code></td>
<td>
<code><a class='link' href='../fuchsia.component.decl/'>fuchsia.component.decl</a>/<a class='link' href='../fuchsia.component.decl/#Availability'>Availability</a></code>
</td>
<td><p>Optional. Cannot be set to <code>SameAsTarget</code> if <code>to</code> contains a local
component.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 10</span></div>
</td>
</tr>
</table>
## **UNIONS**
### Builder_Build_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Builder_Build_Result data-text="Builder_Build_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=152)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Builder_Build_Result.response">
<td><h3 id="Builder_Build_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Builder_Build_Response'>Builder_Build_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Builder_Build_Result.err">
<td><h3 id="Builder_Build_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Capability [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Capability data-text="Capability"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=161)*
<p>A capability that can be routed around a realm using <code>AddRoute</code>.</p>
<p>Will be renamed to <code>Capability</code> once the other definition under this name
earlier in this file is removed.</p>
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Capability.protocol">
<td><h3 id="Capability.protocol" class="add-link hide-from-toc">1</h3></td>
<td><code>protocol</code></td>
<td>
<code><a class='link' href='#Protocol'>Protocol</a></code>
</td>
<td></td>
</tr>
<tr id="Capability.directory">
<td><h3 id="Capability.directory" class="add-link hide-from-toc">2</h3></td>
<td><code>directory</code></td>
<td>
<code><a class='link' href='#Directory'>Directory</a></code>
</td>
<td></td>
</tr>
<tr id="Capability.storage">
<td><h3 id="Capability.storage" class="add-link hide-from-toc">3</h3></td>
<td><code>storage</code></td>
<td>
<code><a class='link' href='#Storage'>Storage</a></code>
</td>
<td></td>
</tr>
<tr id="Capability.service">
<td><h3 id="Capability.service" class="add-link hide-from-toc">4</h3></td>
<td><code>service</code></td>
<td>
<code><a class='link' href='#Service'>Service</a></code>
</td>
<td></td>
</tr>
<tr id="Capability.">
<td><h3 id="Capability." class="add-link hide-from-toc">5</h3></td>
<td><code></code></td>
<td>
<code></code>
</td>
<td></td>
</tr>
<tr id="Capability.event_stream">
<td><h3 id="Capability.event_stream" class="add-link hide-from-toc">6</h3></td>
<td><code>event_stream</code></td>
<td>
<code><a class='link' href='#EventStream'>EventStream</a></code>
</td>
<td><div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 9</span></div>
</td>
</tr>
</table>
### RealmBuilderFactory_CreateFromRelativeUrl_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#RealmBuilderFactory_CreateFromRelativeUrl_Result data-text="RealmBuilderFactory_CreateFromRelativeUrl_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=45)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="RealmBuilderFactory_CreateFromRelativeUrl_Result.response">
<td><h3 id="RealmBuilderFactory_CreateFromRelativeUrl_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#RealmBuilderFactory_CreateFromRelativeUrl_Response'>RealmBuilderFactory_CreateFromRelativeUrl_Response</a></code>
</td>
<td></td>
</tr>
<tr id="RealmBuilderFactory_CreateFromRelativeUrl_Result.err">
<td><h3 id="RealmBuilderFactory_CreateFromRelativeUrl_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### RealmBuilderFactory_Create_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#RealmBuilderFactory_Create_Result data-text="RealmBuilderFactory_Create_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=35)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="RealmBuilderFactory_Create_Result.response">
<td><h3 id="RealmBuilderFactory_Create_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#RealmBuilderFactory_Create_Response'>RealmBuilderFactory_Create_Response</a></code>
</td>
<td></td>
</tr>
<tr id="RealmBuilderFactory_Create_Result.err">
<td><h3 id="RealmBuilderFactory_Create_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Realm_AddChildFromDecl_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Realm_AddChildFromDecl_Result data-text="Realm_AddChildFromDecl_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=430)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Realm_AddChildFromDecl_Result.response">
<td><h3 id="Realm_AddChildFromDecl_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Realm_AddChildFromDecl_Response'>Realm_AddChildFromDecl_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Realm_AddChildFromDecl_Result.err">
<td><h3 id="Realm_AddChildFromDecl_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Realm_AddChildRealm_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Realm_AddChildRealm_Result data-text="Realm_AddChildRealm_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=470)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Realm_AddChildRealm_Result.response">
<td><h3 id="Realm_AddChildRealm_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Realm_AddChildRealm_Response'>Realm_AddChildRealm_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Realm_AddChildRealm_Result.err">
<td><h3 id="Realm_AddChildRealm_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Realm_AddChild_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Realm_AddChild_Result data-text="Realm_AddChild_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=380)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Realm_AddChild_Result.response">
<td><h3 id="Realm_AddChild_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Realm_AddChild_Response'>Realm_AddChild_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Realm_AddChild_Result.err">
<td><h3 id="Realm_AddChild_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Realm_AddLegacyChild_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Realm_AddLegacyChild_Result data-text="Realm_AddLegacyChild_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=409)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Realm_AddLegacyChild_Result.response">
<td><h3 id="Realm_AddLegacyChild_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Realm_AddLegacyChild_Response'>Realm_AddLegacyChild_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Realm_AddLegacyChild_Result.err">
<td><h3 id="Realm_AddLegacyChild_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Realm_AddLocalChild_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Realm_AddLocalChild_Result data-text="Realm_AddLocalChild_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=450)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Realm_AddLocalChild_Result.response">
<td><h3 id="Realm_AddLocalChild_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Realm_AddLocalChild_Response'>Realm_AddLocalChild_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Realm_AddLocalChild_Result.err">
<td><h3 id="Realm_AddLocalChild_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Realm_AddRoute_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Realm_AddRoute_Result data-text="Realm_AddRoute_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=567)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Realm_AddRoute_Result.response">
<td><h3 id="Realm_AddRoute_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Realm_AddRoute_Response'>Realm_AddRoute_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Realm_AddRoute_Result.err">
<td><h3 id="Realm_AddRoute_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Realm_GetComponentDecl_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Realm_GetComponentDecl_Result data-text="Realm_GetComponentDecl_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=491)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Realm_GetComponentDecl_Result.response">
<td><h3 id="Realm_GetComponentDecl_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Realm_GetComponentDecl_Response'>Realm_GetComponentDecl_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Realm_GetComponentDecl_Result.err">
<td><h3 id="Realm_GetComponentDecl_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Realm_GetRealmDecl_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Realm_GetRealmDecl_Result data-text="Realm_GetRealmDecl_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=528)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Realm_GetRealmDecl_Result.response">
<td><h3 id="Realm_GetRealmDecl_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Realm_GetRealmDecl_Response'>Realm_GetRealmDecl_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Realm_GetRealmDecl_Result.err">
<td><h3 id="Realm_GetRealmDecl_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Realm_InitMutableConfigFromPackage_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Realm_InitMutableConfigFromPackage_Result data-text="Realm_InitMutableConfigFromPackage_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=595)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Realm_InitMutableConfigFromPackage_Result.response">
<td><h3 id="Realm_InitMutableConfigFromPackage_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Realm_InitMutableConfigFromPackage_Response'>Realm_InitMutableConfigFromPackage_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Realm_InitMutableConfigFromPackage_Result.err">
<td><h3 id="Realm_InitMutableConfigFromPackage_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Realm_InitMutableConfigToEmpty_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Realm_InitMutableConfigToEmpty_Result data-text="Realm_InitMutableConfigToEmpty_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=603)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Realm_InitMutableConfigToEmpty_Result.response">
<td><h3 id="Realm_InitMutableConfigToEmpty_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Realm_InitMutableConfigToEmpty_Response'>Realm_InitMutableConfigToEmpty_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Realm_InitMutableConfigToEmpty_Result.err">
<td><h3 id="Realm_InitMutableConfigToEmpty_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Realm_ReadOnlyDirectory_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Realm_ReadOnlyDirectory_Result data-text="Realm_ReadOnlyDirectory_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=586)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Realm_ReadOnlyDirectory_Result.response">
<td><h3 id="Realm_ReadOnlyDirectory_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Realm_ReadOnlyDirectory_Response'>Realm_ReadOnlyDirectory_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Realm_ReadOnlyDirectory_Result.err">
<td><h3 id="Realm_ReadOnlyDirectory_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Realm_ReplaceComponentDecl_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Realm_ReplaceComponentDecl_Result data-text="Realm_ReplaceComponentDecl_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=521)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Realm_ReplaceComponentDecl_Result.response">
<td><h3 id="Realm_ReplaceComponentDecl_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Realm_ReplaceComponentDecl_Response'>Realm_ReplaceComponentDecl_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Realm_ReplaceComponentDecl_Result.err">
<td><h3 id="Realm_ReplaceComponentDecl_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Realm_ReplaceConfigValue_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Realm_ReplaceConfigValue_Result data-text="Realm_ReplaceConfigValue_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=610)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Realm_ReplaceConfigValue_Result.response">
<td><h3 id="Realm_ReplaceConfigValue_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Realm_ReplaceConfigValue_Response'>Realm_ReplaceConfigValue_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Realm_ReplaceConfigValue_Result.err">
<td><h3 id="Realm_ReplaceConfigValue_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Realm_ReplaceRealmDecl_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Realm_ReplaceRealmDecl_Result data-text="Realm_ReplaceRealmDecl_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=541)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Realm_ReplaceRealmDecl_Result.response">
<td><h3 id="Realm_ReplaceRealmDecl_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Realm_ReplaceRealmDecl_Response'>Realm_ReplaceRealmDecl_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Realm_ReplaceRealmDecl_Result.err">
<td><h3 id="Realm_ReplaceRealmDecl_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
### Realm_SetConfigValue_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Realm_SetConfigValue_Result data-text="Realm_SetConfigValue_Result"}
*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=633)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Realm_SetConfigValue_Result.response">
<td><h3 id="Realm_SetConfigValue_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Realm_SetConfigValue_Response'>Realm_SetConfigValue_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Realm_SetConfigValue_Result.err">
<td><h3 id="Realm_SetConfigValue_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#RealmBuilderError'>RealmBuilderError</a></code>
</td>
<td></td>
</tr>
</table>
## **CONSTANTS**
<table>
<tr><th>Name</th><th>Value</th><th>Type</th><th>Description</th></tr>
<tr id="LOCAL_COMPONENT_NAME_KEY">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=20">LOCAL_COMPONENT_NAME_KEY</a></td>
<td><code>LOCAL_COMPONENT_NAME</code></td>
<td><code>String</code></td>
<td></td>
</tr>
<tr id="MAX_DIRECTORY_ENTRIES">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=338">MAX_DIRECTORY_ENTRIES</a></td>
<td>
<code>1024</code>
</td>
<td><code>uint32</code></td>
<td><p>Maximum number of entries allowed in one call of <code>Realm.ReadOnlyDirectory</code>.</p>
</td>
</tr>
</table>