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

namespace Google\Cloud\AppEngine\V1;

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

/**
 * Custom static error page to be served when an error occurs.
 *
 * Generated from protobuf message <code>google.appengine.v1.ErrorHandler</code>
 */
class ErrorHandler extends \Google\Protobuf\Internal\Message
{
    /**
     * Error condition this handler applies to.
     *
     * Generated from protobuf field <code>.google.appengine.v1.ErrorHandler.ErrorCode error_code = 1;</code>
     */
    private $error_code = 0;
    /**
     * Static file content to be served for this error.
     *
     * Generated from protobuf field <code>string static_file = 2;</code>
     */
    private $static_file = '';
    /**
     * MIME type of file. Defaults to `text/html`.
     *
     * Generated from protobuf field <code>string mime_type = 3;</code>
     */
    private $mime_type = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $error_code
     *           Error condition this handler applies to.
     *     @type string $static_file
     *           Static file content to be served for this error.
     *     @type string $mime_type
     *           MIME type of file. Defaults to `text/html`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Appengine\V1\AppYaml::initOnce();
        parent::__construct($data);
    }

    /**
     * Error condition this handler applies to.
     *
     * Generated from protobuf field <code>.google.appengine.v1.ErrorHandler.ErrorCode error_code = 1;</code>
     * @return int
     */
    public function getErrorCode()
    {
        return $this->error_code;
    }

    /**
     * Error condition this handler applies to.
     *
     * Generated from protobuf field <code>.google.appengine.v1.ErrorHandler.ErrorCode error_code = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setErrorCode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AppEngine\V1\ErrorHandler\ErrorCode::class);
        $this->error_code = $var;

        return $this;
    }

    /**
     * Static file content to be served for this error.
     *
     * Generated from protobuf field <code>string static_file = 2;</code>
     * @return string
     */
    public function getStaticFile()
    {
        return $this->static_file;
    }

    /**
     * Static file content to be served for this error.
     *
     * Generated from protobuf field <code>string static_file = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setStaticFile($var)
    {
        GPBUtil::checkString($var, True);
        $this->static_file = $var;

        return $this;
    }

    /**
     * MIME type of file. Defaults to `text/html`.
     *
     * Generated from protobuf field <code>string mime_type = 3;</code>
     * @return string
     */
    public function getMimeType()
    {
        return $this->mime_type;
    }

    /**
     * MIME type of file. Defaults to `text/html`.
     *
     * Generated from protobuf field <code>string mime_type = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setMimeType($var)
    {
        GPBUtil::checkString($var, True);
        $this->mime_type = $var;

        return $this;
    }

}

