<br />

Added: 7

## **PROTOCOLS**

## 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=150)*

### Build

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 `runner` argument must be provided if the `AddLocalChild`
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.

Errors:

- `INVALID_COMPONENT_DECL`: A component declaration failed validaiton.
- `BUILD_ALREADY_CALLED`: The `Build` function has been called multiple times on this channel.

#### Request

| Name | Type |
|---|---|
| `runner` | `client_end:https://fuchsia.dev/reference/fuchsia.component.runner//https://fuchsia.dev/reference/fuchsia.component.runner#ComponentRunner` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Builder_Build_Result` |

## 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=495)*

### AddCapability

Add a capability to the realm.
Added: 20

#### Request

| Name | Type |
|---|---|
| `capability` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Capability` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddCapability_Result` |

### AddChild

Adds a component to the realm.

The `url` can be in one of the following formats:

- an absolute component URL (such as, "fuchsia-pkg://fuchsia.com/some-package#meta/some-component.cm")
- a relative path component URL to a subpackaged component (like, "some-subpackage#meta/subpackaged-component.cm"); or
- a relative fragment-only URL (like, `#meta/other-component.cm`; see https://fuchsia.dev/fuchsia-src/reference/components/url#relative-fragment-only) indicating the path to a component manifest in the `pkg_dir` supplied to `RealmBuilderFactory::Create*()`.

The realm builder client typically passes a handle to its own `/pkg`
directory, and bundles the `other-component` into the same package.

Of the three URL types, *only* component declarations added via the
fragment-only URL can be modified, via
`GetComponentDecl`/`ReplaceComponentDecl` because realm builder actually
performs its own component resolution from the component's manifest and
files bundled in the provided `pkg_dir` (typically from the package
shared by the realm builder client component and the components added
via fragment-only URL).

Errors:

- `CHILD_ALREADY_EXISTS`: this realm already contains a child with the given name.
- `INVALID_MANIFEST_EXTENSION`: `url` does not end with `.cm`
- `DECL_NOT_FOUND`: The test package does not contain the component declaration referenced by a fragment-only component URL.
- `DECL_READ_ERROR`: Encountered an I/O error when attempting to read a component declaration referenced by a fragment-only component URL from the test package.
- `BUILD_ALREADY_CALLED`: The `Builder.Build` function has been called for this realm, and thus this `Realm` channel can no longer be used.

#### Request

| Name | Type |
|---|---|
| `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#child_name` |
| `url` | `https://fuchsia.dev/reference/fuchsia.url//https://fuchsia.dev/reference/fuchsia.url#Url` |
| `options` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#ChildOptions` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddChild_Result` |

### AddChildFromDecl

Adds a component to this realm whose declaration is set to `decl`. When
launched, the component will share the test package as its package
directory, and may access any resources from it.

Errors:

- `CHILD_ALREADY_EXISTS`: this realm already contains a child with the given name.
- `INVALID_COMPONENT_DECL`: `decl` failed validation.
- `BUILD_ALREADY_CALLED`: The `Builder.Build` function has been called for this realm, and thus this `Realm` channel can no longer be used.

#### Request

| Name | Type |
|---|---|
| `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#child_name` |
| `decl` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Component` |
| `options` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#ChildOptions` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddChildFromDecl_Result` |

### AddChildRealm

Adds a child realm which can be built with the client end of
`child_realm`.

Errors:

- `CHILD_ALREADY_EXISTS`: this realm already contains a child with the given name.
- `BUILD_ALREADY_CALLED`: The `Builder.Build` function has been called for this realm, and thus this `Realm` channel can no longer be used.

#### Request

| Name | Type |
|---|---|
| `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` |
| `options` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#ChildOptions` |
| `child_realm` | `server_end:https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddChildRealm_Result` |

### AddChildRealmFromDecl

Adds a child realm which can be built with the client end of
`child_realm`, and whose contents are initialized from `decl`.
Added: 26

#### Request

| Name | Type |
|---|---|
| `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` |
| `decl` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Component` |
| `options` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#ChildOptions` |
| `child_realm` | `server_end:https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddChildRealmFromDecl_Result` |

### AddChildRealmFromRelativeUrl

