// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.ads.admanager.v1;

option csharp_namespace = "Google.Ads.AdManager.V1";
option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager";
option java_multiple_files = true;
option java_outer_classname = "ContentEnumsProto";
option java_package = "com.google.ads.admanager.v1";
option php_namespace = "Google\\Ads\\AdManager\\V1";
option ruby_package = "Google::Ads::AdManager::V1";

// Wrapper message for
// [ContentStatus][google.ads.admanager.v1.ContentStatusEnum.ContentStatus]
message ContentStatusEnum {
  // Describes the status of a
  // [Content][google.ads.admanager.v1.Content] object.
  enum ContentStatus {
    // Default value. This value is unused.
    CONTENT_STATUS_UNSPECIFIED = 0;

    // Indicates the `Content` has been created and is eligible to have ads
    // served against it.
    ACTIVE = 1;

    // Indicates the `Content` has been deactivated and cannot have ads served
    // against it.
    INACTIVE = 2;

    // Indicates the `Content` has been archived; user-visible.
    ARCHIVED = 3;

    // Indicates the `Content` has been removed from an external CMS.
    DELETED = 4;

    // Indicates the `Content` is a duplicate of another piece of content.
    DUPLICATED = 5;
  }
}

// Wrapper message for
// [ContentStatusSource][google.ads.admanager.v1.ContentStatusSourceEnum.ContentStatusSource]
message ContentStatusSourceEnum {
  // Describes who defined the status of the
  // [Content][google.ads.admanager.v1.Content] object.
  enum ContentStatusSource {
    // Default value. This value is unused.
    CONTENT_STATUS_SOURCE_UNSPECIFIED = 0;

    // Indicates that the status of the `Content` is defined by the CMS.
    CMS = 1;

    // Indicates that the status of the `Content` is defined by the user.
    USER = 2;
  }
}

// Wrapper message for
// [DaiIngestStatus][google.ads.admanager.v1.DaiIngestStatusEnum.DaiIngestStatus]
message DaiIngestStatusEnum {
  // The status of the Dynamic Ad Insertion (DAI) ingestion process. Only
  // [Content][google.ads.admanager.v1.Content] with a status of
  // SUCCESS will be available for DAI.
  enum DaiIngestStatus {
    // Default value. This value is unused.
    DAI_INGEST_STATUS_UNSPECIFIED = 0;

    // The `Content` was successfully ingested for DAI.
    SUCCESS = 1;

    // There was a non-fatal issue during the DAI ingestion process.
    WARNING = 2;

    // The preconditioned `Content` was successfully ingested for DAI.
    INGESTED = 3;

    // There was a non-fatal issue during the DAI ingestion process on
    // preconditioned `Content`.
    INGESTED_WITH_WARNINGS = 4;

    // The unconditioned `Content` was successfully conditioned for DAI.
    CONDITIONED = 5;

    // There was a non-fatal issue during the DAI conditioning process on
    // originally unconditioned `Content`.
    CONDITIONED_WITH_WARNINGS = 6;

    // There was a non-fatal issue during the DAI ingestion process and the
    // `Content` is not available for dynamic ad insertion.
    FAILURE = 7;
  }
}

