# 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.

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

module Selenium
  module WebDriver
    class BiDi
      module Protocol
        class BrowsingContext < ::Selenium::WebDriver::BiDi::Protocol::Domain
          EVENTS: Hash[Symbol, String]

          READINESS_STATE: Hash[Symbol, String]

          USER_PROMPT_TYPE: Hash[Symbol, String]

          CREATE_TYPE: Hash[Symbol, String]

          INNER_TEXT_LOCATOR_MATCH_TYPE: Hash[Symbol, String]

          CAPTURE_SCREENSHOT_PARAMETERS_ORIGIN: Hash[Symbol, String]

          PRINT_PARAMETERS_ORIENTATION: Hash[Symbol, String]

          class Info < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader children: Array[::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::Info]?
            attr_reader client_window: String
            attr_reader context: String
            attr_reader original_opener: String?
            attr_reader url: String
            attr_reader user_context: String
            attr_reader parent: untyped
            def self.new: (children: Array[::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::Info]?, client_window: String, context: String, original_opener: String?, url: String, user_context: String, ?parent: String?) -> instance
          end

          class Locator < ::Selenium::WebDriver::BiDi::Serialization::Union
          end

          class AccessibilityLocator < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader type: String
            attr_reader value: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::AccessibilityLocator::Value
            def self.new: (?type: String, value: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::AccessibilityLocator::Value) -> instance

            class Value < ::Selenium::WebDriver::BiDi::Serialization::Record
              attr_reader name: untyped
              attr_reader role: untyped
              def self.new: (?name: String, ?role: String) -> instance
            end
          end

          class CssLocator < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader type: String
            attr_reader value: String
            def self.new: (?type: String, value: String) -> instance
          end

          class ContextLocator < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader type: String
            attr_reader value: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::ContextLocator::Value
            def self.new: (?type: String, value: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::ContextLocator::Value) -> instance

            class Value < ::Selenium::WebDriver::BiDi::Serialization::Record
              attr_reader context: String
              def self.new: (context: String) -> instance
            end
          end

          class InnerTextLocator < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader type: String
            attr_reader value: String
            attr_reader ignore_case: untyped
            attr_reader match_type: untyped
            attr_reader max_depth: untyped
            def self.new: (?type: String, value: String, ?ignore_case: bool, ?match_type: Symbol, ?max_depth: Integer) -> instance
          end

          class XPathLocator < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader type: String
            attr_reader value: String
            def self.new: (?type: String, value: String) -> instance
          end

          class BaseNavigationInfo < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            attr_reader navigation: String?
            attr_reader timestamp: Integer
            attr_reader url: String
            attr_reader user_context: untyped
            def self.new: (context: String, navigation: String?, timestamp: Integer, url: String, ?user_context: String) -> instance
          end

          class NavigationInfo < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            attr_reader navigation: String?
            attr_reader timestamp: Integer
            attr_reader url: String
            attr_reader user_context: untyped
            def self.new: (context: String, navigation: String?, timestamp: Integer, url: String, ?user_context: String) -> instance
          end

          class ActivateParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            def self.new: (context: String) -> instance
          end

          class CaptureScreenshotParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            attr_reader origin: untyped
            attr_reader format: untyped
            attr_reader clip: untyped
            def self.new: (context: String, ?origin: Symbol, ?format: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::ImageFormat, ?clip: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::ClipRectangle) -> instance
          end

          class ImageFormat < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader type: String
            attr_reader quality: untyped
            def self.new: (type: String, ?quality: Integer) -> instance
          end

          class ClipRectangle < ::Selenium::WebDriver::BiDi::Serialization::Union
          end

          class ElementClipRectangle < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader type: String
            attr_reader element: ::Selenium::WebDriver::BiDi::Protocol::Script::SharedReference
            def self.new: (?type: String, element: ::Selenium::WebDriver::BiDi::Protocol::Script::SharedReference) -> instance
          end

          class BoxClipRectangle < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader type: String
            attr_reader x: Numeric
            attr_reader y: Numeric
            attr_reader width: Numeric
            attr_reader height: Numeric
            def self.new: (?type: String, x: Numeric, y: Numeric, width: Numeric, height: Numeric) -> instance
          end

          class CaptureScreenshotResult < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader data: String
            def self.new: (data: String) -> instance
          end

          class CloseParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            attr_reader prompt_unload: untyped
            def self.new: (context: String, ?prompt_unload: bool) -> instance
          end

          class CreateParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader type: Symbol
            attr_reader reference_context: untyped
            attr_reader background: untyped
            attr_reader user_context: untyped
            def self.new: (type: Symbol, ?reference_context: String, ?background: bool, ?user_context: String) -> instance
          end

          class CreateResult < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            attr_reader user_context: untyped
            def self.new: (context: String, ?user_context: String) -> instance
          end

          class GetTreeParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader max_depth: untyped
            attr_reader root: untyped
            def self.new: (?max_depth: Integer, ?root: String) -> instance
          end

          class GetTreeResult < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader contexts: Array[::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::Info]
            def self.new: (contexts: Array[::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::Info]) -> instance
          end

          class HandleUserPromptParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            attr_reader accept: untyped
            attr_reader user_text: untyped
            def self.new: (context: String, ?accept: bool, ?user_text: String) -> instance
          end

          class LocateNodesParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            attr_reader locator: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::Locator
            attr_reader max_node_count: untyped
            attr_reader serialization_options: untyped
            attr_reader start_nodes: untyped
            def self.new: (context: String, locator: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::Locator, ?max_node_count: Integer, ?serialization_options: ::Selenium::WebDriver::BiDi::Protocol::Script::SerializationOptions, ?start_nodes: Array[::Selenium::WebDriver::BiDi::Protocol::Script::SharedReference]) -> instance
          end

          class LocateNodesResult < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader nodes: Array[::Selenium::WebDriver::BiDi::Protocol::Script::NodeRemoteValue]
            def self.new: (nodes: Array[::Selenium::WebDriver::BiDi::Protocol::Script::NodeRemoteValue]) -> instance
          end

          class NavigateParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            attr_reader url: String
            attr_reader wait: untyped
            def self.new: (context: String, url: String, ?wait: Symbol) -> instance
          end

          class NavigateResult < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader navigation: String?
            attr_reader url: String
            def self.new: (navigation: String?, url: String) -> instance
          end

          class PrintParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            attr_reader background: untyped
            attr_reader margin: untyped
            attr_reader orientation: untyped
            attr_reader page: untyped
            attr_reader page_ranges: untyped
            attr_reader scale: untyped
            attr_reader shrink_to_fit: untyped
            def self.new: (context: String, ?background: bool, ?margin: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::PrintMarginParameters, ?orientation: Symbol, ?page: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::PrintPageParameters, ?page_ranges: Array[untyped], ?scale: Numeric, ?shrink_to_fit: bool) -> instance
          end

          class PrintMarginParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader bottom: untyped
            attr_reader left: untyped
            attr_reader right: untyped
            attr_reader top: untyped
            def self.new: (?bottom: Numeric, ?left: Numeric, ?right: Numeric, ?top: Numeric) -> instance
          end

          class PrintPageParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader height: untyped
            attr_reader width: untyped
            def self.new: (?height: Numeric, ?width: Numeric) -> instance
          end

          class PrintResult < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader data: String
            def self.new: (data: String) -> instance
          end

          class ReloadParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            attr_reader ignore_cache: untyped
            attr_reader wait: untyped
            def self.new: (context: String, ?ignore_cache: bool, ?wait: Symbol) -> instance
          end

          class SetBypassCSPParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader bypass: bool?
            attr_reader contexts: untyped
            attr_reader user_contexts: untyped
            def self.new: (bypass: bool?, ?contexts: Array[String], ?user_contexts: Array[String]) -> instance
          end

          class SetViewportParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: untyped
            attr_reader viewport: untyped
            attr_reader device_pixel_ratio: untyped
            attr_reader user_contexts: untyped
            def self.new: (?context: String, ?viewport: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::Viewport?, ?device_pixel_ratio: Numeric?, ?user_contexts: Array[String]) -> instance
          end

          class Viewport < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader width: Integer
            attr_reader height: Integer
            def self.new: (width: Integer, height: Integer) -> instance
          end

          class StartScreencastParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            attr_reader mime_type: untyped
            attr_reader video: untyped
            attr_reader audio: untyped
            def self.new: (context: String, ?mime_type: String, ?video: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::MediaTrackConstraints, ?audio: bool) -> instance
          end

          class MediaTrackConstraints < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader width: untyped
            attr_reader height: untyped
            attr_reader frame_rate: untyped
            def self.new: (?width: Integer, ?height: Integer, ?frame_rate: Integer) -> instance
          end

          class StartScreencastResult < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader screencast: String
            attr_reader path: String
            def self.new: (screencast: String, path: String) -> instance
          end

          class StopScreencastParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader screencast: String
            def self.new: (screencast: String) -> instance
          end

          class StopScreencastResult < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader path: String
            attr_reader error: untyped
            def self.new: (path: String, ?error: String) -> instance
          end

          class TraverseHistoryParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            attr_reader delta: Integer
            def self.new: (context: String, delta: Integer) -> instance
          end

          class HistoryUpdatedParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            attr_reader timestamp: Integer
            attr_reader url: String
            attr_reader user_context: untyped
            def self.new: (context: String, timestamp: Integer, url: String, ?user_context: String) -> instance
          end

          class DownloadWillBeginParams < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader download: String
            attr_reader suggested_filename: String
            attr_reader context: String
            attr_reader navigation: String?
            attr_reader timestamp: Integer
            attr_reader url: String
            attr_reader user_context: untyped
            def self.new: (download: String, suggested_filename: String, context: String, navigation: String?, timestamp: Integer, url: String, ?user_context: String) -> instance
          end

          class DownloadEndParams < ::Selenium::WebDriver::BiDi::Serialization::Union
            class CanceledParams < ::Selenium::WebDriver::BiDi::Serialization::Record
              attr_reader status: String
              attr_reader download: String
              attr_reader context: String
              attr_reader navigation: String?
              attr_reader timestamp: Integer
              attr_reader url: String
              attr_reader user_context: untyped
              def self.new: (?status: String, download: String, context: String, navigation: String?, timestamp: Integer, url: String, ?user_context: String) -> instance
            end
            class CompleteParams < ::Selenium::WebDriver::BiDi::Serialization::Record
              attr_reader status: String
              attr_reader download: String
              attr_reader filepath: String?
              attr_reader context: String
              attr_reader navigation: String?
              attr_reader timestamp: Integer
              attr_reader url: String
              attr_reader user_context: untyped
              def self.new: (?status: String, download: String, filepath: String?, context: String, navigation: String?, timestamp: Integer, url: String, ?user_context: String) -> instance
            end
          end

          class UserPromptClosedParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            attr_reader accepted: bool
            attr_reader type: Symbol
            attr_reader user_context: untyped
            attr_reader user_text: untyped
            def self.new: (context: String, accepted: bool, type: Symbol, ?user_context: String, ?user_text: String) -> instance
          end

          class UserPromptOpenedParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String
            attr_reader handler: Symbol
            attr_reader message: String
            attr_reader type: Symbol
            attr_reader user_context: untyped
            attr_reader default_value: untyped
            def self.new: (context: String, handler: Symbol, message: String, type: Symbol, ?user_context: String, ?default_value: String) -> instance
          end

          EVENT_TYPES: Hash[String, untyped]

          def activate: (context: String) -> untyped
          def capture_screenshot: (context: String, ?origin: Symbol, ?format: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::ImageFormat, ?clip: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::ClipRectangle) -> ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::CaptureScreenshotResult
          def close: (context: String, ?prompt_unload: bool) -> untyped
          def create: (type: Symbol, ?reference_context: String, ?background: bool, ?user_context: String) -> ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::CreateResult
          def get_tree: (?max_depth: Integer, ?root: String) -> ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::GetTreeResult
          def handle_user_prompt: (context: String, ?accept: bool, ?user_text: String) -> untyped
          def locate_nodes: (context: String, locator: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::Locator, ?max_node_count: Integer, ?serialization_options: ::Selenium::WebDriver::BiDi::Protocol::Script::SerializationOptions, ?start_nodes: Array[::Selenium::WebDriver::BiDi::Protocol::Script::SharedReference]) -> ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::LocateNodesResult
          def navigate: (context: String, url: String, ?wait: Symbol) -> ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::NavigateResult
          def print: (context: String, ?background: bool, ?margin: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::PrintMarginParameters, ?orientation: Symbol, ?page: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::PrintPageParameters, ?page_ranges: Array[untyped], ?scale: Numeric, ?shrink_to_fit: bool) -> ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::PrintResult
          def reload: (context: String, ?ignore_cache: bool, ?wait: Symbol) -> ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::NavigateResult
          def set_bypass_csp: (bypass: bool?, ?contexts: Array[String], ?user_contexts: Array[String]) -> untyped
          def set_viewport: (?context: String, ?viewport: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::Viewport?, ?device_pixel_ratio: Numeric?, ?user_contexts: Array[String]) -> untyped
          def start_screencast: (context: String, ?mime_type: String, ?video: ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::MediaTrackConstraints, ?audio: bool) -> ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::StartScreencastResult
          def stop_screencast: (screencast: String) -> ::Selenium::WebDriver::BiDi::Protocol::BrowsingContext::StopScreencastResult
          def traverse_history: (context: String, delta: Integer) -> untyped
        end
      end
    end
  end
end