Adds a child realm which can be built with the client end of
`child_realm`, and whose contents are initialized from `relative_url`.
`relative_url` must be a fragment-only URL.
Added: 26

#### Request

| Name | Type |
|---|---|
| `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` |
| `relative_url` | `https://fuchsia.dev/reference/fuchsia.url//https://fuchsia.dev/reference/fuchsia.url#Url` |
| `options` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#ChildOptions` |
| `child_realm` | `server_end:https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddChildRealmFromRelativeUrl_Result` |

### AddCollection

Adds a collection to the realm.
Added: 25

#### Request

| Name | Type |
|---|---|
| `collection` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Collection` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddCollection_Result` |

### AddEnvironment

Adds an environment to the realm.
Added: 25

#### Request

| Name | Type |
|---|---|
| `environment` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Environment` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddEnvironment_Result` |

### AddLocalChild

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 `Build` will receive a start request for a component whose
`ProgramDecl` contains the moniker from the root of the
constructed realm for the child that is to be run under the `program`
key `LOCAL_COMPONENT_NAME`.

Errors:

- `CHILD_ALREADY_EXISTS`: this realm already contains a child with the given name.
- `BUILD_ALREADY_CALLED`: The `Builder.Build` function has been called for this realm, and thus this `Realm` channel can no longer be used.

#### Request

| Name | Type |
|---|---|
| `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#child_name` |
| `options` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#ChildOptions` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddLocalChild_Result` |

### AddRoute

Identical to `AddRouteFromDictionary`, except it does not accept `from_dictionary` which
it always sets to ".".
Deprecated: 29

**DEPRECATED**- use AddRouteFromDictionary instead

#### Request

| Name | Type |
|---|---|
| `capabilities` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.component.test#Capability>` |
| `from` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Ref` |
| `to` | `vector<https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Ref>` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddRoute_Result` |

### AddRouteFromDictionary

Mutates component manifests in the realm such that every component in
`to` will have a valid capability route for each item in `capabilities`
provided by `from`.

Errors:

- `NO_SUCH_SOURCE`: `from` references a non-existent child.
- `NO_SUCH_TARGET`: `to` references a non-existent child.
- `CAPABILITIES_EMPTY`: `capabilities` is empty.
- `TARGETS_EMPTY`: `to` is empty.
- `SOURCE_AND_TARGET_MATCH`: `from` is equal to one of the elements in `to`.
- `INVALID_COMPONENT_DECL`: The requested route caused one of the involved manifests to fail validation.
- `BUILD_ALREADY_CALLED`: The `Builder.Build` function has been called for this realm, and thus this `Realm` channel can no longer be used.

Added: 29

#### Request

| Name | Type |
|---|---|
| `capabilities` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.component.test#Capability>` |
| `from` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Ref` |
| `from_dictionary` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#dictionary_path` |
| `to` | `vector<https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Ref>` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddRouteFromDictionary_Result` |

### AddStorage

Creates and routes a new storage capability to the provided targets.
Optionally can connect the provided channel the the
`fuchsia.sys2.StorageAdmin` protocol for this storage capability.
Added: HEAD

#### Request

| Name | Type |
|---|---|
| `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` |
| `to` | `vector<https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Ref>` |
| `storage_admin` | `server_end:https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#StorageAdmin?` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddStorage_Result` |

### GetComponentDecl

Returns the component decl for the given component. `name` must refer to
a component that is one of the following:

