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

namespace Google\Cloud\Compute\V1;

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

/**
 * Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose&#64;example.com" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose&#64;example.com from DATA_READ logging.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.AuditLogConfig</code>
 */
class AuditLogConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
     *
     * Generated from protobuf field <code>repeated string exempted_members = 232615576;</code>
     */
    private $exempted_members;
    /**
     * This is deprecated and has no effect. Do not use.
     *
     * Generated from protobuf field <code>optional bool ignore_child_exemptions = 70141850;</code>
     */
    private $ignore_child_exemptions = null;
    /**
     * The log type that this config enables.
     * Check the LogType enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string log_type = 403115861;</code>
     */
    private $log_type = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $exempted_members
     *           Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
     *     @type bool $ignore_child_exemptions
     *           This is deprecated and has no effect. Do not use.
     *     @type string $log_type
     *           The log type that this config enables.
     *           Check the LogType enum for the list of possible values.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
     *
     * Generated from protobuf field <code>repeated string exempted_members = 232615576;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getExemptedMembers()
    {
        return $this->exempted_members;
    }

    /**
     * Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
     *
     * Generated from protobuf field <code>repeated string exempted_members = 232615576;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setExemptedMembers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->exempted_members = $arr;

        return $this;
    }

    /**
     * This is deprecated and has no effect. Do not use.
     *
     * Generated from protobuf field <code>optional bool ignore_child_exemptions = 70141850;</code>
     * @return bool
     */
    public function getIgnoreChildExemptions()
    {
        return isset($this->ignore_child_exemptions) ? $this->ignore_child_exemptions : false;
    }

    public function hasIgnoreChildExemptions()
    {
        return isset($this->ignore_child_exemptions);
    }

    public function clearIgnoreChildExemptions()
    {
        unset($this->ignore_child_exemptions);
    }

    /**
     * This is deprecated and has no effect. Do not use.
     *
     * Generated from protobuf field <code>optional bool ignore_child_exemptions = 70141850;</code>
     * @param bool $var
     * @return $this
     */
    public function setIgnoreChildExemptions($var)
    {
        GPBUtil::checkBool($var);
        $this->ignore_child_exemptions = $var;

        return $this;
    }

    /**
     * The log type that this config enables.
     * Check the LogType enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string log_type = 403115861;</code>
     * @return string
     */
    public function getLogType()
    {
        return isset($this->log_type) ? $this->log_type : '';
    }

    public function hasLogType()
    {
        return isset($this->log_type);
    }

    public function clearLogType()
    {
        unset($this->log_type);
    }

    /**
     * The log type that this config enables.
     * Check the LogType enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string log_type = 403115861;</code>
     * @param string $var
     * @return $this
     */
    public function setLogType($var)
    {
        GPBUtil::checkString($var, True);
        $this->log_type = $var;

        return $this;
    }

}

