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

namespace Google\Ads\AdManager\V1;

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

/**
 * Represents a programmatic buyer.
 *
 * Generated from protobuf message <code>google.ads.admanager.v1.ProgrammaticBuyer</code>
 */
class ProgrammaticBuyer extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. The resource name of the `ProgrammaticBuyer`.
     * Format:
     * `networks/{network_code}/programmaticBuyers/{buyer_account_id}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Output only. The buyer account ID of the buyer.
     *
     * Generated from protobuf field <code>optional int64 buyer_account_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $buyer_account_id = null;
    /**
     * Output only. The display name of the buyer.
     *
     * Generated from protobuf field <code>optional string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $display_name = null;
    /**
     * Output only. The ID of the programmatic buyer's sponsor. If the buyer has
     * no sponsor, this field will be -1.
     *
     * Generated from protobuf field <code>optional int64 parent_account_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $parent_account_id = null;
    /**
     * Output only. ID of the Display & Video 360 client buyer partner ID (if
     * Display & Video 360) or Authorized Buyers client buyer account ID.
     *
     * Generated from protobuf field <code>optional string partner_client_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $partner_client_id = null;
    /**
     * Output only. Whether the buyer is an advertising agency.
     *
     * Generated from protobuf field <code>optional bool agency = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $agency = null;
    /**
     * Output only. Whether the buyer is enabled for preferred deals.
     *
     * Generated from protobuf field <code>optional bool preferred_deals_enabled = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $preferred_deals_enabled = null;
    /**
     * Output only. Whether the buyer is enabled for programmatic guaranteed
     * deals.
     *
     * Generated from protobuf field <code>optional bool programmatic_guaranteed_enabled = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $programmatic_guaranteed_enabled = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. The resource name of the `ProgrammaticBuyer`.
     *           Format:
     *           `networks/{network_code}/programmaticBuyers/{buyer_account_id}`
     *     @type int|string $buyer_account_id
     *           Output only. The buyer account ID of the buyer.
     *     @type string $display_name
     *           Output only. The display name of the buyer.
     *     @type int|string $parent_account_id
     *           Output only. The ID of the programmatic buyer's sponsor. If the buyer has
     *           no sponsor, this field will be -1.
     *     @type string $partner_client_id
     *           Output only. ID of the Display & Video 360 client buyer partner ID (if
     *           Display & Video 360) or Authorized Buyers client buyer account ID.
     *     @type bool $agency
     *           Output only. Whether the buyer is an advertising agency.
     *     @type bool $preferred_deals_enabled
     *           Output only. Whether the buyer is enabled for preferred deals.
     *     @type bool $programmatic_guaranteed_enabled
     *           Output only. Whether the buyer is enabled for programmatic guaranteed
     *           deals.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Admanager\V1\ProgrammaticBuyerMessages::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. The resource name of the `ProgrammaticBuyer`.
     * Format:
     * `networks/{network_code}/programmaticBuyers/{buyer_account_id}`
     *
     * 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 `ProgrammaticBuyer`.
     * Format:
     * `networks/{network_code}/programmaticBuyers/{buyer_account_id}`
     *
     * 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;
    }

    /**
     * Output only. The buyer account ID of the buyer.
     *
     * Generated from protobuf field <code>optional int64 buyer_account_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getBuyerAccountId()
    {
        return isset($this->buyer_account_id) ? $this->buyer_account_id : 0;
    }

    public function hasBuyerAccountId()
    {
        return isset($this->buyer_account_id);
    }

    public function clearBuyerAccountId()
    {
        unset($this->buyer_account_id);
    }

    /**
     * Output only. The buyer account ID of the buyer.
     *
     * Generated from protobuf field <code>optional int64 buyer_account_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setBuyerAccountId($var)
    {
        GPBUtil::checkInt64($var);
        $this->buyer_account_id = $var;

        return $this;
    }

    /**
     * Output only. The display name of the buyer.
     *
     * Generated from protobuf field <code>optional string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return isset($this->display_name) ? $this->display_name : '';
    }

    public function hasDisplayName()
    {
        return isset($this->display_name);
    }

    public function clearDisplayName()
    {
        unset($this->display_name);
    }

    /**
     * Output only. The display name of the buyer.
     *
     * Generated from protobuf field <code>optional string display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Output only. The ID of the programmatic buyer's sponsor. If the buyer has
     * no sponsor, this field will be -1.
     *
     * Generated from protobuf field <code>optional int64 parent_account_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getParentAccountId()
    {
        return isset($this->parent_account_id) ? $this->parent_account_id : 0;
    }

    public function hasParentAccountId()
    {
        return isset($this->parent_account_id);
    }

    public function clearParentAccountId()
    {
        unset($this->parent_account_id);
    }

    /**
     * Output only. The ID of the programmatic buyer's sponsor. If the buyer has
     * no sponsor, this field will be -1.
     *
     * Generated from protobuf field <code>optional int64 parent_account_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setParentAccountId($var)
    {
        GPBUtil::checkInt64($var);
        $this->parent_account_id = $var;

        return $this;
    }

    /**
     * Output only. ID of the Display & Video 360 client buyer partner ID (if
     * Display & Video 360) or Authorized Buyers client buyer account ID.
     *
     * Generated from protobuf field <code>optional string partner_client_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getPartnerClientId()
    {
        return isset($this->partner_client_id) ? $this->partner_client_id : '';
    }

    public function hasPartnerClientId()
    {
        return isset($this->partner_client_id);
    }

    public function clearPartnerClientId()
    {
        unset($this->partner_client_id);
    }

    /**
     * Output only. ID of the Display & Video 360 client buyer partner ID (if
     * Display & Video 360) or Authorized Buyers client buyer account ID.
     *
     * Generated from protobuf field <code>optional string partner_client_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setPartnerClientId($var)
    {
        GPBUtil::checkString($var, True);
        $this->partner_client_id = $var;

        return $this;
    }

    /**
     * Output only. Whether the buyer is an advertising agency.
     *
     * Generated from protobuf field <code>optional bool agency = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getAgency()
    {
        return isset($this->agency) ? $this->agency : false;
    }

    public function hasAgency()
    {
        return isset($this->agency);
    }

    public function clearAgency()
    {
        unset($this->agency);
    }

    /**
     * Output only. Whether the buyer is an advertising agency.
     *
     * Generated from protobuf field <code>optional bool agency = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setAgency($var)
    {
        GPBUtil::checkBool($var);
        $this->agency = $var;

        return $this;
    }

    /**
     * Output only. Whether the buyer is enabled for preferred deals.
     *
     * Generated from protobuf field <code>optional bool preferred_deals_enabled = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getPreferredDealsEnabled()
    {
        return isset($this->preferred_deals_enabled) ? $this->preferred_deals_enabled : false;
    }

    public function hasPreferredDealsEnabled()
    {
        return isset($this->preferred_deals_enabled);
    }

    public function clearPreferredDealsEnabled()
    {
        unset($this->preferred_deals_enabled);
    }

    /**
     * Output only. Whether the buyer is enabled for preferred deals.
     *
     * Generated from protobuf field <code>optional bool preferred_deals_enabled = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setPreferredDealsEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->preferred_deals_enabled = $var;

        return $this;
    }

    /**
     * Output only. Whether the buyer is enabled for programmatic guaranteed
     * deals.
     *
     * Generated from protobuf field <code>optional bool programmatic_guaranteed_enabled = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getProgrammaticGuaranteedEnabled()
    {
        return isset($this->programmatic_guaranteed_enabled) ? $this->programmatic_guaranteed_enabled : false;
    }

    public function hasProgrammaticGuaranteedEnabled()
    {
        return isset($this->programmatic_guaranteed_enabled);
    }

    public function clearProgrammaticGuaranteedEnabled()
    {
        unset($this->programmatic_guaranteed_enabled);
    }

    /**
     * Output only. Whether the buyer is enabled for programmatic guaranteed
     * deals.
     *
     * Generated from protobuf field <code>optional bool programmatic_guaranteed_enabled = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setProgrammaticGuaranteedEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->programmatic_guaranteed_enabled = $var;

        return $this;
    }

}

