# frozen_string_literal: true

# Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.

# DO NOT EDIT! This file is generated by rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb.
# Regenerate with: `bazel run //rb/lib/selenium/webdriver:bidi-generate`

module Selenium
  module WebDriver
    class BiDi
      module Protocol
        # The BiDi ErrorCode enum: each wire value mapped to its Ruby exception class name.
        # @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
        module ErrorCode
          CLASS_NAMES = {
            'invalid argument' => 'InvalidArgumentError',
            'invalid selector' => 'InvalidSelectorError',
            'invalid session id' => 'InvalidSessionIdError',
            'invalid web extension' => 'InvalidWebExtensionError',
            'move target out of bounds' => 'MoveTargetOutOfBoundsError',
            'no such alert' => 'NoSuchAlertError',
            'no such network collector' => 'NoSuchNetworkCollectorError',
            'no such element' => 'NoSuchElementError',
            'no such frame' => 'NoSuchFrameError',
            'no such handle' => 'NoSuchHandleError',
            'no such history entry' => 'NoSuchHistoryEntryError',
            'no such intercept' => 'NoSuchInterceptError',
            'no such network data' => 'NoSuchNetworkDataError',
            'no such node' => 'NoSuchNodeError',
            'no such request' => 'NoSuchRequestError',
            'no such screencast' => 'NoSuchScreencastError',
            'no such script' => 'NoSuchScriptError',
            'no such storage partition' => 'NoSuchStoragePartitionError',
            'no such user context' => 'NoSuchUserContextError',
            'no such web extension' => 'NoSuchWebExtensionError',
            'session not created' => 'SessionNotCreatedError',
            'unable to capture screen' => 'UnableToCaptureScreenError',
            'unable to close browser' => 'UnableToCloseBrowserError',
            'unable to set cookie' => 'UnableToSetCookieError',
            'unable to set file input' => 'UnableToSetFileInputError',
            'unavailable network data' => 'UnavailableNetworkDataError',
            'underspecified storage partition' => 'UnderspecifiedStoragePartitionError',
            'unknown command' => 'UnknownCommandError',
            'unknown error' => 'UnknownError',
            'unsupported operation' => 'UnsupportedOperationError'
          }.freeze
        end # ErrorCode
      end # Protocol
    end # BiDi
  end # WebDriver
end # Selenium
