// 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 = "DaiSessionEnumsProto";
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
// [StitchingType][google.ads.admanager.v1.StitchingTypeEnum.StitchingType]
message StitchingTypeEnum {
  // Indicates how ads are stitched into the session.
  enum StitchingType {
    // Default value.
    STITCHING_TYPE_UNSPECIFIED = 0;

    // DAI stitches ad pods into the session.
    STITCHED = 1;

    // Ready to stitch ad pods are provided by DAI and stitched by the
    // publisher.
    POD_SERVING = 2;
  }
}

// Wrapper message for
// [ReportingType][google.ads.admanager.v1.ReportingTypeEnum.ReportingType]
message ReportingTypeEnum {
  // Indicates how ad tracking URLs are reported for the session.
  enum ReportingType {
    // Default value.
    REPORTING_TYPE_UNSPECIFIED = 0;

    // Tracking URLs are pinged on client side.
    CLIENT = 1;

    // Tracking URLs are pinged on server side.
    SERVER = 2;

    // Tracking URLs are pinged on server side upon receiving ad media
    // verification requests from client.
    CLIENT_INITIATED_SERVER_TRIGGERED = 3;
  }
}

// Wrapper message for
// [AdResponseType][google.ads.admanager.v1.AdResponseTypeEnum.AdResponseType]
message AdResponseTypeEnum {
  // The type of the ad response.
  enum AdResponseType {
    // Default value.
    AD_RESPONSE_TYPE_UNSPECIFIED = 0;

    // The ad response is VAST (Video Ad Serving Template).
    VAST = 1;

    // The ad response is VMAP (Video Multiple Ad Playlist).
    VMAP = 2;
  }
}

// Wrapper message for
// [BreakType][google.ads.admanager.v1.BreakTypeEnum.BreakType]
message BreakTypeEnum {
  // Different break types that DAI supports for ad insertion.
  enum BreakType {
    // Default value.
    BREAK_TYPE_UNSPECIFIED = 0;

    // Before content.
    PREROLL = 1;

    // In the middle of content.
    MIDROLL = 2;

    // After content.
    POSTROLL = 3;

    // Non-linear auxiliary ads run concurrently with the content (e.g., Pause
    // Ads).
    AUXILIARY = 4;
  }
}

// Wrapper message for
// [PrefetchStageType][google.ads.admanager.v1.PrefetchStageTypeEnum.PrefetchStageType]
message PrefetchStageTypeEnum {
  // Indicates the prefetch stage for an ad pod.
  enum PrefetchStageType {
    // Default value.
    PREFETCH_STAGE_TYPE_UNSPECIFIED = 0;

    // Prefetch stage 1.
    ONE = 1;

    // Prefetch stage 2.
    TWO = 2;

    // Prefetch is disabled for this ad pod.
    DISABLED = 3;
  }
}

// Wrapper message for
// [CreativeIdType][google.ads.admanager.v1.CreativeIdTypeEnum.CreativeIdType]
message CreativeIdTypeEnum {
  // The ID types in a VAST response to uniquely identify a creative.
  enum CreativeIdType {
    // Default value.
    CREATIVE_ID_TYPE_UNSPECIFIED = 0;

    // An ad server-defined ID string for the ad.
    AD_ID = 1;

    // An ad server-defined ID for the creative.
    CREATIVE_ID = 2;

    // Identifies the ad with which the creative is served. This is an
    // optional attribute of Creative element in the VAST specification.
    CREATIVE_AD_ID = 3;

    // A media URI was used to generate a hash value, hopefully unique to this
    // creative.
    MEDIA_URI_HASH = 4;

    // Universal Ad ID of the creative as defined in the VAST 4.0 spec:
    // http://www.iab.com/wp-content/uploads/2016/04/VAST4.0_Updated_April_2016.pdf
    // Section 3.7.1
    // The ID string format is "<Registry>|<Universal Ad ID>".
    UNIVERSAL_AD_ID = 5;

    // ID value is the path of the URL of the highest bitrate mediafile found in
    // the response.
    MEDIA_URI_PATH = 6;

    // ID value is the VAST/Ad/Inline/Creative `adId` attribute. If absent, the
    // value will fallback to the VAST/Ad/Inline/Creative `id` attribute. If
    // that is also absent, the value will again fallback to the VAST/Ad `id`
    // attribute.
    CREATIVE_AD_ID_WITH_FALLBACK = 8;

    // ID value is the URL of the highest bitrate mediafile found in the
    // response.
    MEDIA_URI = 9;

    // ID value is a projection of the URL of the highest bitrate mediafile
    // found in the response.
    CANONICALIZED_MEDIA_URI = 11;

    // ID value is the Google Video Registry ID.
    GOOGLE_VIDEO_REGISTRY_ID = 10;
  }
}