- A component with a local implementation
- A legacy component
- A component added with a fragment-only URL (typically, components bundled in the same package as the realm builder client, sharing the same `/pkg` directory, for example, `#meta/other-component.cm`; see https://fuchsia.dev/fuchsia-src/reference/components/url#relative-fragment-only)
- An automatically generated realm (ex: the root)

Errors:

- `NO_SUCH_CHILD`: This realm does not contain a child with the given name.
- `CHILD_DECL_NOT_VISIBLE`: The component decl cannot be fetched for the referenced child, because the child was added to the realm using a modern (not legacy) absolute URL or subpackaged component's relative path URL.
- `BUILD_ALREADY_CALLED`: The `Builder.Build` function has been called for this realm, and thus this `Realm` channel can no longer be used.

#### Request

| Name | Type |
|---|---|
| `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#child_name` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_GetComponentDecl_Result` |

### GetRealmDecl

Returns the component decl for this realm.

Errors:

- `BUILD_ALREADY_CALLED`: The `Builder.Build` function has been called for this realm, and thus this `Realm` channel can no longer be used.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_GetRealmDecl_Result` |

### InitMutableConfigFromPackage

Load any packaged configuration for `name` before using values provided to
the builder.

Allows calling `SetConfigValue` to override packaged configuration.
Added: 9

#### Request

| Name | Type |
|---|---|
| `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_InitMutableConfigFromPackage_Result` |

### InitMutableConfigToEmpty

Use only values provided to the builder for `name`'s configuration.

Allows calling `SetConfigValue` to provide configuration.
Added: 9

#### Request

| Name | Type |
|---|---|
| `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_InitMutableConfigToEmpty_Result` |

### ReadOnlyDirectory

Offers a directory capability to a component in this realm. The
directory will be read-only (i.e. have `r*` rights), and will have the
contents described in `directory_contents`.

Errors:

- `NO_SUCH_TARGET`: `offer-to` references a non-existent child.
- `BUILD_ALREADY_CALLED`: The `Builder.Build` function has been called for this realm, and thus this `Realm` channel can no longer be used.

#### Request

| Name | Type |
|---|---|
| `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` |
| `to` | `vector<https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Ref>` |
| `directory_contents` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#DirectoryContents` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_ReadOnlyDirectory_Result` |

### ReplaceComponentDecl

Replaces the component decl for the given component. `name` must
refer to a component that is one of the following:

- A component with a local implementation
- A legacy component
- A component added with a fragment-only URL (typically, components bundled in the same package as the realm builder client, sharing the same `/pkg` directory, for example, `#meta/other-component.cm`; see https://fuchsia.dev/fuchsia-src/reference/components/url#relative-fragment-only)
- An automatically generated realm (ex: the root)

Errors:

- `NO_SUCH_CHILD`: This realm does not contain a child with the given name.
- `CHILD_ALREADY_EXISTS`: 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 `component_decl.children`.
- `CHILD_DECL_NOT_VISIBLE`: 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.
- `INVALID_COMPONENT_DECL`: `component_decl` failed validation.
- `BUILD_ALREADY_CALLED`: The `Builder.Build` function has been called for this realm, and thus this `Realm` channel can no longer be used.

#### Request

| Name | Type |
|---|---|
| `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#child_name` |
| `component_decl` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Component` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_ReplaceComponentDecl_Result` |

### ReplaceRealmDecl

Replaces the component decl for this realm.

Errors:

- `INVALID_COMPONENT_DECL`: `component_decl` failed validation.
- `BUILD_ALREADY_CALLED`: The `Builder.Build` function has been called for this realm, and thus this `Realm` channel can no longer be used.

#### Request

| Name | Type |
|---|---|
| `component_decl` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Component` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_ReplaceRealmDecl_Result` |

### SetConfigValue

Sets the configuration value for a field specified by `key`.
The component specified must have a config schema with this field.
The value must conform to all constraints as defined by the schema.

This method must be called after either `InitMutableConfigFromPackage` or
`InitMutableConfigToEmpty`.

Errors:

- `NO_CONFIG_SCHEMA`: component does not have a config schema
- `NO_SUCH_CONFIG_FIELD`: `key` could not be found in component's config schema
- `CONFIG_VALUE_INVALID`: `value` does not meet config schema constraints

Added: 9

#### Request

| Name | Type |
|---|---|
| `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` |
| `key` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#ConfigKey` |
| `value` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#ConfigValueSpec` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_SetConfigValue_Result` |

### UseNestedComponentManager

Inform the realm builder server that this realm is using a nested component manager. It's
expected that the client library has already replaced the realm's declaration with a
passthrough component manager declaration, with the exception of the root url.
This method will arrange for \[Builder.Build\] to install the realm's generated url as the
root url in this component manager.
Added: 26

#### Request

| Name | Type |
|---|---|
| `component_manager_relative_url` | `https://fuchsia.dev/reference/fuchsia.url//https://fuchsia.dev/reference/fuchsia.url#Url` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_UseNestedComponentManager_Result` |

## 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=30)*

This protocol can be used to instruct the Realm Builder Server to begin
creating a new realm.

<br />

### Create

Creates a new RealmBuilder. The client end of `realm_server_end` 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 `builder_server_end` is used to finalize the
realm, after which point it can be launched in a collection.

`pkg_dir_handle` is a handle to the test package. The realm builder
client typically passes a handle to its own `/pkg` directory, and
bundles the `other-component` into the same package.

#### Request

| Name | Type |
|---|---|
| `pkg_dir_handle` | `client_end:https://fuchsia.dev/reference/fuchsia.io//https://fuchsia.dev/reference/fuchsia.io#Directory` |
| `realm_server_end` | `server_end:https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm` |
| `builder_server_end` | `server_end:https://fuchsia.dev/reference/fidl/fuchsia.component.test#Builder` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderFactory_Create_Result` |

### CreateFromRelativeUrl

Identical to `Create`, but instead of the realm being empty by default
it contains the contents of the manifest located in the test package at
the path indicated by `relative_url`, which must be a fragment-only URL
(for example, `#meta/other-component.cm`; see
https://fuchsia.dev/fuchsia-src/reference/components/url#relative-fragment-only).

#### Request

| Name | Type |
|---|---|
| `pkg_dir_handle` | `client_end:https://fuchsia.dev/reference/fuchsia.io//https://fuchsia.dev/reference/fuchsia.io#Directory` |
| `relative_url` | `https://fuchsia.dev/reference/fuchsia.url//https://fuchsia.dev/reference/fuchsia.url#Url` |
| `realm_server_end` | `server_end:https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm` |
| `builder_server_end` | `server_end:https://fuchsia.dev/reference/fidl/fuchsia.component.test#Builder` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderFactory_CreateFromRelativeUrl_Result` |

## **STRUCTS**

### 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=166)*

| Field | Type | Description | Default |
|---|---|---|---|
| `root_component_url` | `string:4096` |   | No default |

### DirectoryContents [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=475)*

The contents of a directory that should be provided by the realm builder
server.

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `entries` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.component.test#DirectoryEntry>:1024` |   | No default |

### DirectoryEntry [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=480)*

An entry in a directory.

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `file_path` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | The path to the file. Valid examples include `foo.txt` and `foo/bar.json`. | No default |
| `file_contents` | `https://fuchsia.dev/reference/fuchsia.mem//https://fuchsia.dev/reference/fuchsia.mem#Buffer` | The contents of the file. | No default |

### 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=56)*

\<EMPTY\>

### 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=44)*

\<EMPTY\>

### Realm_AddCapability_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=833)*

\<EMPTY\>

### 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=561)*

\<EMPTY\>

### Realm_AddChildRealmFromDecl_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=638)*

\<EMPTY\>

### Realm_AddChildRealmFromRelativeUrl_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=620)*

\<EMPTY\>

### 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=601)*

\<EMPTY\>

### 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=540)*

\<EMPTY\>

### Realm_AddCollection_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=839)*

\<EMPTY\>

### Realm_AddEnvironment_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=845)*

\<EMPTY\>

### 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=581)*

\<EMPTY\>

### Realm_AddRouteFromDictionary_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=774)*

\<EMPTY\>

### 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=742)*

\<EMPTY\>

### Realm_AddStorage_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=810)*

\<EMPTY\>

### 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=664)*

| Field | Type | Description | Default |
|---|---|---|---|
| `component_decl` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Component` |   | No default |

### 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=704)*

| Field | Type | Description | Default |
|---|---|---|---|
| `component_decl` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Component` |   | No default |

### 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=819)*

\<EMPTY\>

### 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=827)*

\<EMPTY\>

### 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=793)*

\<EMPTY\>

### 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=697)*

\<EMPTY\>

### 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=717)*

\<EMPTY\>

### 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=868)*

\<EMPTY\>

### Realm_UseNestedComponentManager_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=727)*

\<EMPTY\>

## **ENUMS**

### RealmBuilderError [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=60)*

Errors that may be returned by the `Realm` and `Builder` protocols.

<br />

| Name | Value | Description |
|---|---|---|
| ### CHILD_ALREADY_EXISTS | `0` | Child cannot be added to the realm, as there is already a child in the realm with that name. |
| ### INVALID_MANIFEST_EXTENSION | `1` | A legacy component URL was given to `AddChild`, or a modern component url was given to `AddLegacyChild`. |
| ### INVALID_COMPONENT_DECL | `2` | A component declaration failed validation. |
| ### NO_SUCH_CHILD | `3` | The referenced child does not exist. |
| ### CHILD_DECL_NOT_VISIBLE | `4` | 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 fragment-only nor a legacy URL. |
| ### NO_SUCH_SOURCE | `5` | The source does not exist. |
| ### NO_SUCH_TARGET | `6` | A target does not exist. |
| ### CAPABILITIES_EMPTY | `7` | The `capabilities` field is empty. |
| ### TARGETS_EMPTY | `8` | The `targets` field is empty. |
| ### SOURCE_AND_TARGET_MATCH | `9` | The `from` value is equal to one of the elements in `to`. |
| ### DECL_NOT_FOUND | `10` | The test package does not contain the component declaration referenced by a fragment-only component URL. |
| ### DECL_READ_ERROR | `11` | Encountered an I/O error when attempting to read a component declaration referenced by a fragment-only component URL from the test package. |
| ### BUILD_ALREADY_CALLED | `12` | The `Build` function has been called multiple times on this channel. |
| ### CAPABILITY_INVALID | `13` | A capability is invalid. This may occur if a required field is empty or if an unsupported type is received. |
| ### INVALID_CHILD_REALM_HANDLE | `14` | The handle the client provided for the child realm is not usable. |
| ### IMMUTABLE_PROGRAM | `15` | `ReplaceComponentDecl` 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. |
| ### URL_IS_NOT_RELATIVE | `16` | The URL provided to `RealmBuilderFactory.CreateFromRelativeURL` is not a fragment-only component URL. |
| ### INVALID_PKG_DIR_HANDLE | `17` | The handle the client provided for the test's pkg directory is not usable. |
| ### NO_CONFIG_SCHEMA | `18` | The component does not have a config schema defined. Attempting to set a config value is not allowed. |
| ### NO_SUCH_CONFIG_FIELD | `19` | The component's config schema does not have a field with that name. |
| ### CONFIG_VALUE_INVALID | `20` | A config value is invalid. This may mean a type mismatch or an issue with constraints like string/vector length. |
| ### CONFIG_OVERRIDE_UNSUPPORTED | `21` | A config value cannot be set because the realm has not chosen its override policy. Added: 9 |

## **TABLES**

### 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=448)*

Properties that may be set on a child when it is added to a realm.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `startup` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#StartupMode` | For information on this type, see https://fuchsia.dev/go/components/declaration#StartupMode. Defaults to `LAZY`. |
| ### 2 | `environment` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | Specify a custom environment for the child to run under. |
| ### 3 | `on_terminate` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#OnTerminate` | For information on this type, see https://fuchsia.dev/go/components/declaration#OnTerminate. Defaults to `NONE`. |
| ### 4 | `config_overrides` | `vector<https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#ConfigOverride>` | Structured Configuration overrides to be applied to the child. Only keys declared by the child component as overridable by parent may be provided. For information on overrides, see \[fuchsia.component.decl/ConfigOverride\]. Added: 13 |

### Config

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=358)*

A configuration capability
Added: 20

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | The name of the capability. |
| ### 2 | `as` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | A rename of the capability, which can be set when routing to another component. This field is optional. |
| ### 3 | `availability` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Availability` | Optional. Cannot be set to `SameAsTarget` if `to` contains a local component. |

### Dictionary

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=373)*

