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

namespace Google\Ads\GoogleAds\V23\Resources\Invoice;

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

/**
 * Represents adjustment information associated with an account.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.resources.Invoice.AdjustmentSummary</code>
 */
class AdjustmentSummary extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The description of the adjustment. Example: Incentive
     * Adjustment, discount.
     *
     * Generated from protobuf field <code>optional string adjustment_description = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $adjustment_description = null;
    /**
     * Output only. The amount of the adjustment, in micros. The currency code
     * for this amount is the same as the Invoice.currency_code.
     *
     * Generated from protobuf field <code>optional int64 amount_micros = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $amount_micros = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $adjustment_description
     *           Output only. The description of the adjustment. Example: Incentive
     *           Adjustment, discount.
     *     @type int|string $amount_micros
     *           Output only. The amount of the adjustment, in micros. The currency code
     *           for this amount is the same as the Invoice.currency_code.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Resources\Invoice::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The description of the adjustment. Example: Incentive
     * Adjustment, discount.
     *
     * Generated from protobuf field <code>optional string adjustment_description = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getAdjustmentDescription()
    {
        return isset($this->adjustment_description) ? $this->adjustment_description : '';
    }

    public function hasAdjustmentDescription()
    {
        return isset($this->adjustment_description);
    }

    public function clearAdjustmentDescription()
    {
        unset($this->adjustment_description);
    }

    /**
     * Output only. The description of the adjustment. Example: Incentive
     * Adjustment, discount.
     *
     * Generated from protobuf field <code>optional string adjustment_description = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setAdjustmentDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->adjustment_description = $var;

        return $this;
    }

    /**
     * Output only. The amount of the adjustment, in micros. The currency code
     * for this amount is the same as the Invoice.currency_code.
     *
     * Generated from protobuf field <code>optional int64 amount_micros = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getAmountMicros()
    {
        return isset($this->amount_micros) ? $this->amount_micros : 0;
    }

    public function hasAmountMicros()
    {
        return isset($this->amount_micros);
    }

    public function clearAmountMicros()
    {
        unset($this->amount_micros);
    }

    /**
     * Output only. The amount of the adjustment, in micros. The currency code
     * for this amount is the same as the Invoice.currency_code.
     *
     * Generated from protobuf field <code>optional int64 amount_micros = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setAmountMicros($var)
    {
        GPBUtil::checkInt64($var);
        $this->amount_micros = $var;

        return $this;
    }

}

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