// Wrapper message for
// [SessionFindingSeverity][google.ads.admanager.v1.SessionFindingSeverityEnum.SessionFindingSeverity]
message SessionFindingSeverityEnum {
  // Severity levels for a finding.
  enum SessionFindingSeverity {
    // Default value.
    SESSION_FINDING_SEVERITY_UNSPECIFIED = 0;

    // The finding is informational.
    INFO = 1;

    // The finding is a warning.
    WARNING = 2;

    // The finding is an error.
    ERROR = 3;
  }
}

// Wrapper message for
// [PodFindingType][google.ads.admanager.v1.PodFindingTypeEnum.PodFindingType]
message PodFindingTypeEnum {
  // Types of findings that can occur while decisioning an ad pod.
  enum PodFindingType {
    // Default value.
    POD_FINDING_TYPE_UNSPECIFIED = 0;

    // Internal DAI error.
    INTERNAL_ERROR = 1;

    // Ad pod doesn't contain ad(s) available for insertion.
    AD_POD_DROPPED_EMPTY_ADS = 2;

    // Ad pod was dropped because the request is incompatible with the time
    // offset returned by the VMAP.
    AD_POD_DROPPED_INCOMPATIBLE_TIMEOFFSET = 3;

    // Ad pod was dropped because it was an unsupported type for this session.
    AD_POD_DROPPED_UNSUPPORTED_TYPE = 4;
  }
}

// Wrapper message for
// [SlateFindingType][google.ads.admanager.v1.SlateFindingTypeEnum.SlateFindingType]
message SlateFindingTypeEnum {
  // A finding that occurred regarding the slate creative.
  enum SlateFindingType {
    // Default value.
    SLATE_FINDING_TYPE_UNSPECIFIED = 0;

    // Internal DAI error.
    INTERNAL_ERROR = 1;

    // Slate was skipped for this ad break and underlying content was stitched
    // instead because slate was disabled for underfill or empty break.
    SLATE_STATUS_SKIPPED = 2;

    // Slate was not inserted into this ad break due to an unknown reason.
    SLATE_STATUS_DROPPED_UNKNOWN = 3;

    // The minimum amount of slate was inserted into an underfilled ad break to
    // cover the gap between the end of the ads and the next segment start of
    // the trimmed underlying linear content.
    SLATE_STATUS_MINIMUM_INSERTED = 4;
  }
}

// Wrapper message for
// [AdBreakFindingType][google.ads.admanager.v1.AdBreakFindingTypeEnum.AdBreakFindingType]
message AdBreakFindingTypeEnum {
  // A finding that occurred while serving an ad break for a session.
  enum AdBreakFindingType {
    // Default value.
    AD_BREAK_FINDING_TYPE_UNSPECIFIED = 0;

    // Internal DAI error.
    INTERNAL_ERROR = 1;

    // Ad pod was dropped, the number of ad breaks is less than the number of
    // decisioned ad pods.
    AD_POD_DROPPED_TOO_MANY_AD_PODS = 2;

    // Ad pod doesn't contain enough ads - requires more filler than
    // specified.
    EXCEEDS_MAX_FILLER = 3;

    // The midroll ad break was skipped due to overlapping with preroll.
    ADS_STATUS_DROPPED_FOR_PREROLL = 4;

    // Ad pod was dropped due to all of the ads in the pod missing their
    // assets, probably due to the assets not yet being transcoded.
    ADS_STATUS_ALL_ADS_MISSING_ASSETS = 5;

    // Ad pod is outside of the window at session creation time so ad pod was
    // skipped and underlying content was stitched instead.
    ADS_STATUS_OUT_OF_WINDOW = 6;

    // Ads are disabled for this session.
    ADS_STATUS_DISABLED = 7;

    // Decisioned ad pod couldn't be fetched from storage.
    ADS_STATUS_STORAGE_ERROR = 8;

    // Ad pod expired because the ad request couldn't finish before the
    // deadline.
    ADS_STATUS_EXPIRED = 9;

    // Ad pod occurred within the configured ad holiday.
    ADS_STATUS_HOLIDAY = 10;

    // Ad pod was dropped because slate was unavailable and underlying content
    // was stitched instead.
    ADS_STATUS_DROPPED_SLATE_UNAVAILABLE = 11;

    // Ad pod was dropped because there were no ads available before the
    // deadline.
    ADS_STATUS_NO_ADS_AVAILABLE_BEFORE_DEADLINE = 12;

    // Ad pod was dropped due to an invalid pod request.
    ADS_STATUS_INVALID_POD_REQUEST = 13;

    // The requested pre-roll break would overlap with a mid-roll ad break.
    ADS_STATUS_DROPPED_FOR_MIDROLL = 14;

    // The duration of the ad break was too short to request ads.
    ADS_STATUS_DROPPED_BREAK_DURATION_TOO_SHORT = 15;

    // Session created after the ad break ended.
    ADS_STATUS_DROPPED_STREAM_CREATED_AFTER_BREAK = 16;

    // Information about the content stream that is required to stitch the ads
    // is missing or unavailable.
    ADS_STATUS_DROPPED_MEDIA_ANALYSIS_UNAVAILABLE = 17;

    // The serving or insertion status of the ad break is unknown.
    ADS_STATUS_UNKNOWN = 18;

    // Ad break was not served.
    UNSERVED_BREAK = 19;

    // The content segment boundary at the end of the preroll has misaligned
    // video and audio segments.
    PREROLL_AUDIO_VIDEO_MISALIGNMENT = 20;
  }
}

