# LinkPreview

# LinkPreview

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/LinkPreview "View this page in Kotlin")\|Java  

<br />

```
public final class LinkPreview
```

<br />

*** ** * ** ***

An object representing a link preview content.

## Summary

|                                                                                                                                  ### Nested types                                                                                                                                  |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `public final class `[LinkPreview.Builder](https://developer.android.com/reference/com/google/android/engage/common/datamodel/LinkPreview.Builder) Builder class for[LinkPreview](https://developer.android.com/reference/com/google/android/engage/common/datamodel/LinkPreview). |

|                                ### Public fields                                |
|---------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|
| `final `[String](https://developer.android.com/reference/java/lang/String.html) | [hostname](https://developer.android.com/reference/com/google/android/engage/common/datamodel/LinkPreview#hostname()) |
| `final `[String](https://developer.android.com/reference/java/lang/String.html) | [title](https://developer.android.com/reference/com/google/android/engage/common/datamodel/LinkPreview#title())       |

|                                                                                        ### Public methods                                                                                        |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String.html)                                                                                                                          | [getHostname](https://developer.android.com/reference/com/google/android/engage/common/datamodel/LinkPreview#getHostname())`()` Sets the text to indicate the webpage owner, eg "INSIDER". |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Image](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Image)`>` | [getImage](https://developer.android.com/reference/com/google/android/engage/common/datamodel/LinkPreview#getImage())`()` Sets the hero image for the website.                             |
| [String](https://developer.android.com/reference/java/lang/String.html)                                                                                                                          | [getTitle](https://developer.android.com/reference/com/google/android/engage/common/datamodel/LinkPreview#getTitle())`()` Sets the text to indicate the title of the website.              |

## Public fields

### hostname

```
public final String hostname
```  

### title

```
public final String title
```  

## Public methods

### getHostname

```
public String getHostname()
```

Sets the text to indicate the webpage owner, eg "INSIDER".  

### getImage

```
public Optional<Image> getImage()
```

Sets the hero image for the website.  

### getTitle

```
public String getTitle()
```

Sets the text to indicate the title of the website.