// Code generated by Fern. DO NOT EDIT.

package api

import (
	json "encoding/json"
	fmt "fmt"
	big "math/big"
	internal "pentagi/pkg/observability/langfuse/api/internal"
	time "time"
)

var (
	mediaGetRequestFieldMediaID = big.NewInt(1 << 0)
)

type MediaGetRequest struct {
	// The unique langfuse identifier of a media record
	MediaID string `json:"-" url:"-"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
}

func (m *MediaGetRequest) require(field *big.Int) {
	if m.explicitFields == nil {
		m.explicitFields = big.NewInt(0)
	}
	m.explicitFields.Or(m.explicitFields, field)
}

// SetMediaID sets the MediaID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (m *MediaGetRequest) SetMediaID(mediaID string) {
	m.MediaID = mediaID
	m.require(mediaGetRequestFieldMediaID)
}

var (
	getMediaUploadURLRequestFieldTraceID       = big.NewInt(1 << 0)
	getMediaUploadURLRequestFieldObservationID = big.NewInt(1 << 1)
	getMediaUploadURLRequestFieldContentType   = big.NewInt(1 << 2)
	getMediaUploadURLRequestFieldContentLength = big.NewInt(1 << 3)
	getMediaUploadURLRequestFieldSha256Hash    = big.NewInt(1 << 4)
	getMediaUploadURLRequestFieldField         = big.NewInt(1 << 5)
)

type GetMediaUploadURLRequest struct {
	// The trace ID associated with the media record
	TraceID string `json:"traceId" url:"-"`
	// The observation ID associated with the media record. If the media record is associated directly with a trace, this will be null.
	ObservationID *string          `json:"observationId,omitempty" url:"-"`
	ContentType   MediaContentType `json:"contentType" url:"-"`
	// The size of the media record in bytes
	ContentLength int `json:"contentLength" url:"-"`
	// The SHA-256 hash of the media record
	Sha256Hash string `json:"sha256Hash" url:"-"`
	// The trace / observation field the media record is associated with. This can be one of `input`, `output`, `metadata`
	Field string `json:"field" url:"-"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
}

func (g *GetMediaUploadURLRequest) require(field *big.Int) {
	if g.explicitFields == nil {
		g.explicitFields = big.NewInt(0)
	}
	g.explicitFields.Or(g.explicitFields, field)
}

// SetTraceID sets the TraceID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetMediaUploadURLRequest) SetTraceID(traceID string) {
	g.TraceID = traceID
	g.require(getMediaUploadURLRequestFieldTraceID)
}

// SetObservationID sets the ObservationID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetMediaUploadURLRequest) SetObservationID(observationID *string) {
	g.ObservationID = observationID
	g.require(getMediaUploadURLRequestFieldObservationID)
}

// SetContentType sets the ContentType field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetMediaUploadURLRequest) SetContentType(contentType MediaContentType) {
	g.ContentType = contentType
	g.require(getMediaUploadURLRequestFieldContentType)
}

// SetContentLength sets the ContentLength field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetMediaUploadURLRequest) SetContentLength(contentLength int) {
	g.ContentLength = contentLength
	g.require(getMediaUploadURLRequestFieldContentLength)
}

// SetSha256Hash sets the Sha256Hash field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetMediaUploadURLRequest) SetSha256Hash(sha256Hash string) {
	g.Sha256Hash = sha256Hash
	g.require(getMediaUploadURLRequestFieldSha256Hash)
}

// SetField sets the Field field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetMediaUploadURLRequest) SetField(field string) {
	g.Field = field
	g.require(getMediaUploadURLRequestFieldField)
}

func (g *GetMediaUploadURLRequest) UnmarshalJSON(data []byte) error {
	type unmarshaler GetMediaUploadURLRequest
	var body unmarshaler
	if err := json.Unmarshal(data, &body); err != nil {
		return err
	}
	*g = GetMediaUploadURLRequest(body)
	return nil
}