A dictionary capability
Added: 25

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | The name of the dictionary. |
| ### 2 | `as` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | A rename of the dictionary, which can be set when routing to another component. This field is optional. |
| ### 3 | `type` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#DependencyType` | For information on this type, see https://fuchsia.dev/go/components/declaration#DependencyType. This field is optional and defaults to `STRONG`. |
| ### 4 | `availability` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Availability` | Optional. Cannot be set to `SameAsTarget` if `to` contains a local component. |
| ### 6 | `path` | `string:4095` | Optional. The path at which this dictionary is used (if the target is a local component). Added: HEAD |

### 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=227)*

A directory capability.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | The name of the capability. This is not the path of the directory. Instead it is a name used for routing. |
| ### 2 | `as` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | A rename of the capability, which can be set when routing to another component. This field is optional. |
| ### 3 | `type` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#DependencyType` | For information on this type, see https://fuchsia.dev/go/components/declaration#DependencyType. This field is optional and defaults to `STRONG`. |
| ### 4 | `subdir` | `string:4095` | The subdirectory of this directory to offer instead of the root. For example, if you set `bar/baz` as the subdir of `foo`, then `bar/baz` will be the root of the target's `foo`. This field is optional. |
| ### 5 | `rights` | `https://fuchsia.dev/reference/fuchsia.io//https://fuchsia.dev/reference/fuchsia.io#Rights` | 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. |
| ### 6 | `path` | `string:4095` | The path in which to install the directory. The path should have a leading slash but no trailing slash, e.g. `/config/data`. This field is required. |
| ### 7 | `availability` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Availability` | Optional. Cannot be set to `SameAsTarget` if `to` contains a local component. Added: 10 |

