# Class TextSource | AnthropicClient
Represents a text document source.

# Class TextSource

Namespace
  AnthropicClient.Models

Assembly
  AnthropicClient.dll

Represents a text document source.

    public class TextSource : Source

Inheritance
  object
  Source
  TextSource

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

## Constructors

### TextSource(string)

Initializes a new instance of the TextSource class.

    public TextSource(string data)

#### Parameters

`data` string

  The data of the document.

#### Exceptions

ArgumentNullException

  Thrown when the data is null.

## Properties

### Data

Gets the data of the source.

    public string Data { get; init; }

#### Property Value

string

### MediaType

Gets the media type of the source.

    [JsonPropertyName("media_type")]
    public string MediaType { get; }

#### Property Value

string