func (g *GetMediaUploadURLRequest) MarshalJSON() ([]byte, error) {
	type embed GetMediaUploadURLRequest
	var marshaler = struct {
		embed
	}{
		embed: embed(*g),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, g.explicitFields)
	return json.Marshal(explicitMarshaler)
}

var (
	patchMediaBodyFieldMediaID          = big.NewInt(1 << 0)
	patchMediaBodyFieldUploadedAt       = big.NewInt(1 << 1)
	patchMediaBodyFieldUploadHTTPStatus = big.NewInt(1 << 2)
	patchMediaBodyFieldUploadHTTPError  = big.NewInt(1 << 3)
	patchMediaBodyFieldUploadTimeMs     = big.NewInt(1 << 4)
)

type PatchMediaBody struct {
	// The unique langfuse identifier of a media record
	MediaID string `json:"-" url:"-"`
	// The date and time when the media record was uploaded
	UploadedAt time.Time `json:"uploadedAt" url:"-"`
	// The HTTP status code of the upload
	UploadHTTPStatus int `json:"uploadHttpStatus" url:"-"`
	// The HTTP error message of the upload
	UploadHTTPError *string `json:"uploadHttpError,omitempty" url:"-"`
	// The time in milliseconds it took to upload the media record
	UploadTimeMs *int `json:"uploadTimeMs,omitempty" url:"-"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
}

func (p *PatchMediaBody) require(field *big.Int) {
	if p.explicitFields == nil {
		p.explicitFields = big.NewInt(0)
	}
	p.explicitFields.Or(p.explicitFields, field)
}

// SetMediaID sets the MediaID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (p *PatchMediaBody) SetMediaID(mediaID string) {
	p.MediaID = mediaID
	p.require(patchMediaBodyFieldMediaID)
}

// SetUploadedAt sets the UploadedAt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (p *PatchMediaBody) SetUploadedAt(uploadedAt time.Time) {
	p.UploadedAt = uploadedAt
	p.require(patchMediaBodyFieldUploadedAt)
}

// SetUploadHTTPStatus sets the UploadHTTPStatus field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (p *PatchMediaBody) SetUploadHTTPStatus(uploadHTTPStatus int) {
	p.UploadHTTPStatus = uploadHTTPStatus
	p.require(patchMediaBodyFieldUploadHTTPStatus)
}

// SetUploadHTTPError sets the UploadHTTPError field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (p *PatchMediaBody) SetUploadHTTPError(uploadHTTPError *string) {
	p.UploadHTTPError = uploadHTTPError
	p.require(patchMediaBodyFieldUploadHTTPError)
}

// SetUploadTimeMs sets the UploadTimeMs field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (p *PatchMediaBody) SetUploadTimeMs(uploadTimeMs *int) {
	p.UploadTimeMs = uploadTimeMs
	p.require(patchMediaBodyFieldUploadTimeMs)
}

func (p *PatchMediaBody) UnmarshalJSON(data []byte) error {
	type unmarshaler PatchMediaBody
	var body unmarshaler
	if err := json.Unmarshal(data, &body); err != nil {
		return err
	}
	*p = PatchMediaBody(body)
	return nil
}

func (p *PatchMediaBody) MarshalJSON() ([]byte, error) {
	type embed PatchMediaBody
	var marshaler = struct {
		embed
		UploadedAt *internal.DateTime `json:"uploadedAt"`
	}{
		embed:      embed(*p),
		UploadedAt: internal.NewDateTime(p.UploadedAt),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, p.explicitFields)
	return json.Marshal(explicitMarshaler)
}

var (
	getMediaResponseFieldMediaID       = big.NewInt(1 << 0)
	getMediaResponseFieldContentType   = big.NewInt(1 << 1)
	getMediaResponseFieldContentLength = big.NewInt(1 << 2)
	getMediaResponseFieldUploadedAt    = big.NewInt(1 << 3)
	getMediaResponseFieldURL           = big.NewInt(1 << 4)
	getMediaResponseFieldURLExpiry     = big.NewInt(1 << 5)
)

type GetMediaResponse struct {
	// The unique langfuse identifier of a media record
	MediaID string `json:"mediaId" url:"mediaId"`
	// The MIME type of the media record
	ContentType string `json:"contentType" url:"contentType"`
	// The size of the media record in bytes
	ContentLength int `json:"contentLength" url:"contentLength"`
	// The date and time when the media record was uploaded
	UploadedAt time.Time `json:"uploadedAt" url:"uploadedAt"`
	// The download URL of the media record
	URL string `json:"url" url:"url"`
	// The expiry date and time of the media record download URL
	URLExpiry string `json:"urlExpiry" url:"urlExpiry"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (g *GetMediaResponse) GetMediaID() string {
	if g == nil {
		return ""
	}
	return g.MediaID
}

func (g *GetMediaResponse) GetContentType() string {
	if g == nil {
		return ""
	}
	return g.ContentType
}

func (g *GetMediaResponse) GetContentLength() int {
	if g == nil {
		return 0
	}
	return g.ContentLength
}

func (g *GetMediaResponse) GetUploadedAt() time.Time {
	if g == nil {
		return time.Time{}
	}
	return g.UploadedAt
}

func (g *GetMediaResponse) GetURL() string {
	if g == nil {
		return ""
	}
	return g.URL
}

func (g *GetMediaResponse) GetURLExpiry() string {
	if g == nil {
		return ""
	}
	return g.URLExpiry
}

func (g *GetMediaResponse) GetExtraProperties() map[string]interface{} {
	return g.extraProperties
}

func (g *GetMediaResponse) require(field *big.Int) {
	if g.explicitFields == nil {
		g.explicitFields = big.NewInt(0)
	}
	g.explicitFields.Or(g.explicitFields, field)
}

// SetMediaID sets the MediaID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetMediaResponse) SetMediaID(mediaID string) {
	g.MediaID = mediaID
	g.require(getMediaResponseFieldMediaID)
}