### 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=318)*

An event capability

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | The name of the capability. |
| ### 2 | `as` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | A rename of the capability, which can be set when routing to another component. This field is optional. |
| ### 3 | `filter` | `https://fuchsia.dev/reference/fuchsia.data//https://fuchsia.dev/reference/fuchsia.data#Dictionary` | A filter to apply on the event. |
| ### 4 | `availability` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Availability` | Optional. Cannot be set to `SameAsTarget` if `to` contains a local component. Added: 10 |

### 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=337)*

An event_stream capability
Added: 9

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | The name of the capability. |
| ### 2 | `as` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | A rename of the capability, which can be set when routing to another |
| ### 3 | `path` | `string:4095` | Sets the path in which the event_stream is installed. |
| ### 4 | `filter` | `https://fuchsia.dev/reference/fuchsia.data//https://fuchsia.dev/reference/fuchsia.data#Dictionary` | A filter to apply on the event. |
| ### 5 | `scope` | `vector<https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Ref>` | A list of objects underneath this component to downscope the event to. Example: #my_child_component, #my_child_collection. |

### 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=193)*

A protocol capability

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | The name of the capability. This is usually the name of the FIDL protocol, e.g. `fuchsia.logger.LogSink`. If path is not set, the protocol will be installed in a target component's namespace at `/svc/{name}`. |
| ### 2 | `as` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | A rename of the capability, which can be set when routing to another component. This field is optional. |
| ### 3 | `type` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#DependencyType` | For information on this type, see https://fuchsia.dev/go/components/declaration#DependencyType. This field is optional and defaults to `STRONG`. |
| ### 4 | `path` | `string:4095` | Override the path in which the protocol is installed. Instead of `/svc/{name}`, this value will be used. Path should begin with a leading slash and omit a trailing slash, e.g. `/foo/fuchsia.logger.LogSink`. This field is optional. |
| ### 5 | `availability` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Availability` | Optional. Cannot be set to `SameAsTarget` if `to` contains a local component. Added: 10 |

