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

namespace Google\Ads\GoogleAds\V23\Resources;

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

/**
 * Recommendation Subscription resource
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.resources.RecommendationSubscription</code>
 */
class RecommendationSubscription extends \Google\Protobuf\Internal\Message
{
    /**
     * Immutable. The resource name of the recommendation subscription.
     * `customers/{customer_id}/recommendationSubscriptions/{recommendation_type}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     */
    protected $resource_name = '';
    /**
     * Required. Immutable. The type of recommendation subscribed to.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.RecommendationTypeEnum.RecommendationType type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $type = 0;
    /**
     * Output only. Time in seconds when the subscription was first created. The
     * datetime is in the customer's time zone and in "yyyy-MM-dd HH:mm:ss"
     * format.
     *
     * Generated from protobuf field <code>optional string create_date_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_date_time = null;
    /**
     * Output only. Contains the time in microseconds, when the Recommendation
     * Subscription was last updated. The datetime is in the customer's time zone
     * and in "yyyy-MM-dd HH:mm:ss.ssssss" format.
     *
     * Generated from protobuf field <code>optional string modify_date_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $modify_date_time = null;
    /**
     * Required. Status of the subscription, either enabled or paused.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v23.enums.RecommendationSubscriptionStatusEnum.RecommendationSubscriptionStatus status = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $status = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $resource_name
     *           Immutable. The resource name of the recommendation subscription.
     *           `customers/{customer_id}/recommendationSubscriptions/{recommendation_type}`
     * @type int $type
     *           Required. Immutable. The type of recommendation subscribed to.
     * @type string $create_date_time
     *           Output only. Time in seconds when the subscription was first created. The
     *           datetime is in the customer's time zone and in "yyyy-MM-dd HH:mm:ss"
     *           format.
     * @type string $modify_date_time
     *           Output only. Contains the time in microseconds, when the Recommendation
     *           Subscription was last updated. The datetime is in the customer's time zone
     *           and in "yyyy-MM-dd HH:mm:ss.ssssss" format.
     * @type int $status
     *           Required. Status of the subscription, either enabled or paused.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Resources\RecommendationSubscription::initOnce();
        parent::__construct($data);
    }

    /**
     * Immutable. The resource name of the recommendation subscription.
     * `customers/{customer_id}/recommendationSubscriptions/{recommendation_type}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     *
     * @return string
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * Immutable. The resource name of the recommendation subscription.
     * `customers/{customer_id}/recommendationSubscriptions/{recommendation_type}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setResourceName($var)
    {
        GPBUtil::checkString($var, true);
        $this->resource_name = $var;

        return $this;
    }

    /**
     * Required. Immutable. The type of recommendation subscribed to.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.RecommendationTypeEnum.RecommendationType type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     *
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Required. Immutable. The type of recommendation subscribed to.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.RecommendationTypeEnum.RecommendationType type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     *
     * @param  int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V23\Enums\RecommendationTypeEnum\RecommendationType::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Output only. Time in seconds when the subscription was first created. The
     * datetime is in the customer's time zone and in "yyyy-MM-dd HH:mm:ss"
     * format.
     *
     * Generated from protobuf field <code>optional string create_date_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return string
     */
    public function getCreateDateTime()
    {
        return isset($this->create_date_time) ? $this->create_date_time : '';
    }

    public function hasCreateDateTime()
    {
        return isset($this->create_date_time);
    }

    public function clearCreateDateTime()
    {
        unset($this->create_date_time);
    }

    /**
     * Output only. Time in seconds when the subscription was first created. The
     * datetime is in the customer's time zone and in "yyyy-MM-dd HH:mm:ss"
     * format.
     *
     * Generated from protobuf field <code>optional string create_date_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setCreateDateTime($var)
    {
        GPBUtil::checkString($var, true);
        $this->create_date_time = $var;

        return $this;
    }

    /**
     * Output only. Contains the time in microseconds, when the Recommendation
     * Subscription was last updated. The datetime is in the customer's time zone
     * and in "yyyy-MM-dd HH:mm:ss.ssssss" format.
     *
     * Generated from protobuf field <code>optional string modify_date_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return string
     */
    public function getModifyDateTime()
    {
        return isset($this->modify_date_time) ? $this->modify_date_time : '';
    }

    public function hasModifyDateTime()
    {
        return isset($this->modify_date_time);
    }

    public function clearModifyDateTime()
    {
        unset($this->modify_date_time);
    }

    /**
     * Output only. Contains the time in microseconds, when the Recommendation
     * Subscription was last updated. The datetime is in the customer's time zone
     * and in "yyyy-MM-dd HH:mm:ss.ssssss" format.
     *
     * Generated from protobuf field <code>optional string modify_date_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setModifyDateTime($var)
    {
        GPBUtil::checkString($var, true);
        $this->modify_date_time = $var;

        return $this;
    }

    /**
     * Required. Status of the subscription, either enabled or paused.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v23.enums.RecommendationSubscriptionStatusEnum.RecommendationSubscriptionStatus status = 5 [(.google.api.field_behavior) = REQUIRED];</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);
    }

    /**
     * Required. Status of the subscription, either enabled or paused.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v23.enums.RecommendationSubscriptionStatusEnum.RecommendationSubscriptionStatus status = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param  int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V23\Enums\RecommendationSubscriptionStatusEnum\RecommendationSubscriptionStatus::class);
        $this->status = $var;

        return $this;
    }

}

