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

namespace Google\Cloud\Memorystore\V1\PersistenceConfig;

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

/**
 * Configuration for AOF based persistence.
 *
 * Generated from protobuf message <code>google.cloud.memorystore.v1.PersistenceConfig.AOFConfig</code>
 */
class AOFConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The fsync mode.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $append_fsync = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $append_fsync
     *           Optional. The fsync mode.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The fsync mode.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getAppendFsync()
    {
        return $this->append_fsync;
    }

    /**
     * Optional. The fsync mode.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setAppendFsync($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\PersistenceConfig\AOFConfig\AppendFsync::class);
        $this->append_fsync = $var;

        return $this;
    }

}


