> ## Documentation Index
> Fetch the complete documentation index at: https://cdktn.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Java: TerraformAsset

> CDKTN Core API Reference for TerraformAsset in Java.

## Initializers <a name="Initializers" id="cdktn.TerraformAsset.Initializer" />

```java theme={null}
import io.cdktn.cdktn.TerraformAsset;

TerraformAsset.Builder.create(Construct scope, java.lang.String id)
    .path(java.lang.String)
//  .assetHash(java.lang.String)
//  .type(AssetType)
    .build();
```

| **Name**                                                                                   | **Type**                                              | **Description**   |
| ------------------------------------------------------------------------------------------ | ----------------------------------------------------- | ----------------- |
| <code><a href="#cdktn.TerraformAsset.Initializer.parameter.scope">scope</a></code>         | <code>software.constructs.Construct</code>            | *No description.* |
| <code><a href="#cdktn.TerraformAsset.Initializer.parameter.id">id</a></code>               | <code>java.lang.String</code>                         | *No description.* |
| <code><a href="#cdktn.TerraformAsset.Initializer.parameter.path">path</a></code>           | <code>java.lang.String</code>                         | *No description.* |
| <code><a href="#cdktn.TerraformAsset.Initializer.parameter.assetHash">assetHash</a></code> | <code>java.lang.String</code>                         | *No description.* |
| <code><a href="#cdktn.TerraformAsset.Initializer.parameter.type">type</a></code>           | <code><a href="#cdktn.AssetType">AssetType</a></code> | *No description.* |

***

### `scope`<sup>Required</sup> <a name="scope" id="cdktn.TerraformAsset.Initializer.parameter.scope" />

* *Type:* software.constructs.Construct

***

### `id`<sup>Required</sup> <a name="id" id="cdktn.TerraformAsset.Initializer.parameter.id" />

* *Type:* java.lang.String

***

### `path`<sup>Required</sup> <a name="path" id="cdktn.TerraformAsset.Initializer.parameter.path" />

* *Type:* java.lang.String

***

### `assetHash`<sup>Optional</sup> <a name="assetHash" id="cdktn.TerraformAsset.Initializer.parameter.assetHash" />

* *Type:* java.lang.String

***

### `type`<sup>Optional</sup> <a name="type" id="cdktn.TerraformAsset.Initializer.parameter.type" />

* *Type:* <a href="#cdktn.AssetType">AssetType</a>

***

## Methods <a name="Methods" id="Methods" />

| **Name**                                                           | **Description**                                    |
| ------------------------------------------------------------------ | -------------------------------------------------- |
| <code><a href="#cdktn.TerraformAsset.toString">toString</a></code> | Returns a string representation of this construct. |
| <code><a href="#cdktn.TerraformAsset.with">with</a></code>         | Applies one or more mixins to this construct.      |

***

### `toString` <a name="toString" id="cdktn.TerraformAsset.toString" />

```java theme={null}
public java.lang.String toString()
```

Returns a string representation of this construct.

### `with` <a name="with" id="cdktn.TerraformAsset.with" />

```java theme={null}
public IConstruct with(IMixin... mixins)
```

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.

#### `mixins`<sup>Required</sup> <a name="mixins" id="cdktn.TerraformAsset.with.parameter.mixins" />

* *Type:* software.constructs.IMixin...

The mixins to apply.

***

## Static Functions <a name="Static Functions" id="Static Functions" />

| **Name**                                                                 | **Description**               |
| ------------------------------------------------------------------------ | ----------------------------- |
| <code><a href="#cdktn.TerraformAsset.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |

***

### `isConstruct` <a name="isConstruct" id="cdktn.TerraformAsset.isConstruct" />

```java theme={null}
import io.cdktn.cdktn.TerraformAsset;

TerraformAsset.isConstruct(java.lang.Object x)
```

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.

#### `x`<sup>Required</sup> <a name="x" id="cdktn.TerraformAsset.isConstruct.parameter.x" />

* *Type:* java.lang.Object

Any object.

***

## Properties <a name="Properties" id="Properties" />

| **Name**                                                                      | **Type**                                              | **Description**                                                                                                    |
| ----------------------------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| <code><a href="#cdktn.TerraformAsset.property.node">node</a></code>           | <code>software.constructs.Node</code>                 | The tree node.                                                                                                     |
| <code><a href="#cdktn.TerraformAsset.property.fileName">fileName</a></code>   | <code>java.lang.String</code>                         | Name of the asset.                                                                                                 |
| <code><a href="#cdktn.TerraformAsset.property.path">path</a></code>           | <code>java.lang.String</code>                         | The path relative to the root of the terraform directory in posix format Use this property to reference the asset. |
| <code><a href="#cdktn.TerraformAsset.property.assetHash">assetHash</a></code> | <code>java.lang.String</code>                         | *No description.*                                                                                                  |
| <code><a href="#cdktn.TerraformAsset.property.type">type</a></code>           | <code><a href="#cdktn.AssetType">AssetType</a></code> | *No description.*                                                                                                  |

***

### `node`<sup>Required</sup> <a name="node" id="cdktn.TerraformAsset.property.node" />

```java theme={null}
public Node getNode();
```

* *Type:* software.constructs.Node

The tree node.

***

### `fileName`<sup>Required</sup> <a name="fileName" id="cdktn.TerraformAsset.property.fileName" />

```java theme={null}
public java.lang.String getFileName();
```

* *Type:* java.lang.String

Name of the asset.

***

### `path`<sup>Required</sup> <a name="path" id="cdktn.TerraformAsset.property.path" />

```java theme={null}
public java.lang.String getPath();
```

* *Type:* java.lang.String

The path relative to the root of the terraform directory in posix format Use this property to reference the asset.

***

### `assetHash`<sup>Required</sup> <a name="assetHash" id="cdktn.TerraformAsset.property.assetHash" />

```java theme={null}
public java.lang.String getAssetHash();
```

* *Type:* java.lang.String

***

### `type`<sup>Required</sup> <a name="type" id="cdktn.TerraformAsset.property.type" />

```java theme={null}
public AssetType getType();
```

* *Type:* <a href="#cdktn.AssetType">AssetType</a>

***
