chromium/out/Default/gen/extensions/common/api/automation.h

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// GENERATED FROM THE API DEFINITION IN
//   extensions/common/api/automation.idl
// by tools/json_schema_compiler.
// DO NOT EDIT.

#ifndef EXTENSIONS_COMMON_API_AUTOMATION_H__
#define EXTENSIONS_COMMON_API_AUTOMATION_H__

#include <stdint.h>

#include <map>
#include <memory>
#include <optional>
#include <string>
#include <vector>

#include "base/values.h"
#include <string_view>


namespace extensions {
namespace api {
namespace automation {

//
// Types
//

// Possible events fired on an $(ref:automation.AutomationNode).
enum class EventType {};


const char* ToString(EventType as_enum);
EventType ParseEventType(std::string_view as_string);
std::u16string GetEventTypeParseError(std::string_view as_string);

// Describes the purpose of an $(ref:automation.AutomationNode).
enum class RoleType {};


const char* ToString(RoleType as_enum);
RoleType ParseRoleType(std::string_view as_string);
std::u16string GetRoleTypeParseError(std::string_view as_string);

// Describes characteristics of an $(ref:automation.AutomationNode).
enum class StateType {};


const char* ToString(StateType as_enum);
StateType ParseStateType(std::string_view as_string);
std::u16string GetStateTypeParseError(std::string_view as_string);

// All possible actions that can be performed on automation nodes.
enum class ActionType {};


const char* ToString(ActionType as_enum);
ActionType ParseActionType(std::string_view as_string);
std::u16string GetActionTypeParseError(std::string_view as_string);

// <p>Possible changes to the automation tree. For any given atomic change to
// the tree, each node that's added, removed, or changed, will appear in exactly
// one TreeChange, with one of these types.</p><p>nodeCreated means that this
// node was added to the tree and its parent is new as well, so it's just one
// node in a new subtree that was added.</p>
enum class TreeChangeType {};


const char* ToString(TreeChangeType as_enum);
TreeChangeType ParseTreeChangeType(std::string_view as_string);
std::u16string GetTreeChangeTypeParseError(std::string_view as_string);

// Where the node's name is from.
enum class NameFromType {};


const char* ToString(NameFromType as_enum);
NameFromType ParseNameFromType(std::string_view as_string);
std::u16string GetNameFromTypeParseError(std::string_view as_string);

enum class DescriptionFromType {};


const char* ToString(DescriptionFromType as_enum);
DescriptionFromType ParseDescriptionFromType(std::string_view as_string);
std::u16string GetDescriptionFromTypeParseError(std::string_view as_string);

// The input restriction for a object -- even non-controls can be disabled.
enum class Restriction {};


const char* ToString(Restriction as_enum);
Restriction ParseRestriction(std::string_view as_string);
std::u16string GetRestrictionParseError(std::string_view as_string);

// Availability and types for an interactive popup element.
enum class HasPopup {};


const char* ToString(HasPopup as_enum);
HasPopup ParseHasPopup(std::string_view as_string);
std::u16string GetHasPopupParseError(std::string_view as_string);

// Indicates the ARIA-current state.
enum class AriaCurrentState {};


const char* ToString(AriaCurrentState as_enum);
AriaCurrentState ParseAriaCurrentState(std::string_view as_string);
std::u16string GetAriaCurrentStateParseError(std::string_view as_string);

// Lists the values that `invalidState` can take on.
enum class InvalidState {};


const char* ToString(InvalidState as_enum);
InvalidState ParseInvalidState(std::string_view as_string);
std::u16string GetInvalidStateParseError(std::string_view as_string);

// Describes possible actions when performing a do default action.
enum class DefaultActionVerb {};


const char* ToString(DefaultActionVerb as_enum);
DefaultActionVerb ParseDefaultActionVerb(std::string_view as_string);
std::u16string GetDefaultActionVerbParseError(std::string_view as_string);

// Types of markers on text. See <code>AutomationNode.markerTypes</code>.
enum class MarkerType {};


const char* ToString(MarkerType as_enum);
MarkerType ParseMarkerType(std::string_view as_string);
std::u16string GetMarkerTypeParseError(std::string_view as_string);

// A command associated with an $(ref:automation.AutomationIntent).
enum class IntentCommandType {};


const char* ToString(IntentCommandType as_enum);
IntentCommandType ParseIntentCommandType(std::string_view as_string);
std::u16string GetIntentCommandTypeParseError(std::string_view as_string);

// The type of an input event associated with an
// $(ref:automation.AutomationIntent). It describes an edit command, e.g.
// IntentCommandType.insert, in more detail.
enum class IntentInputEventType {};


const char* ToString(IntentInputEventType as_enum);
IntentInputEventType ParseIntentInputEventType(std::string_view as_string);
std::u16string GetIntentInputEventTypeParseError(std::string_view as_string);

// A text boundary associated with an $(ref:automation.AutomationIntent).
enum class IntentTextBoundaryType {};


const char* ToString(IntentTextBoundaryType as_enum);
IntentTextBoundaryType ParseIntentTextBoundaryType(std::string_view as_string);
std::u16string GetIntentTextBoundaryTypeParseError(std::string_view as_string);

// A move direction associated with an $(ref:automation.AutomationIntent).
enum class IntentMoveDirectionType {};


const char* ToString(IntentMoveDirectionType as_enum);
IntentMoveDirectionType ParseIntentMoveDirectionType(std::string_view as_string);
std::u16string GetIntentMoveDirectionTypeParseError(std::string_view as_string);

// A sort applied to a table row or column header.
enum class SortDirectionType {};


const char* ToString(SortDirectionType as_enum);
SortDirectionType ParseSortDirectionType(std::string_view as_string);
std::u16string GetSortDirectionTypeParseError(std::string_view as_string);

// A type of AutomationPosition.
enum class PositionType {};


const char* ToString(PositionType as_enum);
PositionType ParsePositionType(std::string_view as_string);
std::u16string GetPositionTypeParseError(std::string_view as_string);

struct Rect {};

struct FindParams {};

struct SetDocumentSelectionParams {};

struct AutomationIntent {};

struct AutomationEvent {};

struct TreeChange {};

// Possible tree changes to listen to using addTreeChangeObserver. Note that
// listening to all tree changes can be expensive.
enum class TreeChangeObserverFilter {};


const char* ToString(TreeChangeObserverFilter as_enum);
TreeChangeObserverFilter ParseTreeChangeObserverFilter(std::string_view as_string);
std::u16string GetTreeChangeObserverFilterParseError(std::string_view as_string);

struct CustomAction {};

struct Marker {};

struct AutomationPosition {};

struct AutomationNode {};


}  // namespace automation
}  // namespace api
}  // namespace extensions

#endif  // EXTENSIONS_COMMON_API_AUTOMATION_H__