<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/datamanager/v1/user_list_direct_license.proto

namespace Google\Ads\DataManager\V1;

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

/**
 * A user list direct license.
 * This feature is only available to data partners.
 *
 * Generated from protobuf message <code>google.ads.datamanager.v1.UserListDirectLicense</code>
 */
class UserListDirectLicense extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. The resource name of the user list direct license.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Immutable. ID of the user list being licensed.
     *
     * Generated from protobuf field <code>optional int64 user_list_id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $user_list_id = null;
    /**
     * Output only. Name of the user list being licensed.
     * This field is read-only.
     *
     * Generated from protobuf field <code>string user_list_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $user_list_display_name = '';
    /**
     * Immutable. Account type of client customer which the user list is being
     * licensed to.
     *
     * Generated from protobuf field <code>optional .google.ads.datamanager.v1.UserListLicenseClientAccountType client_account_type = 4 [(.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $client_account_type = null;
    /**
     * Immutable. ID of client customer which the user list is being licensed to.
     *
     * Generated from protobuf field <code>optional int64 client_account_id = 5 [(.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $client_account_id = null;
    /**
     * Output only. Name of client customer which the user list is being licensed
     * to.
     * This field is read-only.
     *
     * Generated from protobuf field <code>string client_account_display_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $client_account_display_name = '';
    /**
     * Optional. Status of UserListDirectLicense - ENABLED or DISABLED.
     *
     * Generated from protobuf field <code>optional .google.ads.datamanager.v1.UserListLicenseStatus status = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $status = null;
    /**
     * Optional. UserListDirectLicense pricing.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.UserListLicensePricing pricing = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $pricing = null;
    /**
     * Output only. Pricing history of this user list license.
     * This field is read-only.
     *
     * Generated from protobuf field <code>repeated .google.ads.datamanager.v1.UserListLicensePricing historical_pricings = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $historical_pricings;
    /**
     * Output only. Metrics related to this license
     * This field is read-only and only populated if the start and end dates are
     * set in the ListUserListDirectLicenses call
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.UserListLicenseMetrics metrics = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $metrics = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. The resource name of the user list direct license.
     *     @type int|string $user_list_id
     *           Immutable. ID of the user list being licensed.
     *     @type string $user_list_display_name
     *           Output only. Name of the user list being licensed.
     *           This field is read-only.
     *     @type int $client_account_type
     *           Immutable. Account type of client customer which the user list is being
     *           licensed to.
     *     @type int|string $client_account_id
     *           Immutable. ID of client customer which the user list is being licensed to.
     *     @type string $client_account_display_name
     *           Output only. Name of client customer which the user list is being licensed
     *           to.
     *           This field is read-only.
     *     @type int $status
     *           Optional. Status of UserListDirectLicense - ENABLED or DISABLED.
     *     @type \Google\Ads\DataManager\V1\UserListLicensePricing $pricing
     *           Optional. UserListDirectLicense pricing.
     *     @type array<\Google\Ads\DataManager\V1\UserListLicensePricing>|\Google\Protobuf\Internal\RepeatedField $historical_pricings
     *           Output only. Pricing history of this user list license.
     *           This field is read-only.
     *     @type \Google\Ads\DataManager\V1\UserListLicenseMetrics $metrics
     *           Output only. Metrics related to this license
     *           This field is read-only and only populated if the start and end dates are
     *           set in the ListUserListDirectLicenses call
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Datamanager\V1\UserListDirectLicense::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. The resource name of the user list direct license.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. The resource name of the user list direct license.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Immutable. ID of the user list being licensed.
     *
     * Generated from protobuf field <code>optional int64 user_list_id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @return int|string
     */
    public function getUserListId()
    {
        return isset($this->user_list_id) ? $this->user_list_id : 0;
    }

    public function hasUserListId()
    {
        return isset($this->user_list_id);
    }

    public function clearUserListId()
    {
        unset($this->user_list_id);
    }

    /**
     * Immutable. ID of the user list being licensed.
     *
     * Generated from protobuf field <code>optional int64 user_list_id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @param int|string $var
     * @return $this
     */
    public function setUserListId($var)
    {
        GPBUtil::checkInt64($var);
        $this->user_list_id = $var;

        return $this;
    }

    /**
     * Output only. Name of the user list being licensed.
     * This field is read-only.
     *
     * Generated from protobuf field <code>string user_list_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getUserListDisplayName()
    {
        return $this->user_list_display_name;
    }

    /**
     * Output only. Name of the user list being licensed.
     * This field is read-only.
     *
     * Generated from protobuf field <code>string user_list_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setUserListDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->user_list_display_name = $var;

        return $this;
    }

    /**
     * Immutable. Account type of client customer which the user list is being
     * licensed to.
     *
     * Generated from protobuf field <code>optional .google.ads.datamanager.v1.UserListLicenseClientAccountType client_account_type = 4 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @return int
     */
    public function getClientAccountType()
    {
        return isset($this->client_account_type) ? $this->client_account_type : 0;
    }

    public function hasClientAccountType()
    {
        return isset($this->client_account_type);
    }

    public function clearClientAccountType()
    {
        unset($this->client_account_type);
    }

    /**
     * Immutable. Account type of client customer which the user list is being
     * licensed to.
     *
     * Generated from protobuf field <code>optional .google.ads.datamanager.v1.UserListLicenseClientAccountType client_account_type = 4 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @param int $var
     * @return $this
     */
    public function setClientAccountType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\DataManager\V1\UserListLicenseClientAccountType::class);
        $this->client_account_type = $var;

        return $this;
    }

    /**
     * Immutable. ID of client customer which the user list is being licensed to.
     *
     * Generated from protobuf field <code>optional int64 client_account_id = 5 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @return int|string
     */
    public function getClientAccountId()
    {
        return isset($this->client_account_id) ? $this->client_account_id : 0;
    }

    public function hasClientAccountId()
    {
        return isset($this->client_account_id);
    }

    public function clearClientAccountId()
    {
        unset($this->client_account_id);
    }

    /**
     * Immutable. ID of client customer which the user list is being licensed to.
     *
     * Generated from protobuf field <code>optional int64 client_account_id = 5 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @param int|string $var
     * @return $this
     */
    public function setClientAccountId($var)
    {
        GPBUtil::checkInt64($var);
        $this->client_account_id = $var;

        return $this;
    }

    /**
     * Output only. Name of client customer which the user list is being licensed
     * to.
     * This field is read-only.
     *
     * Generated from protobuf field <code>string client_account_display_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getClientAccountDisplayName()
    {
        return $this->client_account_display_name;
    }

    /**
     * Output only. Name of client customer which the user list is being licensed
     * to.
     * This field is read-only.
     *
     * Generated from protobuf field <code>string client_account_display_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setClientAccountDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->client_account_display_name = $var;

        return $this;
    }

    /**
     * Optional. Status of UserListDirectLicense - ENABLED or DISABLED.
     *
     * Generated from protobuf field <code>optional .google.ads.datamanager.v1.UserListLicenseStatus status = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getStatus()
    {
        return isset($this->status) ? $this->status : 0;
    }

    public function hasStatus()
    {
        return isset($this->status);
    }

    public function clearStatus()
    {
        unset($this->status);
    }

    /**
     * Optional. Status of UserListDirectLicense - ENABLED or DISABLED.
     *
     * Generated from protobuf field <code>optional .google.ads.datamanager.v1.UserListLicenseStatus status = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\DataManager\V1\UserListLicenseStatus::class);
        $this->status = $var;

        return $this;
    }

    /**
     * Optional. UserListDirectLicense pricing.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.UserListLicensePricing pricing = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Ads\DataManager\V1\UserListLicensePricing|null
     */
    public function getPricing()
    {
        return $this->pricing;
    }

    public function hasPricing()
    {
        return isset($this->pricing);
    }

    public function clearPricing()
    {
        unset($this->pricing);
    }

    /**
     * Optional. UserListDirectLicense pricing.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.UserListLicensePricing pricing = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Ads\DataManager\V1\UserListLicensePricing $var
     * @return $this
     */
    public function setPricing($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\DataManager\V1\UserListLicensePricing::class);
        $this->pricing = $var;

        return $this;
    }

    /**
     * Output only. Pricing history of this user list license.
     * This field is read-only.
     *
     * Generated from protobuf field <code>repeated .google.ads.datamanager.v1.UserListLicensePricing historical_pricings = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getHistoricalPricings()
    {
        return $this->historical_pricings;
    }

    /**
     * Output only. Pricing history of this user list license.
     * This field is read-only.
     *
     * Generated from protobuf field <code>repeated .google.ads.datamanager.v1.UserListLicensePricing historical_pricings = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<\Google\Ads\DataManager\V1\UserListLicensePricing>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setHistoricalPricings($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\DataManager\V1\UserListLicensePricing::class);
        $this->historical_pricings = $arr;

        return $this;
    }

    /**
     * Output only. Metrics related to this license
     * This field is read-only and only populated if the start and end dates are
     * set in the ListUserListDirectLicenses call
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.UserListLicenseMetrics metrics = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Ads\DataManager\V1\UserListLicenseMetrics|null
     */
    public function getMetrics()
    {
        return $this->metrics;
    }

    public function hasMetrics()
    {
        return isset($this->metrics);
    }

    public function clearMetrics()
    {
        unset($this->metrics);
    }

    /**
     * Output only. Metrics related to this license
     * This field is read-only and only populated if the start and end dates are
     * set in the ListUserListDirectLicenses call
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.UserListLicenseMetrics metrics = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Ads\DataManager\V1\UserListLicenseMetrics $var
     * @return $this
     */
    public function setMetrics($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\DataManager\V1\UserListLicenseMetrics::class);
        $this->metrics = $var;

        return $this;
    }

}

