// Copyright 2025 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.googleads.v21.common;

import "google/ads/googleads/v21/common/custom_parameter.proto";
import "google/ads/googleads/v21/enums/call_conversion_reporting_state.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";

option csharp_namespace = "Google.Ads.GoogleAds.V21.Common";
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v21/common;common";
option java_multiple_files = true;
option java_outer_classname = "ExtensionsProto";
option java_package = "com.google.ads.googleads.v21.common";
option objc_class_prefix = "GAA";
option php_namespace = "Google\\Ads\\GoogleAds\\V21\\Common";
option ruby_package = "Google::Ads::GoogleAds::V21::Common";

// Proto file describing extension types.

// Represents a Call extension.
message CallFeedItem {
  // The advertiser's phone number to append to the ad.
  // This string must not be empty.
  optional string phone_number = 7;

  // Uppercase two-letter country code of the advertiser's phone number.
  // This string must not be empty.
  optional string country_code = 8;

  // Indicates whether call tracking is enabled. By default, call tracking is
  // not enabled.
  optional bool call_tracking_enabled = 9;

  // The conversion action to attribute a call conversion to. If not set a
  // default conversion action is used. This field only has effect if
  // call_tracking_enabled is set to true. Otherwise this field is ignored.
  optional string call_conversion_action = 10;

  // If true, disable call conversion tracking. call_conversion_action should
  // not be set if this is true. Optional.
  optional bool call_conversion_tracking_disabled = 11;

  // Enum value that indicates whether this call extension uses its own call
  // conversion setting (or just have call conversion disabled), or following
  // the account level setting.
  google.ads.googleads.v21.enums.CallConversionReportingStateEnum
      .CallConversionReportingState call_conversion_reporting_state = 6;
}

// Represents a callout extension.
message CalloutFeedItem {
  // The callout text.
  // The length of this string should be between 1 and 25, inclusive.
  optional string callout_text = 2;
}

// Represents a sitelink.
message SitelinkFeedItem {
  // URL display text for the sitelink.
  // The length of this string should be between 1 and 25, inclusive.
  optional string link_text = 9;

  // First line of the description for the sitelink.
  // If this value is set, line2 must also be set.
  // The length of this string should be between 0 and 35, inclusive.
  optional string line1 = 10;

  // Second line of the description for the sitelink.
  // If this value is set, line1 must also be set.
  // The length of this string should be between 0 and 35, inclusive.
  optional string line2 = 11;

  // A list of possible final URLs after all cross domain redirects.
  repeated string final_urls = 12;

  // A list of possible final mobile URLs after all cross domain redirects.
  repeated string final_mobile_urls = 13;

  // URL template for constructing a tracking URL.
  optional string tracking_url_template = 14;

  // A list of mappings to be used for substituting URL custom parameter tags in
  // the tracking_url_template, final_urls, and/or final_mobile_urls.
  repeated CustomParameter url_custom_parameters = 7;

  // Final URL suffix to be appended to landing page URLs served with
  // parallel tracking.
  optional string final_url_suffix = 15;
}
