<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v23/resources/customer_sk_ad_network_conversion_value_schema.proto

namespace Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Defines a Google conversion event that the conversion value is mapped to.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.Event</code>
 */
class Event extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Google event name represented by this conversion value.
     *
     * Generated from protobuf field <code>string mapped_event_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $mapped_event_name = '';
    /**
     * Output only. The reported currency for the event_revenue. ISO 4217
     * three-letter currency code, for example, "USD"
     *
     * Generated from protobuf field <code>string currency_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $currency_code = '';
    protected $revenue_rate;
    protected $event_rate;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $mapped_event_name
     *           Output only. Google event name represented by this conversion value.
     *     @type string $currency_code
     *           Output only. The reported currency for the event_revenue. ISO 4217
     *           three-letter currency code, for example, "USD"
     *     @type \Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\Event\RevenueRange $event_revenue_range
     *           Output only. The event revenue range.
     *     @type float $event_revenue_value
     *           Output only. The specific event revenue value.
     *     @type \Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\Event\EventOccurrenceRange $event_occurrence_range
     *           Output only. The event counter range.
     *     @type int|string $event_counter
     *           Output only. For specific event counter values.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Google event name represented by this conversion value.
     *
     * Generated from protobuf field <code>string mapped_event_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getMappedEventName()
    {
        return $this->mapped_event_name;
    }

    /**
     * Output only. Google event name represented by this conversion value.
     *
     * Generated from protobuf field <code>string mapped_event_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setMappedEventName($var)
    {
        GPBUtil::checkString($var, True);
        $this->mapped_event_name = $var;

        return $this;
    }

    /**
     * Output only. The reported currency for the event_revenue. ISO 4217
     * three-letter currency code, for example, "USD"
     *
     * Generated from protobuf field <code>string currency_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getCurrencyCode()
    {
        return $this->currency_code;
    }

    /**
     * Output only. The reported currency for the event_revenue. ISO 4217
     * three-letter currency code, for example, "USD"
     *
     * Generated from protobuf field <code>string currency_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setCurrencyCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->currency_code = $var;

        return $this;
    }

    /**
     * Output only. The event revenue range.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.Event.RevenueRange event_revenue_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\Event\RevenueRange|null
     */
    public function getEventRevenueRange()
    {
        return $this->readOneof(3);
    }

    public function hasEventRevenueRange()
    {
        return $this->hasOneof(3);
    }

    /**
     * Output only. The event revenue range.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.Event.RevenueRange event_revenue_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\Event\RevenueRange $var
     * @return $this
     */
    public function setEventRevenueRange($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\Event\RevenueRange::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Output only. The specific event revenue value.
     *
     * Generated from protobuf field <code>double event_revenue_value = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return float
     */
    public function getEventRevenueValue()
    {
        return $this->readOneof(4);
    }

    public function hasEventRevenueValue()
    {
        return $this->hasOneof(4);
    }

    /**
     * Output only. The specific event revenue value.
     *
     * Generated from protobuf field <code>double event_revenue_value = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param float $var
     * @return $this
     */
    public function setEventRevenueValue($var)
    {
        GPBUtil::checkDouble($var);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Output only. The event counter range.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.Event.EventOccurrenceRange event_occurrence_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\Event\EventOccurrenceRange|null
     */
    public function getEventOccurrenceRange()
    {
        return $this->readOneof(5);
    }

    public function hasEventOccurrenceRange()
    {
        return $this->hasOneof(5);
    }

    /**
     * Output only. The event counter range.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.Event.EventOccurrenceRange event_occurrence_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\Event\EventOccurrenceRange $var
     * @return $this
     */
    public function setEventOccurrenceRange($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema\SkAdNetworkConversionValueSchema\Event\EventOccurrenceRange::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Output only. For specific event counter values.
     *
     * Generated from protobuf field <code>int64 event_counter = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getEventCounter()
    {
        return $this->readOneof(6);
    }

    public function hasEventCounter()
    {
        return $this->hasOneof(6);
    }

    /**
     * Output only. For specific event counter values.
     *
     * Generated from protobuf field <code>int64 event_counter = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setEventCounter($var)
    {
        GPBUtil::checkInt64($var);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getRevenueRate()
    {
        return $this->whichOneof("revenue_rate");
    }

    /**
     * @return string
     */
    public function getEventRate()
    {
        return $this->whichOneof("event_rate");
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Event::class, \Google\Ads\GoogleAds\V23\Resources\CustomerSkAdNetworkConversionValueSchema_SkAdNetworkConversionValueSchema_Event::class);

