<?php
/*
 * Copyright 2014 Google Inc.
 *
 * 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.
 */

namespace Google\Service\SA360;

class GoogleAdsSearchads360V23ServicesClickConversion extends \Google\Collection
{
  /**
   * Not specified.
   */
  public const CONVERSION_ENVIRONMENT_UNSPECIFIED = 'UNSPECIFIED';
  /**
   * Used for return value only. Represents value unknown in this version.
   */
  public const CONVERSION_ENVIRONMENT_UNKNOWN = 'UNKNOWN';
  /**
   * The conversion was recorded on an app.
   */
  public const CONVERSION_ENVIRONMENT_APP = 'APP';
  /**
   * The conversion was recorded on a website.
   */
  public const CONVERSION_ENVIRONMENT_WEB = 'WEB';
  /**
   * Not specified.
   */
  public const CUSTOMER_TYPE_UNSPECIFIED = 'UNSPECIFIED';
  /**
   * The value is unknown in this version.
   */
  public const CUSTOMER_TYPE_UNKNOWN = 'UNKNOWN';
  /**
   * Converting user is new to the advertiser.
   */
  public const CUSTOMER_TYPE_NEW = 'NEW';
  /**
   * Converting user is returning to the advertiser. Definition of returning
   * differs among conversion types, such as a second store visit versus a
   * second online purchase.
   */
  public const CUSTOMER_TYPE_RETURNING = 'RETURNING';
  protected $collection_key = 'userIdentifiers';
  protected $cartDataType = GoogleAdsSearchads360V23ServicesCartData::class;
  protected $cartDataDataType = '';
  protected $consentType = GoogleAdsSearchads360V23CommonConsent::class;
  protected $consentDataType = '';
  /**
   * Resource name of the conversion action associated with this conversion.
   * Note: Although this resource name consists of a customer id and a
   * conversion action id, validation will ignore the customer id and use the
   * conversion action id as the sole identifier of the conversion action.
   *
   * @var string
   */
  public $conversionAction;
  /**
   * The date time at which the conversion occurred. Must be after the click
   * time. The timezone must be specified. The format is "yyyy-mm-dd
   * hh:mm:ss+|-hh:mm", for example, "2019-01-01 12:32:45-08:00".
   *
   * @var string
   */
  public $conversionDateTime;
  /**
   * The environment this conversion was recorded on, for example, App or Web.
   *
   * @var string
   */
  public $conversionEnvironment;
  /**
   * The value of the conversion for the advertiser.
   *
   * @var 
   */
  public $conversionValue;
  /**
   * Currency associated with the conversion value. This is the ISO 4217
   * 3-character currency code. For example: USD, EUR.
   *
   * @var string
   */
  public $currencyCode;
  protected $customVariablesType = GoogleAdsSearchads360V23ServicesCustomVariable::class;
  protected $customVariablesDataType = 'array';
  /**
   * Type of the customer associated with the conversion (new or returning).
   *
   * @var string
   */
  public $customerType;
  protected $externalAttributionDataType = GoogleAdsSearchads360V23ServicesExternalAttributionData::class;
  protected $externalAttributionDataDataType = '';
  /**
   * The URL parameter for clicks associated with app conversions.
   *
   * @var string
   */
  public $gbraid;
  /**
   * The Google click ID (gclid) associated with this conversion.
   *
   * @var string
   */
  public $gclid;
  /**
   * The order ID associated with the conversion. An order id can only be used
   * for one conversion per conversion action.
   *
   * @var string
   */
  public $orderId;
  /**
   * The session attributes for the event, represented as a base64-encoded JSON
   * string. The content should be generated by Google-provided library. To set
   * session attributes individually, use session_attributes_key_value_pairs
   * instead. This field is only available to allowlisted users. To include this
   * field in conversion imports, upgrade to the Data Manager API.
   *
   * @var string
   */
  public $sessionAttributesEncoded;
  protected $sessionAttributesKeyValuePairsType = GoogleAdsSearchads360V23ServicesSessionAttributesKeyValuePairs::class;
  protected $sessionAttributesKeyValuePairsDataType = '';
  protected $userIdentifiersType = GoogleAdsSearchads360V23CommonUserIdentifier::class;
  protected $userIdentifiersDataType = 'array';
  /**
   * The IP address of the customer when they arrived on the landing page after
   * an ad click but before a conversion event. This is the IP address of the
   * customer's device, not the advertiser's server. Google Ads does not support
   * IP address matching for end users in the European Economic Area (EEA),
   * United Kingdom (UK), or Switzerland (CH). Add logic to conditionally
   * exclude sharing IP addresses from users from these regions and ensure that
   * you provide users with clear and comprehensive information about the data
   * you collect on your sites, apps, and other properties and get consent where
   * required by law or any applicable Google policies. See [About offline
   * conversion imports](//support.google.com/google-ads/answer/2998031) page
   * for more details. This field is only available to allowlisted users. To
   * include this field in conversion imports, upgrade to the Data Manager API.
   *
   * @var string
   */
  public $userIpAddress;
  /**
   * The URL parameter for clicks associated with web conversions.
   *
   * @var string
   */
  public $wbraid;