// SetContentType sets the ContentType field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetMediaResponse) SetContentType(contentType string) {
	g.ContentType = contentType
	g.require(getMediaResponseFieldContentType)
}

// SetContentLength sets the ContentLength field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetMediaResponse) SetContentLength(contentLength int) {
	g.ContentLength = contentLength
	g.require(getMediaResponseFieldContentLength)
}

// SetUploadedAt sets the UploadedAt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetMediaResponse) SetUploadedAt(uploadedAt time.Time) {
	g.UploadedAt = uploadedAt
	g.require(getMediaResponseFieldUploadedAt)
}

// SetURL sets the URL field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetMediaResponse) SetURL(url string) {
	g.URL = url
	g.require(getMediaResponseFieldURL)
}

// SetURLExpiry sets the URLExpiry field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetMediaResponse) SetURLExpiry(urlExpiry string) {
	g.URLExpiry = urlExpiry
	g.require(getMediaResponseFieldURLExpiry)
}

func (g *GetMediaResponse) UnmarshalJSON(data []byte) error {
	type embed GetMediaResponse
	var unmarshaler = struct {
		embed
		UploadedAt *internal.DateTime `json:"uploadedAt"`
	}{
		embed: embed(*g),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*g = GetMediaResponse(unmarshaler.embed)
	g.UploadedAt = unmarshaler.UploadedAt.Time()
	extraProperties, err := internal.ExtractExtraProperties(data, *g)
	if err != nil {
		return err
	}
	g.extraProperties = extraProperties
	g.rawJSON = json.RawMessage(data)
	return nil
}

func (g *GetMediaResponse) MarshalJSON() ([]byte, error) {
	type embed GetMediaResponse
	var marshaler = struct {
		embed
		UploadedAt *internal.DateTime `json:"uploadedAt"`
	}{
		embed:      embed(*g),
		UploadedAt: internal.NewDateTime(g.UploadedAt),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, g.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (g *GetMediaResponse) String() string {
	if len(g.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(g.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(g); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", g)
}

var (
	getMediaUploadURLResponseFieldUploadURL = big.NewInt(1 << 0)
	getMediaUploadURLResponseFieldMediaID   = big.NewInt(1 << 1)
)

type GetMediaUploadURLResponse struct {
	// The presigned upload URL. If the asset is already uploaded, this will be null
	UploadURL *string `json:"uploadUrl,omitempty" url:"uploadUrl,omitempty"`
	// The unique langfuse identifier of a media record
	MediaID string `json:"mediaId" url:"mediaId"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (g *GetMediaUploadURLResponse) GetUploadURL() *string {
	if g == nil {
		return nil
	}
	return g.UploadURL
}

func (g *GetMediaUploadURLResponse) GetMediaID() string {
	if g == nil {
		return ""
	}
	return g.MediaID
}

func (g *GetMediaUploadURLResponse) GetExtraProperties() map[string]interface{} {
	return g.extraProperties
}

func (g *GetMediaUploadURLResponse) require(field *big.Int) {
	if g.explicitFields == nil {
		g.explicitFields = big.NewInt(0)
	}
	g.explicitFields.Or(g.explicitFields, field)
}

// SetUploadURL sets the UploadURL field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetMediaUploadURLResponse) SetUploadURL(uploadURL *string) {
	g.UploadURL = uploadURL
	g.require(getMediaUploadURLResponseFieldUploadURL)
}

// SetMediaID sets the MediaID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetMediaUploadURLResponse) SetMediaID(mediaID string) {
	g.MediaID = mediaID
	g.require(getMediaUploadURLResponseFieldMediaID)
}

func (g *GetMediaUploadURLResponse) UnmarshalJSON(data []byte) error {
	type unmarshaler GetMediaUploadURLResponse
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*g = GetMediaUploadURLResponse(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *g)
	if err != nil {
		return err
	}
	g.extraProperties = extraProperties
	g.rawJSON = json.RawMessage(data)
	return nil
}

func (g *GetMediaUploadURLResponse) MarshalJSON() ([]byte, error) {
	type embed GetMediaUploadURLResponse
	var marshaler = struct {
		embed
	}{
		embed: embed(*g),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, g.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (g *GetMediaUploadURLResponse) String() string {
	if len(g.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(g.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(g); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", g)
}

// The MIME type of the media record
type MediaContentType string

const (
	MediaContentTypeImagePng                                                             MediaContentType = "image/png"
	MediaContentTypeImageJpeg                                                            MediaContentType = "image/jpeg"
	MediaContentTypeImageJpg                                                             MediaContentType = "image/jpg"
	MediaContentTypeImageWebp                                                            MediaContentType = "image/webp"
	MediaContentTypeImageGif                                                             MediaContentType = "image/gif"
	MediaContentTypeImageSvgXML                                                          MediaContentType = "image/svg+xml"
	MediaContentTypeImageTiff                                                            MediaContentType = "image/tiff"
	MediaContentTypeImageBmp                                                             MediaContentType = "image/bmp"
	MediaContentTypeImageAvif                                                            MediaContentType = "image/avif"
	MediaContentTypeImageHeic                                                            MediaContentType = "image/heic"
	MediaContentTypeAudioMpeg                                                            MediaContentType = "audio/mpeg"
	MediaContentTypeAudioMp3                                                             MediaContentType = "audio/mp3"
	MediaContentTypeAudioWav                                                             MediaContentType = "audio/wav"
	MediaContentTypeAudioOgg                                                             MediaContentType = "audio/ogg"
	MediaContentTypeAudioOga                                                             MediaContentType = "audio/oga"
	MediaContentTypeAudioAac                                                             MediaContentType = "audio/aac"
	MediaContentTypeAudioMp4                                                             MediaContentType = "audio/mp4"
	MediaContentTypeAudioFlac                                                            MediaContentType = "audio/flac"
	MediaContentTypeAudioOpus                                                            MediaContentType = "audio/opus"
	MediaContentTypeAudioWebm                                                            MediaContentType = "audio/webm"
	MediaContentTypeVideoMp4                                                             MediaContentType = "video/mp4"
	MediaContentTypeVideoWebm                                                            MediaContentType = "video/webm"
	MediaContentTypeVideoOgg                                                             MediaContentType = "video/ogg"
	MediaContentTypeVideoMpeg                                                            MediaContentType = "video/mpeg"
	MediaContentTypeVideoQuicktime                                                       MediaContentType = "video/quicktime"
	MediaContentTypeVideoXMsvideo                                                        MediaContentType = "video/x-msvideo"
	MediaContentTypeVideoXMatroska                                                       MediaContentType = "video/x-matroska"
	MediaContentTypeTextPlain                                                            MediaContentType = "text/plain"
	MediaContentTypeTextHTML                                                             MediaContentType = "text/html"
	MediaContentTypeTextCSS                                                              MediaContentType = "text/css"
	MediaContentTypeTextCsv                                                              MediaContentType = "text/csv"
	MediaContentTypeTextMarkdown                                                         MediaContentType = "text/markdown"
	MediaContentTypeTextXPython                                                          MediaContentType = "text/x-python"
	MediaContentTypeApplicationJavascript                                                MediaContentType = "application/javascript"
	MediaContentTypeTextXTypescript                                                      MediaContentType = "text/x-typescript"
	MediaContentTypeApplicationXYaml                                                     MediaContentType = "application/x-yaml"
	MediaContentTypeApplicationPdf                                                       MediaContentType = "application/pdf"
	MediaContentTypeApplicationMsword                                                    MediaContentType = "application/msword"
	MediaContentTypeApplicationVndMsExcel                                                MediaContentType = "application/vnd.ms-excel"
	MediaContentTypeApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet         MediaContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
	MediaContentTypeApplicationZip                                                       MediaContentType = "application/zip"
	MediaContentTypeApplicationJSON                                                      MediaContentType = "application/json"
	MediaContentTypeApplicationXML                                                       MediaContentType = "application/xml"
	MediaContentTypeApplicationOctetStream                                               MediaContentType = "application/octet-stream"
	MediaContentTypeApplicationVndOpenxmlformatsOfficedocumentWordprocessingmlDocument   MediaContentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
	MediaContentTypeApplicationVndOpenxmlformatsOfficedocumentPresentationmlPresentation MediaContentType = "application/vnd.openxmlformats-officedocument.presentationml.presentation"
	MediaContentTypeApplicationRtf                                                       MediaContentType = "application/rtf"
	MediaContentTypeApplicationXNdjson                                                   MediaContentType = "application/x-ndjson"
	MediaContentTypeApplicationVndApacheParquet                                          MediaContentType = "application/vnd.apache.parquet"
	MediaContentTypeApplicationGzip                                                      MediaContentType = "application/gzip"
	MediaContentTypeApplicationXTar                                                      MediaContentType = "application/x-tar"
	MediaContentTypeApplicationX7ZCompressed                                             MediaContentType = "application/x-7z-compressed"
)

func NewMediaContentTypeFromString(s string) (MediaContentType, error) {
	switch s {
	case "image/png":
		return MediaContentTypeImagePng, nil
	case "image/jpeg":
		return MediaContentTypeImageJpeg, nil
	case "image/jpg":
		return MediaContentTypeImageJpg, nil
	case "image/webp":
		return MediaContentTypeImageWebp, nil
	case "image/gif":
		return MediaContentTypeImageGif, nil
	case "image/svg+xml":
		return MediaContentTypeImageSvgXML, nil
	case "image/tiff":
		return MediaContentTypeImageTiff, nil
	case "image/bmp":
		return MediaContentTypeImageBmp, nil
	case "image/avif":
		return MediaContentTypeImageAvif, nil
	case "image/heic":
		return MediaContentTypeImageHeic, nil
	case "audio/mpeg":
		return MediaContentTypeAudioMpeg, nil
	case "audio/mp3":
		return MediaContentTypeAudioMp3, nil
	case "audio/wav":
		return MediaContentTypeAudioWav, nil
	case "audio/ogg":
		return MediaContentTypeAudioOgg, nil
	case "audio/oga":
		return MediaContentTypeAudioOga, nil
	case "audio/aac":
		return MediaContentTypeAudioAac, nil
	case "audio/mp4":
		return MediaContentTypeAudioMp4, nil
	case "audio/flac":
		return MediaContentTypeAudioFlac, nil
	case "audio/opus":
		return MediaContentTypeAudioOpus, nil
	case "audio/webm":
		return MediaContentTypeAudioWebm, nil
	case "video/mp4":
		return MediaContentTypeVideoMp4, nil
	case "video/webm":
		return MediaContentTypeVideoWebm, nil
	case "video/ogg":
		return MediaContentTypeVideoOgg, nil
	case "video/mpeg":
		return MediaContentTypeVideoMpeg, nil
	case "video/quicktime":
		return MediaContentTypeVideoQuicktime, nil
	case "video/x-msvideo":
		return MediaContentTypeVideoXMsvideo, nil
	case "video/x-matroska":
		return MediaContentTypeVideoXMatroska, nil
	case "text/plain":
		return MediaContentTypeTextPlain, nil
	case "text/html":
		return MediaContentTypeTextHTML, nil
	case "text/css":
		return MediaContentTypeTextCSS, nil
	case "text/csv":
		return MediaContentTypeTextCsv, nil
	case "text/markdown":
		return MediaContentTypeTextMarkdown, nil
	case "text/x-python":
		return MediaContentTypeTextXPython, nil
	case "application/javascript":
		return MediaContentTypeApplicationJavascript, nil
	case "text/x-typescript":
		return MediaContentTypeTextXTypescript, nil
	case "application/x-yaml":
		return MediaContentTypeApplicationXYaml, nil
	case "application/pdf":
		return MediaContentTypeApplicationPdf, nil
	case "application/msword":
		return MediaContentTypeApplicationMsword, nil
	case "application/vnd.ms-excel":
		return MediaContentTypeApplicationVndMsExcel, nil
	case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":
		return MediaContentTypeApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet, nil
	case "application/zip":
		return MediaContentTypeApplicationZip, nil
	case "application/json":
		return MediaContentTypeApplicationJSON, nil
	case "application/xml":
		return MediaContentTypeApplicationXML, nil
	case "application/octet-stream":
		return MediaContentTypeApplicationOctetStream, nil
	case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
		return MediaContentTypeApplicationVndOpenxmlformatsOfficedocumentWordprocessingmlDocument, nil
	case "application/vnd.openxmlformats-officedocument.presentationml.presentation":
		return MediaContentTypeApplicationVndOpenxmlformatsOfficedocumentPresentationmlPresentation, nil
	case "application/rtf":
		return MediaContentTypeApplicationRtf, nil
	case "application/x-ndjson":
		return MediaContentTypeApplicationXNdjson, nil
	case "application/vnd.apache.parquet":
		return MediaContentTypeApplicationVndApacheParquet, nil
	case "application/gzip":
		return MediaContentTypeApplicationGzip, nil
	case "application/x-tar":
		return MediaContentTypeApplicationXTar, nil
	case "application/x-7z-compressed":
		return MediaContentTypeApplicationX7ZCompressed, nil
	}
	var t MediaContentType
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (m MediaContentType) Ptr() *MediaContentType {
	return &m
}
