public sealed class DocumentOutputConfig : IMessage<DocumentOutputConfig>, IEquatable<DocumentOutputConfig>, IDeepCloneable<DocumentOutputConfig>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Translation v3 API class DocumentOutputConfig.
public GcsDestination GcsDestination { get; set; }
Optional. Google Cloud Storage destination for the translation output,
e.g., gs://my_bucket/my_directory/.
The destination directory provided does not have to be empty, but the
bucket must exist. If a file with the same name as the output file
already exists in the destination an error will be returned.
For a DocumentInputConfig.contents provided document, the output file
will have the name "output_[trg]_translations.[ext]", where
[trg] corresponds to the translated file's language code,
[ext] corresponds to the translated file's extension according to its
mime type.
For a DocumentInputConfig.gcs_uri provided document, the output file will
have a name according to its URI. For example: an input file with URI:
gs://a/b/c.[extension] stored in a gcs_destination bucket with name
"my_bucket" will have an output URI:
gs://my_bucket/a_b_c_[trg]_translations.[ext], where
[trg] corresponds to the translated file's language code,
[ext] corresponds to the translated file's extension according to its
mime type.
If the document was directly provided through the request, then the
output document will have the format:
gs://my_bucket/translated_document_[trg]_translations.[ext], where
[trg] corresponds to the translated file's language code,
[ext] corresponds to the translated file's extension according to its
mime type.
If a glossary was provided, then the output URI for the glossary
translation will be equal to the default output URI but have
glossary_translations instead of translations. For the previous
example, its glossary URI would be:
gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext].
Thus the max number of output files will be 2 (Translated document,
Glossary translated document).
Callers should expect no partial outputs. If there is any error during
document translation, no output will be stored in the Cloud Storage
bucket.
Optional. Specifies the translated document's mime_type.
If not specified, the translated file's mime type will be the same as the
input file's mime type.
Currently only support the output mime type to be the same as input mime
type.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis documentation covers the \u003ccode\u003eDocumentOutputConfig\u003c/code\u003e class, which is part of the Google Cloud Translation v3 API and is used to configure output settings for document translation requests.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of \u003ccode\u003eDocumentOutputConfig\u003c/code\u003e is 3.9.0, with previous versions available down to 2.2.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDocumentOutputConfig\u003c/code\u003e class implements multiple interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt allows setting a Google Cloud Storage destination (\u003ccode\u003eGcsDestination\u003c/code\u003e) for the translated output, specifying the bucket and directory where files will be stored.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMimeType\u003c/code\u003e property allows you to set the translated document's mime type, or it defaults to the input file's mime type, supporting PDF and various Office document formats.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Translation v3 API - Class DocumentOutputConfig (3.9.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.9.0 (latest)](/dotnet/docs/reference/Google.Cloud.Translate.V3/latest/Google.Cloud.Translate.V3.DocumentOutputConfig)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.8.0/Google.Cloud.Translate.V3.DocumentOutputConfig)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.7.0/Google.Cloud.Translate.V3.DocumentOutputConfig)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.6.0/Google.Cloud.Translate.V3.DocumentOutputConfig)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.5.0/Google.Cloud.Translate.V3.DocumentOutputConfig)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.4.0/Google.Cloud.Translate.V3.DocumentOutputConfig)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.3.0/Google.Cloud.Translate.V3.DocumentOutputConfig)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.2.0/Google.Cloud.Translate.V3.DocumentOutputConfig)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.1.0/Google.Cloud.Translate.V3.DocumentOutputConfig)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.0.0/Google.Cloud.Translate.V3.DocumentOutputConfig)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/2.4.0/Google.Cloud.Translate.V3.DocumentOutputConfig)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/2.3.0/Google.Cloud.Translate.V3.DocumentOutputConfig)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/2.2.0/Google.Cloud.Translate.V3.DocumentOutputConfig) \n\n public sealed class DocumentOutputConfig : IMessage\u003cDocumentOutputConfig\u003e, IEquatable\u003cDocumentOutputConfig\u003e, IDeepCloneable\u003cDocumentOutputConfig\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Translation v3 API class DocumentOutputConfig.\n\nA document translation request output config. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e DocumentOutputConfig \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[DocumentOutputConfig](/dotnet/docs/reference/Google.Cloud.Translate.V3/latest/Google.Cloud.Translate.V3.DocumentOutputConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[DocumentOutputConfig](/dotnet/docs/reference/Google.Cloud.Translate.V3/latest/Google.Cloud.Translate.V3.DocumentOutputConfig), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[DocumentOutputConfig](/dotnet/docs/reference/Google.Cloud.Translate.V3/latest/Google.Cloud.Translate.V3.DocumentOutputConfig), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Translate.V3](/dotnet/docs/reference/Google.Cloud.Translate.V3/latest/Google.Cloud.Translate.V3)\n\nAssembly\n--------\n\nGoogle.Cloud.Translate.V3.dll\n\nConstructors\n------------\n\n### DocumentOutputConfig()\n\n public DocumentOutputConfig()\n\n### DocumentOutputConfig(DocumentOutputConfig)\n\n public DocumentOutputConfig(DocumentOutputConfig other)\n\nProperties\n----------\n\n### DestinationCase\n\n public DocumentOutputConfig.DestinationOneofCase DestinationCase { get; }\n\n### GcsDestination\n\n public GcsDestination GcsDestination { get; set; }\n\nOptional. Google Cloud Storage destination for the translation output,\ne.g., `gs://my_bucket/my_directory/`.\n\nThe destination directory provided does not have to be empty, but the\nbucket must exist. If a file with the same name as the output file\nalready exists in the destination an error will be returned.\n\nFor a DocumentInputConfig.contents provided document, the output file\nwill have the name \"output_\\[trg\\]_translations.\\[ext\\]\", where\n\n- \\[trg\\] corresponds to the translated file's language code,\n- \\[ext\\] corresponds to the translated file's extension according to its mime type.\n\nFor a DocumentInputConfig.gcs_uri provided document, the output file will\nhave a name according to its URI. For example: an input file with URI:\n`gs://a/b/c.[extension]` stored in a gcs_destination bucket with name\n\"my_bucket\" will have an output URI:\n`gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where\n\n- \\[trg\\] corresponds to the translated file's language code,\n- \\[ext\\] corresponds to the translated file's extension according to its mime type.\n\nIf the document was directly provided through the request, then the\noutput document will have the format:\n`gs://my_bucket/translated_document_[trg]_translations.[ext]`, where\n\n- \\[trg\\] corresponds to the translated file's language code,\n- \\[ext\\] corresponds to the translated file's extension according to its mime type.\n\nIf a glossary was provided, then the output URI for the glossary\ntranslation will be equal to the default output URI but have\n`glossary_translations` instead of `translations`. For the previous\nexample, its glossary URI would be:\n`gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`.\n\nThus the max number of output files will be 2 (Translated document,\nGlossary translated document).\n\nCallers should expect no partial outputs. If there is any error during\ndocument translation, no output will be stored in the Cloud Storage\nbucket.\n\n### MimeType\n\n public string MimeType { get; set; }\n\nOptional. Specifies the translated document's mime_type.\nIf not specified, the translated file's mime type will be the same as the\ninput file's mime type.\nCurrently only support the output mime type to be the same as input mime\ntype.\n\n- application/pdf\n- application/vnd.openxmlformats-officedocument.wordprocessingml.document\n- application/vnd.openxmlformats-officedocument.presentationml.presentation\n- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]]