<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/oracledatabase/v1/entitlement.proto

namespace Google\Cloud\OracleDatabase\V1;

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

/**
 * Details of the Entitlement resource.
 *
 * Generated from protobuf message <code>google.cloud.oracledatabase.v1.Entitlement</code>
 */
class Entitlement extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. The name of the Entitlement resource with the format:
     * projects/{project}/locations/{region}/entitlements/{entitlement}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Details of the OCI Cloud Account.
     *
     * Generated from protobuf field <code>.google.cloud.oracledatabase.v1.CloudAccountDetails cloud_account_details = 2;</code>
     */
    protected $cloud_account_details = null;
    /**
     * Output only. Google Cloud Marketplace order ID (aka entitlement ID)
     *
     * Generated from protobuf field <code>string entitlement_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $entitlement_id = '';
    /**
     * Output only. Entitlement State.
     *
     * Generated from protobuf field <code>.google.cloud.oracledatabase.v1.Entitlement.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $state = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. The name of the Entitlement resource with the format:
     *           projects/{project}/locations/{region}/entitlements/{entitlement}
     *     @type \Google\Cloud\OracleDatabase\V1\CloudAccountDetails $cloud_account_details
     *           Details of the OCI Cloud Account.
     *     @type string $entitlement_id
     *           Output only. Google Cloud Marketplace order ID (aka entitlement ID)
     *     @type int $state
     *           Output only. Entitlement State.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Oracledatabase\V1\Entitlement::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. The name of the Entitlement resource with the format:
     * projects/{project}/locations/{region}/entitlements/{entitlement}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. The name of the Entitlement resource with the format:
     * projects/{project}/locations/{region}/entitlements/{entitlement}
     *
     * 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;
    }

    /**
     * Details of the OCI Cloud Account.
     *
     * Generated from protobuf field <code>.google.cloud.oracledatabase.v1.CloudAccountDetails cloud_account_details = 2;</code>
     * @return \Google\Cloud\OracleDatabase\V1\CloudAccountDetails|null
     */
    public function getCloudAccountDetails()
    {
        return $this->cloud_account_details;
    }

    public function hasCloudAccountDetails()
    {
        return isset($this->cloud_account_details);
    }

    public function clearCloudAccountDetails()
    {
        unset($this->cloud_account_details);
    }

    /**
     * Details of the OCI Cloud Account.
     *
     * Generated from protobuf field <code>.google.cloud.oracledatabase.v1.CloudAccountDetails cloud_account_details = 2;</code>
     * @param \Google\Cloud\OracleDatabase\V1\CloudAccountDetails $var
     * @return $this
     */
    public function setCloudAccountDetails($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\CloudAccountDetails::class);
        $this->cloud_account_details = $var;

        return $this;
    }

    /**
     * Output only. Google Cloud Marketplace order ID (aka entitlement ID)
     *
     * Generated from protobuf field <code>string entitlement_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getEntitlementId()
    {
        return $this->entitlement_id;
    }

    /**
     * Output only. Google Cloud Marketplace order ID (aka entitlement ID)
     *
     * Generated from protobuf field <code>string entitlement_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setEntitlementId($var)
    {
        GPBUtil::checkString($var, True);
        $this->entitlement_id = $var;

        return $this;
    }

    /**
     * Output only. Entitlement State.
     *
     * Generated from protobuf field <code>.google.cloud.oracledatabase.v1.Entitlement.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Output only. Entitlement State.
     *
     * Generated from protobuf field <code>.google.cloud.oracledatabase.v1.Entitlement.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\Entitlement\State::class);
        $this->state = $var;

        return $this;
    }

}

