# Class DocumentContent

Namespace
  AnthropicClient.Models

Assembly
  AnthropicClient.dll

Represents content from a document that is part of a message.

    public class DocumentContent : Content

Inheritance
  object
  Content
  DocumentContent

Inherited Members
  Content.Type
  Content.CacheControl
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Constructors

### DocumentContent(Source)

Initializes a new instance of the DocumentContent class with a document source.

    public DocumentContent(Source source)

#### Parameters

`source` Source

  The document source.

#### Exceptions

ArgumentNullException

  Thrown when the source is null.

### DocumentContent(Source, CacheControl)

Initializes a new instance of the DocumentContent class with a document source and cache control.

    public DocumentContent(Source source, CacheControl cacheControl)

#### Parameters

`source` Source

  The document source.

`cacheControl` CacheControl

  The cache control to be used for the content.

#### Exceptions

ArgumentNullException

  Thrown when the source is null.

### DocumentContent(string, string)

Initializes a new instance of the DocumentContent class.

    public DocumentContent(string mediaType, string data)

#### Parameters

`mediaType` string

  The media type of the document.

`data` string

  The data of the document.

#### Exceptions

ArgumentNullException

  Thrown when the media type or data is null.

### DocumentContent(string, string, CacheControl)

Initializes a new instance of the DocumentContent class.

    public DocumentContent(string mediaType, string data, CacheControl cacheControl)

#### Parameters

`mediaType` string

  The media type of the document.

`data` string

  The data of the document.

`cacheControl` CacheControl

  The cache control to be used for the content.

#### Exceptions

ArgumentNullException

  Thrown when the media type, data, or cache control is null.

## Properties

### Citations

Gets whether citations are enabled for the document.

    public CitationOption? Citations { get; init; }

#### Property Value

CitationOption

### Context

Gets the context of the document.

    public string? Context { get; init; }

#### Property Value

string

### Source

Gets the source of the document.

    public Source Source { get; init; }

#### Property Value

Source

### Title

Gets the title of the document.

    public string? Title { get; init; }

#### Property Value

string