<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/privacy/dlp/v2/dlp.proto

namespace Google\Cloud\Dlp\V2;

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

/**
 * Generated from protobuf message <code>google.privacy.dlp.v2.TransformationResultStatus</code>
 */
class TransformationResultStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * Transformation result status type, this will be either SUCCESS, or it will
     * be the reason for why the transformation was not completely successful.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1;</code>
     */
    private $result_status_type = 0;
    /**
     * Detailed error codes and messages
     *
     * Generated from protobuf field <code>.google.rpc.Status details = 2;</code>
     */
    private $details = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $result_status_type
     *           Transformation result status type, this will be either SUCCESS, or it will
     *           be the reason for why the transformation was not completely successful.
     *     @type \Google\Rpc\Status $details
     *           Detailed error codes and messages
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * Transformation result status type, this will be either SUCCESS, or it will
     * be the reason for why the transformation was not completely successful.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1;</code>
     * @return int
     */
    public function getResultStatusType()
    {
        return $this->result_status_type;
    }

    /**
     * Transformation result status type, this will be either SUCCESS, or it will
     * be the reason for why the transformation was not completely successful.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setResultStatusType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2\TransformationResultStatusType::class);
        $this->result_status_type = $var;

        return $this;
    }

    /**
     * Detailed error codes and messages
     *
     * Generated from protobuf field <code>.google.rpc.Status details = 2;</code>
     * @return \Google\Rpc\Status|null
     */
    public function getDetails()
    {
        return $this->details;
    }

    public function hasDetails()
    {
        return isset($this->details);
    }

    public function clearDetails()
    {
        unset($this->details);
    }

    /**
     * Detailed error codes and messages
     *
     * Generated from protobuf field <code>.google.rpc.Status details = 2;</code>
     * @param \Google\Rpc\Status $var
     * @return $this
     */
    public function setDetails($var)
    {
        GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
        $this->details = $var;

        return $this;
    }

}

