# 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 Browser < ::Selenium::WebDriver::BiDi::Protocol::Domain
          CLIENT_WINDOW_INFO_STATE: Hash[Symbol, String]

          CLIENT_WINDOW_NAMED_STATE_STATE: Hash[Symbol, String]

          class ClientWindowInfo < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader active: bool
            attr_reader client_window: String
            attr_reader height: Integer
            attr_reader state: Symbol
            attr_reader width: Integer
            attr_reader x: Integer
            attr_reader y: Integer
            def self.new: (active: bool, client_window: String, height: Integer, state: Symbol, width: Integer, x: Integer, y: Integer) -> instance
          end

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

          class CreateUserContextParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader accept_insecure_certs: untyped
            attr_reader proxy: untyped
            attr_reader unhandled_prompt_behavior: untyped
            def self.new: (?accept_insecure_certs: bool, ?proxy: ::Selenium::WebDriver::BiDi::Protocol::Session::ProxyConfiguration, ?unhandled_prompt_behavior: ::Selenium::WebDriver::BiDi::Protocol::Session::UserPromptHandler) -> instance
          end

          class GetClientWindowsResult < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader client_windows: Array[::Selenium::WebDriver::BiDi::Protocol::Browser::ClientWindowInfo]
            def self.new: (client_windows: Array[::Selenium::WebDriver::BiDi::Protocol::Browser::ClientWindowInfo]) -> instance
          end

          class GetUserContextsResult < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader user_contexts: Array[::Selenium::WebDriver::BiDi::Protocol::Browser::UserContextInfo]
            def self.new: (user_contexts: Array[::Selenium::WebDriver::BiDi::Protocol::Browser::UserContextInfo]) -> instance
          end

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

          class SetClientWindowStateParameters < ::Selenium::WebDriver::BiDi::Serialization::Union
            class ClientWindowNamedState < ::Selenium::WebDriver::BiDi::Serialization::Record
              attr_reader client_window: String
              attr_reader state: Symbol
              def self.new: (client_window: String, state: Symbol) -> instance
            end
            class ClientWindowRectState < ::Selenium::WebDriver::BiDi::Serialization::Record
              attr_reader state: String
              attr_reader client_window: String
              attr_reader width: untyped
              attr_reader height: untyped
              attr_reader x: untyped
              attr_reader y: untyped
              def self.new: (?state: String, client_window: String, ?width: Integer, ?height: Integer, ?x: Integer, ?y: Integer) -> instance
            end
          end

          class SetDownloadBehaviorParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader download_behavior: ::Selenium::WebDriver::BiDi::Protocol::Browser::DownloadBehavior?
            attr_reader user_contexts: untyped
            def self.new: (download_behavior: ::Selenium::WebDriver::BiDi::Protocol::Browser::DownloadBehavior?, ?user_contexts: Array[String]) -> instance
          end

          class DownloadBehavior < ::Selenium::WebDriver::BiDi::Serialization::Union
            class Allowed < ::Selenium::WebDriver::BiDi::Serialization::Record
              attr_reader type: String
              attr_reader destination_folder: String
              def self.new: (?type: String, destination_folder: String) -> instance
            end
            class Denied < ::Selenium::WebDriver::BiDi::Serialization::Record
              attr_reader type: String
              def self.new: (?type: String) -> instance
            end
          end

          def close: () -> untyped
          def create_user_context: (?accept_insecure_certs: bool, ?proxy: ::Selenium::WebDriver::BiDi::Protocol::Session::ProxyConfiguration, ?unhandled_prompt_behavior: ::Selenium::WebDriver::BiDi::Protocol::Session::UserPromptHandler) -> ::Selenium::WebDriver::BiDi::Protocol::Browser::UserContextInfo
          def get_client_windows: () -> ::Selenium::WebDriver::BiDi::Protocol::Browser::GetClientWindowsResult
          def get_user_contexts: () -> ::Selenium::WebDriver::BiDi::Protocol::Browser::GetUserContextsResult
          def remove_user_context: (user_context: String) -> untyped
          def set_client_window_state: (client_window: String, state: Symbol, ?width: Integer, ?height: Integer, ?x: Integer, ?y: Integer) -> ::Selenium::WebDriver::BiDi::Protocol::Browser::ClientWindowInfo
          def set_download_behavior: (download_behavior: ::Selenium::WebDriver::BiDi::Protocol::Browser::DownloadBehavior?, ?user_contexts: Array[String]) -> untyped
        end
      end
    end
  end
end