// Wrapper message for
// [DaiIngestErrorReason][google.ads.admanager.v1.DaiIngestErrorReasonEnum.DaiIngestErrorReason]
message DaiIngestErrorReasonEnum {
  // Represents an error associated with a Dynamic Ad Insertion (DAI)
  // [Content's][google.ads.admanager.v1.Content] status.
  enum DaiIngestErrorReason {
    // Default value. This value is unused.
    DAI_INGEST_ERROR_REASON_UNSPECIFIED = 0;

    // The ingest URL provided in the publisher's `Content` source feed is
    // invalid. The trigger for this error is the ingest URL specified in the
    // publisher's feed.
    INVALID_INGEST_URL = 1;

    // The closed caption URL provided in the publisher's `Content` source feed
    // is invalid.
    INVALID_CLOSED_CAPTION_URL = 2;

    // There is no closed caption URL for a `Content` in the publisher's
    // `Content` source feed. There is no trigger for this error.
    MISSING_CLOSED_CAPTION_URL = 3;

    // There was an error while trying to fetch the HLS from the specified
    // ingest URL. The trigger for this error is the ingest URL specified in the
    // publisher's feed.
    COULD_NOT_FETCH_HLS = 4;

    // There was an error while trying to fetch the subtitles from the specified
    // closed caption url. The trigger for this error is the closed caption URL
    // specified in the publisher's feed.
    COULD_NOT_FETCH_SUBTITLES = 5;

    // One of the subtitles from the closed caption URL is missing a language.
    // The trigger for this error is the closed caption URL that does not have a
    // language associated with it.
    MISSING_SUBTITLE_LANGUAGE = 6;

    // Error fetching the media files from the URLs specified in the master HLS
    // playlist. The trigger for this error is a media playlist URL within the
    // publisher's HLS playlist that could not be fetched.
    COULD_NOT_FETCH_MEDIA = 7;

    // The media from the publisher's CDN is malformed and cannot be
    // conditioned. The trigger for this error is a media playlist URL within
    // the publisher's HLS playlist that is malformed.
    MALFORMED_MEDIA_BYTES = 8;

    // A chapter time for the `Content` is outside of the range of the
    // `Content`'s duration. The trigger for this error is the chapter time (a
    // parsable long representing the time in ms) that is out of bounds.
    CHAPTER_TIME_OUT_OF_BOUNDS = 9;

    // An internal error occurred. There is no trigger for this error.
    INTERNAL_ERROR = 10;

    // The `Content` has chapter times but the `Content`'s source has no CDN
    // settings for midrolls. There is no trigger for this error.
    CONTENT_HAS_CHAPTER_TIMES_BUT_NO_MIDROLL_SETTINGS = 11;

    // There is bad/missing/malformed data in a media playlist. The trigger for
    // this error is the URL that points to the malformed media playlist.
    MALFORMED_MEDIA_PLAYLIST = 12;

    // Multiple ways of denoting ad breaks were detected in a media playlist
    // (e.g. placement opportunity tags, cue markers, etc.)
    MIXED_AD_BREAK_TAGS = 13;

    // The ad break tags in the preconditioned `Content` are not in the same
    // locations across all variant playlists.
    AD_BREAK_TAGS_INCONSISTENT_ACROSS_VARIANTS = 14;

    // There is bad/missing/malformed data in a subtitles file. The trigger for
    // this error is the URL that points to the malformed subtitles.
    MALFORMED_SUBTITLES = 15;

    // The subtitles sent to DAI are too large. The trigger for this error is
    // the URL that points to the master playlist.
    SUBTITLES_TOO_LARGE = 16;

    // A playlist item has a URL that does not begin with the ingest common path
    // provided in the DAI settings. The trigger for this error is the playlist
    // item URL.
    PLAYLIST_ITEM_URL_DOES_NOT_MATCH_INGEST_COMMON_PATH = 17;

    // Uploading split media segments failed due to an authentication error.
    COULD_NOT_UPLOAD_SPLIT_MEDIA_AUTHENTICATION_FAILED = 18;

    // Uploading spit media segments failed due to a connection error.
    COULD_NOT_UPLOAD_SPLIT_MEDIA_CONNECTION_FAILED = 19;

    // Uploading split media segments failed due to a write error.
    COULD_NOT_UPLOAD_SPLIT_MEDIA_WRITE_FAILED = 20;

    // Variants in a playlist do not have the same number of discontinuities.
    // The trigger for this error is the master playlist URI.
    PLAYLISTS_HAVE_DIFFERENT_NUMBER_OF_DISCONTINUITIES = 21;

    // The playlist does not have a starting PTS value. The trigger for this
    // error is the master playlist URI.
    PLAYLIST_HAS_NO_STARTING_PTS_VALUE = 22;

    // The PTS at a discontinuity varies too much between the different
    // variants. The trigger for this error is the master playlist URI.
    PLAYLIST_DISCONTINUITY_PTS_VALUES_DIFFER_TOO_MUCH = 23;

    // A media segment has no PTS. The trigger for this error is the segment
    // data URI.
    SEGMENT_HAS_NO_PTS = 24;

    // The language in the subtitles file does not match the language specified
    // in the feed. The trigger for this error is the feed language and the
    // parsed language separated by a semi-colon, e.g. "en;sp".
    SUBTITLE_LANGUAGE_DOES_NOT_MATCH_LANGUAGE_IN_FEED = 25;

    // There are multiple subtitles files at the closed caption URI, and none of
    // them match the language defined in the feed.
    CANNOT_DETERMINE_CORRECT_SUBTITLES_FOR_LANGUAGE = 26;

    // No CDN configuration found for the `Content`. The trigger for this error
    // is the `Content`'s master playlist URI.
    NO_CDN_CONFIG_FOUND = 27;

    // The `Content` has midrolls but there was no split `Content` config on the
    // CDN configuration for that `Content` so the `Content` was not
    // conditioned. There is no trigger for this error.
    CONTENT_HAS_MIDROLLS_BUT_NO_SPLIT_CONTENT_CONFIG = 28;

    // The `Content` has midrolls but the source the `Content` was ingested from
    // has mid-rolls disabled, so the `Content` was not conditioned. There is no
    // trigger for this error.
    CONTENT_HAS_MIDROLLS_BUT_SOURCE_HAS_MIDROLLS_DISABLED = 29;

    // Error parsing ADTS while splitting the `Content`. The trigger for this
    // error is the variant URL and the cue-point separated by a semi-colon,
    // e.g. "www.variant2.com;5000".
    ADTS_PARSE_ERROR = 30;

    // Error splitting an AAC segment. The trigger for this error is the variant
    // URL and the cue-point separated by a semi-colon, e.g.
    // "www.variant2.com;5000".
    AAC_SPLIT_ERROR = 31;

    // Error parsing an AAC file while splitting the `Content`. The trigger for
    // this error is the variant URL and the cue-point separated by a
    // semi-colon, e.g. "www.variant2.com;5000".
    AAC_PARSE_ERROR = 32;

    // Error parsing a TS file while splitting the `Content`. The trigger for
    // this error is the variant URL and the cue-point separated by a
    // semi-colon, e.g. "www.variant2.com;5000".
    TS_PARSE_ERROR = 33;

    // Error splitting a TS file while splitting the `Content`. The trigger for
    // this error is the variant URL and the cue-point separated by a
    // semi-colon, e.g. "www.variant2.com;5000".
    TS_SPLIT_ERROR = 34;

    // Encountered an unsupported container format while splitting the
    // `Content`. The trigger for this error is the variant URL and the
    // cue-point separated by a semi-colon, e.g. "www.variant2.com;5000".
    UNSUPPORTED_CONTAINER_FORMAT = 35;

    // Encountered multiple elementary streams of the same media type (audio,
    // video) within a transport stream. The trigger for this error is the
    // variant URL and the cue-point separated by a semi-colon, e.g.
    // "www.variant2.com;5000".
    MULTIPLE_ELEMENTARY_STREAMS_OF_SAME_MEDIA_TYPE_IN_TS = 36;

    // Encountered an unsupported TS media format while splitting the `Content`.
    // The trigger for this error is the variant URL and the cue-point separated
    // by a semi-colon, e.g. "www.variant2.com;5000".
    UNSUPPORTED_TS_MEDIA_FORMAT = 37;

    // Error splitting because there were no i-frames near the target split
    // point. The trigger for this error is the variant URL and the cue-point
    // separated by a semi-colon, e.g. "www.variant2.com;5000".
    NO_IFRAMES_NEAR_CUE_POINT = 38;

    // Error splitting an AC-3 segment. The trigger for this error is the
    // variant URL and the cue-point separated by a semi-colon, e.g.
    // "www.variant2.com;5000".
    AC3_SPLIT_ERROR = 39;

    // Error parsing an AC-3 file while splitting the `Content`. The trigger for
    // this error is the variant URL and the cue-point separated by a
    // semi-colon, e.g. "www.variant2.com;5000".
    AC3_PARSE_ERROR = 40;

    // Error splitting an E-AC-3 segment. The trigger for this error is the
    // variant URL and the cue-point separated by a semi-colon, e.g.
    // "www.variant2.com;5000".
    EAC3_SPLIT_ERROR = 41;

    // Error caused by an invalid encryption key. The trigger for this error is
    // a media playlist URL within the publisher's HLS playlist that has the
    // invalid encryption key.
    INVALID_ENCRYPTION_KEY = 42;

    // Error parsing an E-AC-3 file while splitting the `Content`. The trigger
    // for this error is the variant URL and the cue-point separated by a
    // semi-colon, e.g. "www.variant2.com;5000".
    EAC3_PARSE_ERROR = 43;

    // Error caused by the number of PTS being a different value than the number
    // of cue points + 1.
    CUE_POINT_COUNT_DOES_NOT_MATCH_PTS_COUNT = 44;

    // Error caused by the number of PTS being a different value than the number
    // of discontinuity tags + 1.
    DISCONTINUITY_COUNT_DOES_NOT_MATCH_PTS_COUNT = 45;

    // The DASH `Content` has cue points but they do not match the Event
    // durations from the DASH manifest EventStream, if present.
    DASH_CUE_POINT_EVENT_MISMATCH = 46;

    // The DASH manifest cannot be conditioned for midrolls.
    DASH_MANIFEST_CONDITIONING_FAILED = 47;

    // The DASH manifest cannot be conditioned for midrolls because one or more
    // of the cue points do not lie on a media segment boundary.
    DASH_MANIFEST_CONDITIONING_SEGMENT_BOUNDARY_ERROR = 48;

    // The subtitle language code should not contain "$$$$$".
    CLOSED_CAPTION_LANGUAGE_VALUE_INVALID = 49;

    // The subtitle name should not contain "$$$$$".
    CLOSED_CAPTION_NAME_VALUE_INVALID = 50;

    // The common subtitle characteristics values listed in the HLS spec are:
    // 1)"public.accessibility.transcribes-spoken-dialog",
    // 2)"public.accessibility.describes-music-and-sound",
    // 3)"public.easy-to-read";
    CLOSED_CAPTION_CHARACTERISTICS_VALUE_UNEXPECTED = 51;

    // Closed captions for a `Content` should be unique by 'language + name'.
    CLOSED_CAPTIONS_WITH_DUPLICATE_KEYS = 52;

    // Subtitles are defined in the `Content` source feed as well as inside the
    // stream manifest. Only feed subtitles will be ingested.
    SUBTITLES_PRESENT_IN_FEED_AND_MANIFEST = 53;

    // The media profile is invalid due to missing data.
    INVALID_MEDIA_PROFILE = 54;

    // Error caused when the PTS values do not align across chapters.
    CHAPTER_PTS_MISMATCH = 55;

    // Error occurred while chaptering renditions in the `Content`.
    CHAPTER_RENDITION_ERROR = 56;

    // Error during notification processing: invalid transcoding request.
    INVALID_TRANSCODING_REQUEST = 57;

    // Error during notification processing: transcode failed.
    TRANSCODE_FAILED = 58;

    // Error during playlist generation.
    PLAYLIST_GENERATION_FAILED = 59;

    // Error during DASH ingest: could not fetch DASH manifest.
    COULD_NOT_FETCH_DASH = 60;

    // Error during DASH ingest: malformed DASH manifest.
    MALFORMED_DASH = 61;

    // Error during DASH ingest: DASH conditioning not supported.
    DASH_CONDITIONING_NOT_SUPPORTED = 62;
  }
}
