> ## Documentation Index
> Fetch the complete documentation index at: https://openrouter-d02e98a0-mintlify-5b6e02fd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AnthropicDocumentBlockParamSourceUnion - Go SDK

> AnthropicDocumentBlockParamSourceUnion type definition

<Warning>
  The Go SDK and docs are currently in beta.
  Report issues on [GitHub](https://github.com/OpenRouterTeam/go-sdk/issues).
</Warning>

## Supported Types

### AnthropicBase64PdfSource

```go lines theme={null}
anthropicDocumentBlockParamSourceUnion := components.CreateAnthropicDocumentBlockParamSourceUnionBase64(components.AnthropicBase64PdfSource{/* values here */})
```

### AnthropicPlainTextSource

```go lines theme={null}
anthropicDocumentBlockParamSourceUnion := components.CreateAnthropicDocumentBlockParamSourceUnionText(components.AnthropicPlainTextSource{/* values here */})
```

### SourceContent

```go lines theme={null}
anthropicDocumentBlockParamSourceUnion := components.CreateAnthropicDocumentBlockParamSourceUnionContent(components.SourceContent{/* values here */})
```

### AnthropicURLPdfSource

```go lines theme={null}
anthropicDocumentBlockParamSourceUnion := components.CreateAnthropicDocumentBlockParamSourceUnionURLObj(components.AnthropicURLPdfSource{/* values here */})
```

## Union Discrimination

Use the `Type` field to determine which variant is active, then access the corresponding field:

```go lines theme={null}
switch anthropicDocumentBlockParamSourceUnion.Type {
	case components.AnthropicDocumentBlockParamSourceUnionTypeBase64:
		// anthropicDocumentBlockParamSourceUnion.AnthropicBase64PdfSource is populated
	case components.AnthropicDocumentBlockParamSourceUnionTypeText:
		// anthropicDocumentBlockParamSourceUnion.AnthropicPlainTextSource is populated
	case components.AnthropicDocumentBlockParamSourceUnionTypeContent:
		// anthropicDocumentBlockParamSourceUnion.SourceContent is populated
	case components.AnthropicDocumentBlockParamSourceUnionTypeURLObj:
		// anthropicDocumentBlockParamSourceUnion.AnthropicURLPdfSource is populated
}
```