  /**
   * The cart data associated with this conversion.
   *
   * @param GoogleAdsSearchads360V23ServicesCartData $cartData
   */
  public function setCartData(GoogleAdsSearchads360V23ServicesCartData $cartData)
  {
    $this->cartData = $cartData;
  }
  /**
   * @return GoogleAdsSearchads360V23ServicesCartData
   */
  public function getCartData()
  {
    return $this->cartData;
  }
  /**
   * The consent setting for the event.
   *
   * @param GoogleAdsSearchads360V23CommonConsent $consent
   */
  public function setConsent(GoogleAdsSearchads360V23CommonConsent $consent)
  {
    $this->consent = $consent;
  }
  /**
   * @return GoogleAdsSearchads360V23CommonConsent
   */
  public function getConsent()
  {
    return $this->consent;
  }
  /**
   * Resource name of the conversion action associated with this conversion.
   * Note: Although this resource name consists of a customer id and a
   * conversion action id, validation will ignore the customer id and use the
   * conversion action id as the sole identifier of the conversion action.
   *
   * @param string $conversionAction
   */
  public function setConversionAction($conversionAction)
  {
    $this->conversionAction = $conversionAction;
  }
  /**
   * @return string
   */
  public function getConversionAction()
  {
    return $this->conversionAction;
  }
  /**
   * The date time at which the conversion occurred. Must be after the click
   * time. The timezone must be specified. The format is "yyyy-mm-dd
   * hh:mm:ss+|-hh:mm", for example, "2019-01-01 12:32:45-08:00".
   *
   * @param string $conversionDateTime
   */
  public function setConversionDateTime($conversionDateTime)
  {
    $this->conversionDateTime = $conversionDateTime;
  }
  /**
   * @return string
   */
  public function getConversionDateTime()
  {
    return $this->conversionDateTime;
  }
  /**
   * The environment this conversion was recorded on, for example, App or Web.
   *
   * Accepted values: UNSPECIFIED, UNKNOWN, APP, WEB
   *
   * @param self::CONVERSION_ENVIRONMENT_* $conversionEnvironment
   */
  public function setConversionEnvironment($conversionEnvironment)
  {
    $this->conversionEnvironment = $conversionEnvironment;
  }
  /**
   * @return self::CONVERSION_ENVIRONMENT_*
   */
  public function getConversionEnvironment()
  {
    return $this->conversionEnvironment;
  }
  public function setConversionValue($conversionValue)
  {
    $this->conversionValue = $conversionValue;
  }
  public function getConversionValue()
  {
    return $this->conversionValue;
  }
  /**
   * Currency associated with the conversion value. This is the ISO 4217
   * 3-character currency code. For example: USD, EUR.
   *
   * @param string $currencyCode
   */
  public function setCurrencyCode($currencyCode)
  {
    $this->currencyCode = $currencyCode;
  }
  /**
   * @return string
   */
  public function getCurrencyCode()
  {
    return $this->currencyCode;
  }
  /**
   * The custom variables associated with this conversion.
   *
   * @param GoogleAdsSearchads360V23ServicesCustomVariable[] $customVariables
   */
  public function setCustomVariables($customVariables)
  {
    $this->customVariables = $customVariables;
  }
  /**
   * @return GoogleAdsSearchads360V23ServicesCustomVariable[]
   */
  public function getCustomVariables()
  {
    return $this->customVariables;
  }
  /**
   * Type of the customer associated with the conversion (new or returning).
   *
   * Accepted values: UNSPECIFIED, UNKNOWN, NEW, RETURNING
   *
   * @param self::CUSTOMER_TYPE_* $customerType
   */
  public function setCustomerType($customerType)
  {
    $this->customerType = $customerType;
  }
  /**
   * @return self::CUSTOMER_TYPE_*
   */
  public function getCustomerType()
  {
    return $this->customerType;
  }
  /**
   * Additional data about externally attributed conversions. This field is
   * required for conversions with an externally attributed conversion action,
   * but should not be set otherwise.
   *
   * @param GoogleAdsSearchads360V23ServicesExternalAttributionData $externalAttributionData
   */
  public function setExternalAttributionData(GoogleAdsSearchads360V23ServicesExternalAttributionData $externalAttributionData)
  {
    $this->externalAttributionData = $externalAttributionData;
  }
  /**
   * @return GoogleAdsSearchads360V23ServicesExternalAttributionData
   */
  public function getExternalAttributionData()
  {
    return $this->externalAttributionData;
  }
  /**
   * The URL parameter for clicks associated with app conversions.
   *
   * @param string $gbraid
   */
  public function setGbraid($gbraid)
  {
    $this->gbraid = $gbraid;
  }
  /**
   * @return string
   */
  public function getGbraid()
  {
    return $this->gbraid;
  }
  /**
   * The Google click ID (gclid) associated with this conversion.
   *
   * @param string $gclid
   */
  public function setGclid($gclid)
  {
    $this->gclid = $gclid;
  }
  /**
   * @return string
   */
  public function getGclid()
  {
    return $this->gclid;
  }
  /**
   * The order ID associated with the conversion. An order id can only be used
   * for one conversion per conversion action.
   *
   * @param string $orderId
   */
  public function setOrderId($orderId)
  {
    $this->orderId = $orderId;
  }
  /**
   * @return string
   */
  public function getOrderId()
  {
    return $this->orderId;
  }
  /**
   * The session attributes for the event, represented as a base64-encoded JSON
   * string. The content should be generated by Google-provided library. To set
   * session attributes individually, use session_attributes_key_value_pairs
   * instead. This field is only available to allowlisted users. To include this
   * field in conversion imports, upgrade to the Data Manager API.
   *
   * @param string $sessionAttributesEncoded
   */
  public function setSessionAttributesEncoded($sessionAttributesEncoded)
  {
    $this->sessionAttributesEncoded = $sessionAttributesEncoded;
  }
  /**
   * @return string
   */
  public function getSessionAttributesEncoded()
  {
    return $this->sessionAttributesEncoded;
  }
  /**
   * The session attributes for the event, represented as key-value pairs. This
   * field is only available to allowlisted users. To include this field in
   * conversion imports, upgrade to the Data Manager API.
   *
   * @param GoogleAdsSearchads360V23ServicesSessionAttributesKeyValuePairs $sessionAttributesKeyValuePairs
   */
  public function setSessionAttributesKeyValuePairs(GoogleAdsSearchads360V23ServicesSessionAttributesKeyValuePairs $sessionAttributesKeyValuePairs)
  {
    $this->sessionAttributesKeyValuePairs = $sessionAttributesKeyValuePairs;
  }
  /**
   * @return GoogleAdsSearchads360V23ServicesSessionAttributesKeyValuePairs
   */
  public function getSessionAttributesKeyValuePairs()
  {
    return $this->sessionAttributesKeyValuePairs;
  }
  /**
   * The user identifiers associated with this conversion. Only hashed_email and
   * hashed_phone_number are supported for conversion uploads. The maximum
   * number of user identifiers for each conversion is 5.
   *
   * @param GoogleAdsSearchads360V23CommonUserIdentifier[] $userIdentifiers
   */
  public function setUserIdentifiers($userIdentifiers)
  {
    $this->userIdentifiers = $userIdentifiers;
  }
  /**
   * @return GoogleAdsSearchads360V23CommonUserIdentifier[]
   */
  public function getUserIdentifiers()
  {
    return $this->userIdentifiers;
  }
  /**
   * The IP address of the customer when they arrived on the landing page after
   * an ad click but before a conversion event. This is the IP address of the
   * customer's device, not the advertiser's server. Google Ads does not support
   * IP address matching for end users in the European Economic Area (EEA),
   * United Kingdom (UK), or Switzerland (CH). Add logic to conditionally
   * exclude sharing IP addresses from users from these regions and ensure that
   * you provide users with clear and comprehensive information about the data
   * you collect on your sites, apps, and other properties and get consent where
   * required by law or any applicable Google policies. See [About offline
   * conversion imports](//support.google.com/google-ads/answer/2998031) page
   * for more details. This field is only available to allowlisted users. To
   * include this field in conversion imports, upgrade to the Data Manager API.
   *
   * @param string $userIpAddress
   */
  public function setUserIpAddress($userIpAddress)
  {
    $this->userIpAddress = $userIpAddress;
  }
  /**
   * @return string
   */
  public function getUserIpAddress()
  {
    return $this->userIpAddress;
  }
  /**
   * The URL parameter for clicks associated with web conversions.
   *
   * @param string $wbraid
   */
  public function setWbraid($wbraid)
  {
    $this->wbraid = $wbraid;
  }
  /**
   * @return string
   */
  public function getWbraid()
  {
    return $this->wbraid;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleAdsSearchads360V23ServicesClickConversion::class, 'Google_Service_SA360_GoogleAdsSearchads360V23ServicesClickConversion');
