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

namespace Google\Cloud\Audit;

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

/**
 * Information related to policy violations for this request.
 *
 * Generated from protobuf message <code>google.cloud.audit.PolicyViolationInfo</code>
 */
class PolicyViolationInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Indicates the orgpolicy violations for this resource.
     *
     * Generated from protobuf field <code>.google.cloud.audit.OrgPolicyViolationInfo org_policy_violation_info = 1;</code>
     */
    protected $org_policy_violation_info = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Audit\OrgPolicyViolationInfo $org_policy_violation_info
     *           Indicates the orgpolicy violations for this resource.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Audit\AuditLog::initOnce();
        parent::__construct($data);
    }

    /**
     * Indicates the orgpolicy violations for this resource.
     *
     * Generated from protobuf field <code>.google.cloud.audit.OrgPolicyViolationInfo org_policy_violation_info = 1;</code>
     * @return \Google\Cloud\Audit\OrgPolicyViolationInfo|null
     */
    public function getOrgPolicyViolationInfo()
    {
        return $this->org_policy_violation_info;
    }

    public function hasOrgPolicyViolationInfo()
    {
        return isset($this->org_policy_violation_info);
    }

    public function clearOrgPolicyViolationInfo()
    {
        unset($this->org_policy_violation_info);
    }

    /**
     * Indicates the orgpolicy violations for this resource.
     *
     * Generated from protobuf field <code>.google.cloud.audit.OrgPolicyViolationInfo org_policy_violation_info = 1;</code>
     * @param \Google\Cloud\Audit\OrgPolicyViolationInfo $var
     * @return $this
     */
    public function setOrgPolicyViolationInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Audit\OrgPolicyViolationInfo::class);
        $this->org_policy_violation_info = $var;

        return $this;
    }

}