### Resolver

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=403)*

A resolver capability
Added: 24

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | The name of the resolver. |
| ### 2 | `as` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | A rename of the resolver, which can be set when routing to another component. This field is optional. |
| ### 3 | `path` | `string:4095` | Override the path in which the resolver is installed. Instead of `/svc/{name}`, this value will be used. Path should begin with a leading slash and omit a trailing slash, e.g. `/foo/fuchsia.logger.LogSink`. This field is optional. |

### Runner

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=425)*

A runner capability
Added: 24

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | The name of the runner. |
| ### 2 | `as` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | A rename of the runner, which can be set when routing to another component. This field is optional. |
| ### 3 | `path` | `string:4095` | Override the path in which the runner is installed. Instead of `/svc/{name}`, this value will be used. Path should begin with a leading slash and omit a trailing slash, e.g. `/foo/fuchsia.logger.LogSink`. This field is optional. |

### 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=289)*

A service capability

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | The name of the capability. This is usually the name of the FIDL service, e.g. `fuchsia.echo.EchoService`. If path is not set, the service will be installed in a target component's namespace at `/svc/{name}`. |
| ### 2 | `as` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | A rename of the capability, which can be set when routing to another component. This field is optional. |
| ### 3 | `path` | `string:4095` | Override the path in which the service is installed. Instead of `/svc/{name}`, this value will be used. Path should begin with a leading slash and omit a trailing slash, e.g. `/foo/fuchsia.echo.EchoService`. This field is optional. |
| ### 4 | `availability` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Availability` | Optional. Cannot be set to `SameAsTarget` if `to` contains a local component. Added: 10 |