// Wrapper message for
// [TrackingPingFindingType][google.ads.admanager.v1.TrackingPingFindingTypeEnum.TrackingPingFindingType]
message TrackingPingFindingTypeEnum {
  // A finding that occurred while pinging tracking URLs for a session.
  enum TrackingPingFindingType {
    // Default value.
    TRACKING_PING_FINDING_TYPE_UNSPECIFIED = 0;

    // Internal DAI error.
    INTERNAL_ERROR = 1;

    // Failed to ping a URL.
    FAILED_PING = 2;
  }
}

// Wrapper message for
// [CreativeFindingType][google.ads.admanager.v1.CreativeFindingTypeEnum.CreativeFindingType]
message CreativeFindingTypeEnum {
  // A finding that occurred while looking up creative information.
  enum CreativeFindingType {
    // Default value.
    CREATIVE_FINDING_TYPE_UNSPECIFIED = 0;

    // Ad was dropped because the VAST document returned did not contain
    // enough information to successfully identify the creative media.
    UNIDENTIFIED_AD_CREATIVE = 1;

    // Ad was dropped because the system has no knowledge of the creative
    // media to insert into the DAI session. Creative will be reactively loaded
    // into the system for subsequent use.
    UNKNOWN_AD_CREATIVE = 2;

    // Error occurred when performing lookup on the ad creative for insertion
    // into the DAI session.
    AD_CREATIVE_LOOKUP_FAILED = 3;

    // Creative has been disabled from serving.
    DISABLED_AD_CREATIVE = 4;

    // Ad creative is known but failed to acquire / transcode for serving.
    FAILED_AD_CREATIVE = 5;

    // Ad creative does not have suitable encodings available to be
    // successfully stitched into a DAI session.
    AD_CREATIVE_ENCODING_MATCH_FAILURE = 6;

    // Incorrect number of frames available for creative when exact frame
    // count is required for a specific duration.
    MISMATCHED_FRAME_COUNT = 7;

    // Ad creative doesn't have any encodings available.
    MISSING_TRANSCODES = 8;

    // Ad creative is dropped due to pod trimming to fit the break.
    AD_DROPPED_TO_FIT_BREAK = 9;
  }
}

// Wrapper message for
// [AdRequestFindingType][google.ads.admanager.v1.AdRequestFindingTypeEnum.AdRequestFindingType]
message AdRequestFindingTypeEnum {
  // A finding that occurred while making an ad request.
  enum AdRequestFindingType {
    // Default value.
    AD_REQUEST_FINDING_TYPE_UNSPECIFIED = 0;

    // Internal DAI error.
    INTERNAL_ERROR = 1;

    // An error while making an ad request.
    AD_REQUEST_ERROR = 2;

    // Generic VAST parsing error.
    VAST_PARSE_ERROR = 3;

    // AdSystem reported in VAST is not supported.
    UNSUPPORTED_AD_SYSTEM = 4;

    // Ad element does not contain enough information to generate a unique
    // transcode ID.
    CANNOT_FIND_UNIQUE_TRANSCODE_ID = 5;

    // No InLine elements found in the Ad.
    MISSING_INLINE_ELEMENTS = 7;

    // Reached the maximum number of VAST redirects.
    MAX_WRAPPER_DEPTH_REACHED = 8;

    // Error while parsing ad tag.
    AD_TAG_PARSE_ERROR = 9;

    // Generic VMAP parsing error.
    VMAP_PARSE_ERROR = 10;

    // Invalid VMAP data (Able to parse VMAP but XML attributes have invalid
    // data).
    INVALID_VMAP_RESPONSE = 11;

    // VMAP response contains no ad breaks.
    NO_AD_BREAKS_IN_VMAP = 12;

    // VMAP contains custom ad source which is not supported.
    CUSTOM_AD_SOURCE_IN_VMAP = 13;

    // VMAP contains an adbreak that is not supported.
    AD_BREAK_TYPE_NOT_SUPPORTED = 14;

    // VMAP contains an adbreak that has neither ad source nor tracking
    // events.
    NEITHER_AD_SOURCE_NOR_TRACKING = 15;

    // Client doesn't support skippable ads. The ad was a skippable ad.
    SKIPPABLE_AD_NOT_SUPPORTED = 16;

    // The request has timed out.
    AD_REQUEST_TIMEOUT = 17;

    // The same ad tag was already used in the same pod.
    DUPLICATE_AD_TAG = 18;

    // VMAP AdSource followRedirects is set as false.
    FOLLOW_REDIRECTS_IS_FALSE = 19;

    // VAST version is not supported.
    UNSUPPORTED_VAST_VERSION = 20;

    // No media files were found in the VAST ad.
    NO_VALID_MEDIAFILES_FOUND = 21;
  }
}
