<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v22/common/third_party_integration_partners.proto

namespace Google\Ads\GoogleAds\V22\Common;

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

/**
 * Container for third party viewability integration data for Campaign.
 *
 * Generated from protobuf message <code>google.ads.googleads.v22.common.CampaignThirdPartyViewabilityIntegrationPartner</code>
 */
class CampaignThirdPartyViewabilityIntegrationPartner extends \Google\Protobuf\Internal\Message
{
    /**
     * Allowed third party integration partners for YouTube viewability
     * verification.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.enums.ThirdPartyViewabilityIntegrationPartnerEnum.ThirdPartyViewabilityIntegrationPartner viewability_integration_partner = 1;</code>
     */
    protected $viewability_integration_partner = 0;
    /**
     * Third party partner data for YouTube viewability verification. This is
     * optional metadata for partners to join or attach data to Ads campaigns.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.common.ThirdPartyIntegrationPartnerData viewability_integration_partner_data = 2;</code>
     */
    protected $viewability_integration_partner_data = null;
    /**
     * If true, then cost data will be shared with this vendor.
     *
     * Generated from protobuf field <code>bool share_cost = 3;</code>
     */
    protected $share_cost = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $viewability_integration_partner
     *           Allowed third party integration partners for YouTube viewability
     *           verification.
     *     @type \Google\Ads\GoogleAds\V22\Common\ThirdPartyIntegrationPartnerData $viewability_integration_partner_data
     *           Third party partner data for YouTube viewability verification. This is
     *           optional metadata for partners to join or attach data to Ads campaigns.
     *     @type bool $share_cost
     *           If true, then cost data will be shared with this vendor.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V22\Common\ThirdPartyIntegrationPartners::initOnce();
        parent::__construct($data);
    }

    /**
     * Allowed third party integration partners for YouTube viewability
     * verification.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.enums.ThirdPartyViewabilityIntegrationPartnerEnum.ThirdPartyViewabilityIntegrationPartner viewability_integration_partner = 1;</code>
     * @return int
     */
    public function getViewabilityIntegrationPartner()
    {
        return $this->viewability_integration_partner;
    }

    /**
     * Allowed third party integration partners for YouTube viewability
     * verification.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.enums.ThirdPartyViewabilityIntegrationPartnerEnum.ThirdPartyViewabilityIntegrationPartner viewability_integration_partner = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setViewabilityIntegrationPartner($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V22\Enums\ThirdPartyViewabilityIntegrationPartnerEnum\ThirdPartyViewabilityIntegrationPartner::class);
        $this->viewability_integration_partner = $var;

        return $this;
    }

    /**
     * Third party partner data for YouTube viewability verification. This is
     * optional metadata for partners to join or attach data to Ads campaigns.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.common.ThirdPartyIntegrationPartnerData viewability_integration_partner_data = 2;</code>
     * @return \Google\Ads\GoogleAds\V22\Common\ThirdPartyIntegrationPartnerData|null
     */
    public function getViewabilityIntegrationPartnerData()
    {
        return $this->viewability_integration_partner_data;
    }

    public function hasViewabilityIntegrationPartnerData()
    {
        return isset($this->viewability_integration_partner_data);
    }

    public function clearViewabilityIntegrationPartnerData()
    {
        unset($this->viewability_integration_partner_data);
    }

    /**
     * Third party partner data for YouTube viewability verification. This is
     * optional metadata for partners to join or attach data to Ads campaigns.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.common.ThirdPartyIntegrationPartnerData viewability_integration_partner_data = 2;</code>
     * @param \Google\Ads\GoogleAds\V22\Common\ThirdPartyIntegrationPartnerData $var
     * @return $this
     */
    public function setViewabilityIntegrationPartnerData($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V22\Common\ThirdPartyIntegrationPartnerData::class);
        $this->viewability_integration_partner_data = $var;

        return $this;
    }

    /**
     * If true, then cost data will be shared with this vendor.
     *
     * Generated from protobuf field <code>bool share_cost = 3;</code>
     * @return bool
     */
    public function getShareCost()
    {
        return $this->share_cost;
    }

    /**
     * If true, then cost data will be shared with this vendor.
     *
     * Generated from protobuf field <code>bool share_cost = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setShareCost($var)
    {
        GPBUtil::checkBool($var);
        $this->share_cost = $var;

        return $this;
    }

}