### 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=268)*

A storage capability

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `name` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | The name of the capability. This is not the path of the directory. Instead it is a name used for routing. |
| ### 2 | `as` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | A rename of the capability, which can be set when routing to another component. This field is optional. |
| ### 3 | `path` | `https://fuchsia.dev/reference/fuchsia.component//https://fuchsia.dev/reference/fuchsia.component#name` | The path in which to install the directory. The path should have a leading slash but no trailing slash, e.g. `/config/data`. This field is required. |
| ### 4 | `availability` | `https://fuchsia.dev/reference/fuchsia.component.decl//https://fuchsia.dev/reference/fuchsia.component.decl#Availability` | Optional. Cannot be set to `SameAsTarget` if `to` contains a local component. Added: 10 |

## **UNIONS**

### Builder_Build_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=166)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Builder_Build_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Capability [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=175)*

A capability that can be routed around a realm using `AddRoute`.

Will be renamed to `Capability` once the other definition under this name
earlier in this file is removed.

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `protocol` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Protocol` |   |
| ### 2 | `directory` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Directory` |   |
| ### 3 | `storage` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Storage` |   |
| ### 4 | `service` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Service` |   |
| ### 6 | `event_stream` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#EventStream` | Added: 9 |
| ### 7 | `config` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Config` | Added: 20 |
| ### 8 | `dictionary` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Dictionary` | Added: 25 |
| ### 9 | `resolver` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Resolver` | Added: 24 |
| ### 10 | `runner` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Runner` | Added: 24 |

<br />

### RealmBuilderFactory_CreateFromRelativeUrl_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=56)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderFactory_CreateFromRelativeUrl_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### RealmBuilderFactory_Create_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=44)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderFactory_Create_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_AddCapability_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=833)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddCapability_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_AddChildFromDecl_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=561)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddChildFromDecl_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_AddChildRealmFromDecl_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=638)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddChildRealmFromDecl_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_AddChildRealmFromRelativeUrl_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=620)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddChildRealmFromRelativeUrl_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_AddChildRealm_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=601)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddChildRealm_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_AddChild_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=540)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddChild_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_AddCollection_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=839)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddCollection_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_AddEnvironment_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=845)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddEnvironment_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_AddLocalChild_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=581)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddLocalChild_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_AddRouteFromDictionary_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=774)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddRouteFromDictionary_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_AddRoute_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=742)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddRoute_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_AddStorage_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=810)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_AddStorage_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_GetComponentDecl_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=664)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_GetComponentDecl_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_GetRealmDecl_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=704)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_GetRealmDecl_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_InitMutableConfigFromPackage_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=819)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_InitMutableConfigFromPackage_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_InitMutableConfigToEmpty_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=827)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_InitMutableConfigToEmpty_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_ReadOnlyDirectory_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=793)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_ReadOnlyDirectory_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_ReplaceComponentDecl_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=697)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_ReplaceComponentDecl_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_ReplaceRealmDecl_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=717)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_ReplaceRealmDecl_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_SetConfigValue_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=868)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_SetConfigValue_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

### Realm_UseNestedComponentManager_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.component.test/realm_builder.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=727)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#Realm_UseNestedComponentManager_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.component.test#RealmBuilderError` |   |

<br />

## **CONSTANTS**

| Name | Value | Type | Description |
|---|---|---|---|
| [LOCAL_COMPONENT_NAME_KEY](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=18) | `LOCAL_COMPONENT_NAME` | `String` |   |
| [MAX_DIRECTORY_ENTRIES](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.component.test/realm_builder.fidl;l=471) | `1024` | `uint32` | Maximum number of entries allowed in one call of `Realm.ReadOnlyDirectory`. |