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

          COLLECTOR_TYPE: Hash[Symbol, String]

          SAME_SITE: Hash[Symbol, String]

          DATA_TYPE: Hash[Symbol, String]

          INTERCEPT_PHASE: Hash[Symbol, String]

          INITIATOR_TYPE: Hash[Symbol, String]

          CONTINUE_WITH_AUTH_NO_CREDENTIALS_ACTION: Hash[Symbol, String]

          SET_CACHE_BEHAVIOR_PARAMETERS_CACHE_BEHAVIOR: Hash[Symbol, String]

          class AuthChallenge < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader scheme: String
            attr_reader realm: String
            def self.new: (scheme: String, realm: String) -> instance
          end

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

          class BaseParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String?
            attr_reader is_blocked: bool
            attr_reader navigation: String?
            attr_reader redirect_count: Integer
            attr_reader request: ::Selenium::WebDriver::BiDi::Protocol::Network::RequestData
            attr_reader timestamp: Integer
            attr_reader user_context: untyped
            attr_reader intercepts: untyped
            def self.new: (context: String?, is_blocked: bool, navigation: String?, redirect_count: Integer, request: ::Selenium::WebDriver::BiDi::Protocol::Network::RequestData, timestamp: Integer, ?user_context: String?, ?intercepts: Array[String]) -> instance
          end

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

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

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

          class Cookie < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader name: String
            attr_reader value: ::Selenium::WebDriver::BiDi::Protocol::Network::BytesValue
            attr_reader domain: String
            attr_reader path: String
            attr_reader size: Integer
            attr_reader http_only: bool
            attr_reader secure: bool
            attr_reader same_site: Symbol
            attr_reader expiry: untyped
            attr_reader extensions: Hash[String, untyped]
            def self.new: (name: String, value: ::Selenium::WebDriver::BiDi::Protocol::Network::BytesValue, domain: String, path: String, size: Integer, http_only: bool, secure: bool, same_site: Symbol, ?expiry: Integer, ?extensions: untyped) -> instance
          end

          class CookieHeader < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader name: String
            attr_reader value: ::Selenium::WebDriver::BiDi::Protocol::Network::BytesValue
            def self.new: (name: String, value: ::Selenium::WebDriver::BiDi::Protocol::Network::BytesValue) -> instance
          end

          class FetchTimingInfo < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader time_origin: Numeric
            attr_reader request_time: Numeric
            attr_reader redirect_start: Numeric
            attr_reader redirect_end: Numeric
            attr_reader fetch_start: Numeric
            attr_reader dns_start: Numeric
            attr_reader dns_end: Numeric
            attr_reader connect_start: Numeric
            attr_reader connect_end: Numeric
            attr_reader tls_start: Numeric
            attr_reader request_start: Numeric
            attr_reader response_start: Numeric
            attr_reader response_end: Numeric
            def self.new: (time_origin: Numeric, request_time: Numeric, redirect_start: Numeric, redirect_end: Numeric, fetch_start: Numeric, dns_start: Numeric, dns_end: Numeric, connect_start: Numeric, connect_end: Numeric, tls_start: Numeric, request_start: Numeric, response_start: Numeric, response_end: Numeric) -> instance
          end

          class Header < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader name: String
            attr_reader value: ::Selenium::WebDriver::BiDi::Protocol::Network::BytesValue
            def self.new: (name: String, value: ::Selenium::WebDriver::BiDi::Protocol::Network::BytesValue) -> instance
          end

          class Initiator < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader column_number: untyped
            attr_reader line_number: untyped
            attr_reader request: untyped
            attr_reader stack_trace: untyped
            attr_reader type: untyped
            def self.new: (?column_number: Integer, ?line_number: Integer, ?request: String, ?stack_trace: ::Selenium::WebDriver::BiDi::Protocol::Script::StackTrace, ?type: Symbol) -> instance
          end

          class RequestData < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader request: String
            attr_reader url: String
            attr_reader method_: String
            attr_reader headers: Array[::Selenium::WebDriver::BiDi::Protocol::Network::Header]
            attr_reader cookies: Array[::Selenium::WebDriver::BiDi::Protocol::Network::Cookie]
            attr_reader headers_size: Integer
            attr_reader body_size: Integer?
            attr_reader destination: String
            attr_reader initiator_type: String?
            attr_reader timings: ::Selenium::WebDriver::BiDi::Protocol::Network::FetchTimingInfo
            def self.new: (request: String, url: String, method_: String, headers: Array[::Selenium::WebDriver::BiDi::Protocol::Network::Header], cookies: Array[::Selenium::WebDriver::BiDi::Protocol::Network::Cookie], headers_size: Integer, body_size: Integer?, destination: String, initiator_type: String?, timings: ::Selenium::WebDriver::BiDi::Protocol::Network::FetchTimingInfo) -> instance
          end

          class ResponseContent < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader size: Integer
            def self.new: (size: Integer) -> instance
          end

          class ResponseData < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader url: String
            attr_reader protocol: String
            attr_reader status: Integer
            attr_reader status_text: String
            attr_reader from_cache: bool
            attr_reader headers: Array[::Selenium::WebDriver::BiDi::Protocol::Network::Header]
            attr_reader mime_type: String
            attr_reader bytes_received: Integer
            attr_reader headers_size: Integer?
            attr_reader body_size: Integer?
            attr_reader content: ::Selenium::WebDriver::BiDi::Protocol::Network::ResponseContent
            attr_reader auth_challenges: untyped
            def self.new: (url: String, protocol: String, status: Integer, status_text: String, from_cache: bool, headers: Array[::Selenium::WebDriver::BiDi::Protocol::Network::Header], mime_type: String, bytes_received: Integer, headers_size: Integer?, body_size: Integer?, content: ::Selenium::WebDriver::BiDi::Protocol::Network::ResponseContent, ?auth_challenges: Array[::Selenium::WebDriver::BiDi::Protocol::Network::AuthChallenge]) -> instance
          end

          class SetCookieHeader < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader name: String
            attr_reader value: ::Selenium::WebDriver::BiDi::Protocol::Network::BytesValue
            attr_reader domain: untyped
            attr_reader http_only: untyped
            attr_reader expiry: untyped
            attr_reader max_age: untyped
            attr_reader path: untyped
            attr_reader same_site: untyped
            attr_reader secure: untyped
            def self.new: (name: String, value: ::Selenium::WebDriver::BiDi::Protocol::Network::BytesValue, ?domain: String, ?http_only: bool, ?expiry: String, ?max_age: Integer, ?path: String, ?same_site: Symbol, ?secure: bool) -> instance
          end

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

          class UrlPatternPattern < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader type: String
            attr_reader protocol: untyped
            attr_reader hostname: untyped
            attr_reader port: untyped
            attr_reader pathname: untyped
            attr_reader search: untyped
            def self.new: (?type: String, ?protocol: String, ?hostname: String, ?port: String, ?pathname: String, ?search: String) -> instance
          end

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

          class AddDataCollectorParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader data_types: Array[Symbol]
            attr_reader max_encoded_data_size: Integer
            attr_reader collector_type: untyped
            attr_reader contexts: untyped
            attr_reader user_contexts: untyped
            def self.new: (data_types: Array[Symbol], max_encoded_data_size: Integer, ?collector_type: Symbol, ?contexts: Array[String], ?user_contexts: Array[String]) -> instance
          end

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

          class AddInterceptParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader phases: Array[Symbol]
            attr_reader contexts: untyped
            attr_reader url_patterns: untyped
            def self.new: (phases: Array[Symbol], ?contexts: Array[String], ?url_patterns: Array[::Selenium::WebDriver::BiDi::Protocol::Network::UrlPattern]) -> instance
          end

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

          class ContinueRequestParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader request: String
            attr_reader body: untyped
            attr_reader cookies: untyped
            attr_reader headers: untyped
            attr_reader method_: untyped
            attr_reader url: untyped
            def self.new: (request: String, ?body: ::Selenium::WebDriver::BiDi::Protocol::Network::BytesValue, ?cookies: Array[::Selenium::WebDriver::BiDi::Protocol::Network::CookieHeader], ?headers: Array[::Selenium::WebDriver::BiDi::Protocol::Network::Header], ?method_: String, ?url: String) -> instance
          end

          class ContinueResponseParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader request: String
            attr_reader cookies: untyped
            attr_reader credentials: untyped
            attr_reader headers: untyped
            attr_reader reason_phrase: untyped
            attr_reader status_code: untyped
            def self.new: (request: String, ?cookies: Array[::Selenium::WebDriver::BiDi::Protocol::Network::SetCookieHeader], ?credentials: ::Selenium::WebDriver::BiDi::Protocol::Network::AuthCredentials, ?headers: Array[::Selenium::WebDriver::BiDi::Protocol::Network::Header], ?reason_phrase: String, ?status_code: Integer) -> instance
          end

          class ContinueWithAuthParameters < ::Selenium::WebDriver::BiDi::Serialization::Union
            class Credentials < ::Selenium::WebDriver::BiDi::Serialization::Record
              attr_reader action: String
              attr_reader request: String
              attr_reader credentials: ::Selenium::WebDriver::BiDi::Protocol::Network::AuthCredentials
              def self.new: (?action: String, request: String, credentials: ::Selenium::WebDriver::BiDi::Protocol::Network::AuthCredentials) -> instance
            end
            class NoCredentials < ::Selenium::WebDriver::BiDi::Serialization::Record
              attr_reader request: String
              attr_reader action: Symbol
              def self.new: (request: String, action: Symbol) -> instance
            end
          end

          class DisownDataParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader data_type: Symbol
            attr_reader collector: String
            attr_reader request: String
            def self.new: (data_type: Symbol, collector: String, request: String) -> instance
          end

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

          class GetDataParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader data_type: Symbol
            attr_reader collector: untyped
            attr_reader disown: untyped
            attr_reader request: String
            def self.new: (data_type: Symbol, ?collector: String, ?disown: bool, request: String) -> instance
          end

          class GetDataResult < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader bytes: ::Selenium::WebDriver::BiDi::Protocol::Network::BytesValue
            def self.new: (bytes: ::Selenium::WebDriver::BiDi::Protocol::Network::BytesValue) -> instance
          end

          class ProvideResponseParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader request: String
            attr_reader body: untyped
            attr_reader cookies: untyped
            attr_reader headers: untyped
            attr_reader reason_phrase: untyped
            attr_reader status_code: untyped
            def self.new: (request: String, ?body: ::Selenium::WebDriver::BiDi::Protocol::Network::BytesValue, ?cookies: Array[::Selenium::WebDriver::BiDi::Protocol::Network::SetCookieHeader], ?headers: Array[::Selenium::WebDriver::BiDi::Protocol::Network::Header], ?reason_phrase: String, ?status_code: Integer) -> instance
          end

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

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

          class SetCacheBehaviorParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader cache_behavior: Symbol
            attr_reader contexts: untyped
            def self.new: (cache_behavior: Symbol, ?contexts: Array[String]) -> instance
          end

          class SetExtraHeadersParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader headers: Array[::Selenium::WebDriver::BiDi::Protocol::Network::Header]
            attr_reader contexts: untyped
            attr_reader user_contexts: untyped
            def self.new: (headers: Array[::Selenium::WebDriver::BiDi::Protocol::Network::Header], ?contexts: Array[String], ?user_contexts: Array[String]) -> instance
          end

          class AuthRequiredParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String?
            attr_reader is_blocked: bool
            attr_reader navigation: String?
            attr_reader redirect_count: Integer
            attr_reader request: ::Selenium::WebDriver::BiDi::Protocol::Network::RequestData
            attr_reader timestamp: Integer
            attr_reader user_context: untyped
            attr_reader intercepts: untyped
            attr_reader response: ::Selenium::WebDriver::BiDi::Protocol::Network::ResponseData
            def self.new: (context: String?, is_blocked: bool, navigation: String?, redirect_count: Integer, request: ::Selenium::WebDriver::BiDi::Protocol::Network::RequestData, timestamp: Integer, ?user_context: String?, ?intercepts: Array[String], response: ::Selenium::WebDriver::BiDi::Protocol::Network::ResponseData) -> instance
          end

          class BeforeRequestSentParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String?
            attr_reader is_blocked: bool
            attr_reader navigation: String?
            attr_reader redirect_count: Integer
            attr_reader request: ::Selenium::WebDriver::BiDi::Protocol::Network::RequestData
            attr_reader timestamp: Integer
            attr_reader user_context: untyped
            attr_reader intercepts: untyped
            attr_reader initiator: untyped
            def self.new: (context: String?, is_blocked: bool, navigation: String?, redirect_count: Integer, request: ::Selenium::WebDriver::BiDi::Protocol::Network::RequestData, timestamp: Integer, ?user_context: String?, ?intercepts: Array[String], ?initiator: ::Selenium::WebDriver::BiDi::Protocol::Network::Initiator) -> instance
          end

          class FetchErrorParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String?
            attr_reader is_blocked: bool
            attr_reader navigation: String?
            attr_reader redirect_count: Integer
            attr_reader request: ::Selenium::WebDriver::BiDi::Protocol::Network::RequestData
            attr_reader timestamp: Integer
            attr_reader user_context: untyped
            attr_reader intercepts: untyped
            attr_reader error_text: String
            def self.new: (context: String?, is_blocked: bool, navigation: String?, redirect_count: Integer, request: ::Selenium::WebDriver::BiDi::Protocol::Network::RequestData, timestamp: Integer, ?user_context: String?, ?intercepts: Array[String], error_text: String) -> instance
          end

          class ResponseCompletedParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String?
            attr_reader is_blocked: bool
            attr_reader navigation: String?
            attr_reader redirect_count: Integer
            attr_reader request: ::Selenium::WebDriver::BiDi::Protocol::Network::RequestData
            attr_reader timestamp: Integer
            attr_reader user_context: untyped
            attr_reader intercepts: untyped
            attr_reader response: ::Selenium::WebDriver::BiDi::Protocol::Network::ResponseData
            def self.new: (context: String?, is_blocked: bool, navigation: String?, redirect_count: Integer, request: ::Selenium::WebDriver::BiDi::Protocol::Network::RequestData, timestamp: Integer, ?user_context: String?, ?intercepts: Array[String], response: ::Selenium::WebDriver::BiDi::Protocol::Network::ResponseData) -> instance
          end

          class ResponseStartedParameters < ::Selenium::WebDriver::BiDi::Serialization::Record
            attr_reader context: String?
            attr_reader is_blocked: bool
            attr_reader navigation: String?
            attr_reader redirect_count: Integer
            attr_reader request: ::Selenium::WebDriver::BiDi::Protocol::Network::RequestData
            attr_reader timestamp: Integer
            attr_reader user_context: untyped
            attr_reader intercepts: untyped
            attr_reader response: ::Selenium::WebDriver::BiDi::Protocol::Network::ResponseData
            def self.new: (context: String?, is_blocked: bool, navigation: String?, redirect_count: Integer, request: ::Selenium::WebDriver::BiDi::Protocol::Network::RequestData, timestamp: Integer, ?user_context: String?, ?intercepts: Array[String], response: ::Selenium::WebDriver::BiDi::Protocol::Network::ResponseData) -> instance
          end

          EVENT_TYPES: Hash[String, untyped]

          def add_data_collector: (data_types: Array[Symbol], max_encoded_data_size: Integer, ?collector_type: Symbol, ?contexts: Array[String], ?user_contexts: Array[String]) -> ::Selenium::WebDriver::BiDi::Protocol::Network::AddDataCollectorResult
          def add_intercept: (phases: Array[Symbol], ?contexts: Array[String], ?url_patterns: Array[::Selenium::WebDriver::BiDi::Protocol::Network::UrlPattern]) -> ::Selenium::WebDriver::BiDi::Protocol::Network::AddInterceptResult
          def continue_request: (request: String, ?body: ::Selenium::WebDriver::BiDi::Protocol::Network::BytesValue, ?cookies: Array[::Selenium::WebDriver::BiDi::Protocol::Network::CookieHeader], ?headers: Array[::Selenium::WebDriver::BiDi::Protocol::Network::Header], ?method_: String, ?url: String) -> untyped
          def continue_response: (request: String, ?cookies: Array[::Selenium::WebDriver::BiDi::Protocol::Network::SetCookieHeader], ?credentials: ::Selenium::WebDriver::BiDi::Protocol::Network::AuthCredentials, ?headers: Array[::Selenium::WebDriver::BiDi::Protocol::Network::Header], ?reason_phrase: String, ?status_code: Integer) -> untyped
          def continue_with_auth: (request: String, action: Symbol, ?credentials: ::Selenium::WebDriver::BiDi::Protocol::Network::AuthCredentials) -> untyped
          def disown_data: (data_type: Symbol, collector: String, request: String) -> untyped
          def fail_request: (request: String) -> untyped
          def get_data: (data_type: Symbol, request: String, ?collector: String, ?disown: bool) -> ::Selenium::WebDriver::BiDi::Protocol::Network::GetDataResult
          def provide_response: (request: String, ?body: ::Selenium::WebDriver::BiDi::Protocol::Network::BytesValue, ?cookies: Array[::Selenium::WebDriver::BiDi::Protocol::Network::SetCookieHeader], ?headers: Array[::Selenium::WebDriver::BiDi::Protocol::Network::Header], ?reason_phrase: String, ?status_code: Integer) -> untyped
          def remove_data_collector: (collector: String) -> untyped
          def remove_intercept: (intercept: String) -> untyped
          def set_cache_behavior: (cache_behavior: Symbol, ?contexts: Array[String]) -> untyped
          def set_extra_headers: (headers: Array[::Selenium::WebDriver::BiDi::Protocol::Network::Header], ?contexts: Array[String], ?user_contexts: Array[String]) -> untyped
        end
      end
    end
  end
end
