api

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.2 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewArchiveListItemRequest

func NewArchiveListItemRequest(server string, listId string, id string) (*http.Request, error)

NewArchiveListItemRequest constructs an http.Request for the ArchiveListItem method

func NewCountListItemsRequest

func NewCountListItemsRequest(server string, listId string, body CountListItemsJSONRequestBody) (*http.Request, error)

NewCountListItemsRequest calls the generic CountListItems builder with application/json body

func NewCountListItemsRequestWithBody

func NewCountListItemsRequestWithBody(server string, listId string, contentType string, body io.Reader) (*http.Request, error)

NewCountListItemsRequestWithBody constructs an http.Request for the CountListItems method, with any body, and a specified content type

func NewCreateListItemRequest

func NewCreateListItemRequest(server string, listId string, body CreateListItemJSONRequestBody) (*http.Request, error)

NewCreateListItemRequest calls the generic CreateListItem builder with application/json body

func NewCreateListItemRequestWithBody

func NewCreateListItemRequestWithBody(server string, listId string, contentType string, body io.Reader) (*http.Request, error)

NewCreateListItemRequestWithBody constructs an http.Request for the CreateListItem method, with any body, and a specified content type

func NewCreateListRequest

func NewCreateListRequest(server string, body CreateListJSONRequestBody) (*http.Request, error)

NewCreateListRequest calls the generic CreateList builder with application/json body

func NewCreateListRequestWithBody

func NewCreateListRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateListRequestWithBody constructs an http.Request for the CreateList method, with any body, and a specified content type

func NewCreateOrUpdateBatchListItemsRequest

func NewCreateOrUpdateBatchListItemsRequest(server string, listId string, body CreateOrUpdateBatchListItemsJSONRequestBody) (*http.Request, error)

NewCreateOrUpdateBatchListItemsRequest calls the generic CreateOrUpdateBatchListItems builder with application/json body

func NewCreateOrUpdateBatchListItemsRequestWithBody

func NewCreateOrUpdateBatchListItemsRequestWithBody(server string, listId string, contentType string, body io.Reader) (*http.Request, error)

NewCreateOrUpdateBatchListItemsRequestWithBody constructs an http.Request for the CreateOrUpdateBatchListItems method, with any body, and a specified content type

func NewDeleteListRequest

func NewDeleteListRequest(server string, id string) (*http.Request, error)

NewDeleteListRequest constructs an http.Request for the DeleteList method

func NewDeleteUserPrivacyDeprecatedRequest

func NewDeleteUserPrivacyDeprecatedRequest(server string, id string) (*http.Request, error)

NewDeleteUserPrivacyDeprecatedRequest constructs an http.Request for the DeleteUserPrivacyDeprecated method

func NewDeleteUserPrivacyRequest

func NewDeleteUserPrivacyRequest(server string, body DeleteUserPrivacyJSONRequestBody) (*http.Request, error)

NewDeleteUserPrivacyRequest calls the generic DeleteUserPrivacy builder with application/json body

func NewDeleteUserPrivacyRequestWithBody

func NewDeleteUserPrivacyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewDeleteUserPrivacyRequestWithBody constructs an http.Request for the DeleteUserPrivacy method, with any body, and a specified content type

func NewDownloadIpDatasetExportRequest

func NewDownloadIpDatasetExportRequest(server string, dataset string, window string, format string) (*http.Request, error)

NewDownloadIpDatasetExportRequest constructs an http.Request for the DownloadIpDatasetExport method

func NewFilterRequest

func NewFilterRequest(server string, body FilterJSONRequestBody) (*http.Request, error)

NewFilterRequest calls the generic Filter builder with application/json body

func NewFilterRequestWithBody

func NewFilterRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewFilterRequestWithBody constructs an http.Request for the Filter method, with any body, and a specified content type

func NewGetEventSchemaRequest

func NewGetEventSchemaRequest(server string) (*http.Request, error)

NewGetEventSchemaRequest constructs an http.Request for the GetEventSchema method

func NewGetLatestIpDatasetExportMetadataRequest

func NewGetLatestIpDatasetExportMetadataRequest(server string, dataset string, window string, format string) (*http.Request, error)

NewGetLatestIpDatasetExportMetadataRequest constructs an http.Request for the GetLatestIpDatasetExportMetadata method

func NewGetListItemRequest

func NewGetListItemRequest(server string, listId string, id string) (*http.Request, error)

NewGetListItemRequest constructs an http.Request for the GetListItem method

func NewGetListRequest

func NewGetListRequest(server string, id string, params *GetListParams) (*http.Request, error)

NewGetListRequest constructs an http.Request for the GetList method

func NewGetListsRequest

func NewGetListsRequest(server string) (*http.Request, error)

NewGetListsRequest constructs an http.Request for the GetLists method

func NewGetUserPrivacyDeprecatedRequest

func NewGetUserPrivacyDeprecatedRequest(server string, id string) (*http.Request, error)

NewGetUserPrivacyDeprecatedRequest constructs an http.Request for the GetUserPrivacyDeprecated method

func NewGetUserPrivacyRequest

func NewGetUserPrivacyRequest(server string, body GetUserPrivacyJSONRequestBody) (*http.Request, error)

NewGetUserPrivacyRequest calls the generic GetUserPrivacy builder with application/json body

func NewGetUserPrivacyRequestWithBody

func NewGetUserPrivacyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewGetUserPrivacyRequestWithBody constructs an http.Request for the GetUserPrivacy method, with any body, and a specified content type

func NewGroupEventsRequest

func NewGroupEventsRequest(server string, body GroupEventsJSONRequestBody) (*http.Request, error)

NewGroupEventsRequest calls the generic GroupEvents builder with application/json body

func NewGroupEventsRequestWithBody

func NewGroupEventsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewGroupEventsRequestWithBody constructs an http.Request for the GroupEvents method, with any body, and a specified content type

func NewIpsLookupBatchRequest

func NewIpsLookupBatchRequest(server string, body IpsLookupBatchJSONRequestBody) (*http.Request, error)

NewIpsLookupBatchRequest calls the generic IpsLookupBatch builder with application/json body

func NewIpsLookupBatchRequestWithBody

func NewIpsLookupBatchRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewIpsLookupBatchRequestWithBody constructs an http.Request for the IpsLookupBatch method, with any body, and a specified content type

func NewIpsLookupSingleRequest

func NewIpsLookupSingleRequest(server string, value string) (*http.Request, error)

NewIpsLookupSingleRequest constructs an http.Request for the IpsLookupSingle method

func NewQueryEventsRequest

func NewQueryEventsRequest(server string, body QueryEventsJSONRequestBody) (*http.Request, error)

NewQueryEventsRequest calls the generic QueryEvents builder with application/json body

func NewQueryEventsRequestWithBody

func NewQueryEventsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewQueryEventsRequestWithBody constructs an http.Request for the QueryEvents method, with any body, and a specified content type

func NewQueryListItemsRequest

func NewQueryListItemsRequest(server string, listId string, body QueryListItemsJSONRequestBody) (*http.Request, error)

NewQueryListItemsRequest calls the generic QueryListItems builder with application/json body

func NewQueryListItemsRequestWithBody

func NewQueryListItemsRequestWithBody(server string, listId string, contentType string, body io.Reader) (*http.Request, error)

NewQueryListItemsRequestWithBody constructs an http.Request for the QueryListItems method, with any body, and a specified content type

func NewQueryListsRequest

func NewQueryListsRequest(server string, body QueryListsJSONRequestBody) (*http.Request, error)

NewQueryListsRequest calls the generic QueryLists builder with application/json body

func NewQueryListsRequestWithBody

func NewQueryListsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewQueryListsRequestWithBody constructs an http.Request for the QueryLists method, with any body, and a specified content type

func NewRiskRequest

func NewRiskRequest(server string, body RiskJSONRequestBody) (*http.Request, error)

NewRiskRequest calls the generic Risk builder with application/json body

func NewRiskRequestWithBody

func NewRiskRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewRiskRequestWithBody constructs an http.Request for the Risk method, with any body, and a specified content type

func NewUnarchiveListItemRequest

func NewUnarchiveListItemRequest(server string, listId string, id string, body UnarchiveListItemJSONRequestBody) (*http.Request, error)

NewUnarchiveListItemRequest calls the generic UnarchiveListItem builder with application/json body

func NewUnarchiveListItemRequestWithBody

func NewUnarchiveListItemRequestWithBody(server string, listId string, id string, contentType string, body io.Reader) (*http.Request, error)

NewUnarchiveListItemRequestWithBody constructs an http.Request for the UnarchiveListItem method, with any body, and a specified content type

func NewUpdateListItemRequest

func NewUpdateListItemRequest(server string, listId string, id string, body UpdateListItemJSONRequestBody) (*http.Request, error)

NewUpdateListItemRequest calls the generic UpdateListItem builder with application/json body

func NewUpdateListItemRequestWithBody

func NewUpdateListItemRequestWithBody(server string, listId string, id string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateListItemRequestWithBody constructs an http.Request for the UpdateListItem method, with any body, and a specified content type

func NewUpdateListRequest

func NewUpdateListRequest(server string, id string, body UpdateListJSONRequestBody) (*http.Request, error)

NewUpdateListRequest calls the generic UpdateList builder with application/json body

func NewUpdateListRequestWithBody

func NewUpdateListRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateListRequestWithBody constructs an http.Request for the UpdateList method, with any body, and a specified content type

Types

type Address

type Address struct {
	// City Name of the city associated to this address.
	//
	// Example: San Francisco
	City nullable.Nullable[string] `json:"city,omitempty"`

	// CountryCode ISO-3166 country code
	//
	// Example: US
	CountryCode nullable.Nullable[string] `json:"country_code"`

	// Fingerprint Example: 8a33j2lir9
	Fingerprint nullable.Nullable[string] `json:"fingerprint,omitempty"`

	// Line1 Example: 60 Rausch Street
	Line1 nullable.Nullable[string] `json:"line1,omitempty"`
	Line2 nullable.Nullable[string] `json:"line2,omitempty"`

	// PostalCode Example: 94103
	PostalCode nullable.Nullable[string] `json:"postal_code,omitempty"`

	// RegionCode ISO region code
	//
	// Example: CA
	RegionCode nullable.Nullable[string] `json:"region_code,omitempty"`
}

Address defines model for Address.

type Agent

type Agent struct {
	// Category Agent category.
	//
	// Example: ai_agent
	Category AgentCategory `json:"category"`

	// IdentifiedBy Methods that identified the agent, in order of precedence.
	//
	// Example: ["web_bot_auth"]
	IdentifiedBy []AgentIdentifiedBy `json:"identified_by"`

	// Name Agent display name.
	//
	// Example: ChatGPT agent
	Name string `json:"name"`

	// Operator Operator identifier (e.g. `openai`).
	//
	// Example: openai
	Operator string `json:"operator"`
}

Agent AI agent identified for this event/context. Omitted when no agent is identified

type AgentCategory

type AgentCategory string

AgentCategory Agent category.

Example: ai_agent

const (
	AiAgent           AgentCategory = "ai_agent"
	AiBrowser         AgentCategory = "ai_browser"
	BrowserAutomation AgentCategory = "browser_automation"
)

Defines values for AgentCategory.

func (AgentCategory) Valid

func (e AgentCategory) Valid() bool

Valid indicates whether the value is a known member of the AgentCategory enum.

type AgentIdentifiedBy

type AgentIdentifiedBy string

AgentIdentifiedBy defines model for Agent.IdentifiedBy.

const (
	Fingerprint AgentIdentifiedBy = "fingerprint"
	UserAgent   AgentIdentifiedBy = "user_agent"
	WebBotAuth  AgentIdentifiedBy = "web_bot_auth"
)

Defines values for AgentIdentifiedBy.

func (AgentIdentifiedBy) Valid

func (e AgentIdentifiedBy) Valid() bool

Valid indicates whether the value is a known member of the AgentIdentifiedBy enum.

type AggregationBase

type AggregationBase struct {
	// Description Description of the aggregation
	//
	// Example: Maximum Account TakeOver score seen per IP in the last day.
	Description nullable.Nullable[string] `json:"description,omitempty"`

	// Filters Event filters to define when aggregation should be triggered. Accepts a list of filters or a filter tree.
	Filters *AggregationBase_Filters `json:"filters,omitempty"`
	GroupBy nullable.Nullable[struct {
		// Fields The fields names to group by
		Fields *[]struct {
			// Field Example: ip.address
			Field string `json:"field"`
		} `json:"fields,omitempty"`
	}] `json:"group_by,omitempty"`

	// Interval Time interval in seconds over which aggregation should be observed. Maximum is 180 days.
	//
	// Example: 86400
	Interval *int `json:"interval,omitempty"`

	// Name Human-readable name of the aggregation
	//
	// Example: Critical Events per IP in 1h
	Name *string `json:"name,omitempty"`

	// Value Field name where to get the value from for the aggregation
	Value *struct {
		// Field Field name
		//
		// Example: scores.account_takeover.score
		Field string `json:"field"`
	} `json:"value,omitempty"`
}

AggregationBase Aggregation

type AggregationBaseFilters0

type AggregationBaseFilters0 = []AggregationBase_Filters_0_Item

AggregationBaseFilters0 defines model for AggregationBase.Filters.0.

type AggregationBase_Filters

type AggregationBase_Filters struct {
	// contains filtered or unexported fields
}

AggregationBase_Filters Event filters to define when aggregation should be triggered. Accepts a list of filters or a filter tree.

func (AggregationBase_Filters) AsAggregationBaseFilters0

func (t AggregationBase_Filters) AsAggregationBaseFilters0() (AggregationBaseFilters0, error)

AsAggregationBaseFilters0 returns the union data inside the AggregationBase_Filters as a AggregationBaseFilters0

func (AggregationBase_Filters) AsAggregationLogicalFilter

func (t AggregationBase_Filters) AsAggregationLogicalFilter() (AggregationLogicalFilter, error)

AsAggregationLogicalFilter returns the union data inside the AggregationBase_Filters as a AggregationLogicalFilter

func (*AggregationBase_Filters) FromAggregationBaseFilters0

func (t *AggregationBase_Filters) FromAggregationBaseFilters0(v AggregationBaseFilters0) error

FromAggregationBaseFilters0 overwrites any union data inside the AggregationBase_Filters as the provided AggregationBaseFilters0

func (*AggregationBase_Filters) FromAggregationLogicalFilter

func (t *AggregationBase_Filters) FromAggregationLogicalFilter(v AggregationLogicalFilter) error

FromAggregationLogicalFilter overwrites any union data inside the AggregationBase_Filters as the provided AggregationLogicalFilter

func (AggregationBase_Filters) MarshalJSON

func (t AggregationBase_Filters) MarshalJSON() ([]byte, error)

func (*AggregationBase_Filters) MergeAggregationBaseFilters0

func (t *AggregationBase_Filters) MergeAggregationBaseFilters0(v AggregationBaseFilters0) error

MergeAggregationBaseFilters0 performs a merge with any union data inside the AggregationBase_Filters, using the provided AggregationBaseFilters0

func (*AggregationBase_Filters) MergeAggregationLogicalFilter

func (t *AggregationBase_Filters) MergeAggregationLogicalFilter(v AggregationLogicalFilter) error

MergeAggregationLogicalFilter performs a merge with any union data inside the AggregationBase_Filters, using the provided AggregationLogicalFilter

func (*AggregationBase_Filters) UnmarshalJSON

func (t *AggregationBase_Filters) UnmarshalJSON(b []byte) error

type AggregationBase_Filters_0_Item

type AggregationBase_Filters_0_Item struct {
	// contains filtered or unexported fields
}

AggregationBase_Filters_0_Item defines model for AggregationBase.Filters.0.Item.

func (AggregationBase_Filters_0_Item) AsArrayMatchQueryFilter

func (t AggregationBase_Filters_0_Item) AsArrayMatchQueryFilter() (ArrayMatchQueryFilter, error)

AsArrayMatchQueryFilter returns the union data inside the AggregationBase_Filters_0_Item as a ArrayMatchQueryFilter

func (AggregationBase_Filters_0_Item) AsExistsQueryFilter

func (t AggregationBase_Filters_0_Item) AsExistsQueryFilter() (ExistsQueryFilter, error)

AsExistsQueryFilter returns the union data inside the AggregationBase_Filters_0_Item as a ExistsQueryFilter

func (AggregationBase_Filters_0_Item) AsOrQueryFilter

func (t AggregationBase_Filters_0_Item) AsOrQueryFilter() (OrQueryFilter, error)

AsOrQueryFilter returns the union data inside the AggregationBase_Filters_0_Item as a OrQueryFilter

func (AggregationBase_Filters_0_Item) AsQueryFilter

func (t AggregationBase_Filters_0_Item) AsQueryFilter() (QueryFilter, error)

AsQueryFilter returns the union data inside the AggregationBase_Filters_0_Item as a QueryFilter

func (AggregationBase_Filters_0_Item) AsRangeQueryFilter

func (t AggregationBase_Filters_0_Item) AsRangeQueryFilter() (RangeQueryFilter, error)

AsRangeQueryFilter returns the union data inside the AggregationBase_Filters_0_Item as a RangeQueryFilter

func (AggregationBase_Filters_0_Item) AsRelativeRangeQueryFilter

func (t AggregationBase_Filters_0_Item) AsRelativeRangeQueryFilter() (RelativeRangeQueryFilter, error)

AsRelativeRangeQueryFilter returns the union data inside the AggregationBase_Filters_0_Item as a RelativeRangeQueryFilter

func (*AggregationBase_Filters_0_Item) FromArrayMatchQueryFilter

func (t *AggregationBase_Filters_0_Item) FromArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

FromArrayMatchQueryFilter overwrites any union data inside the AggregationBase_Filters_0_Item as the provided ArrayMatchQueryFilter

func (*AggregationBase_Filters_0_Item) FromExistsQueryFilter

func (t *AggregationBase_Filters_0_Item) FromExistsQueryFilter(v ExistsQueryFilter) error

FromExistsQueryFilter overwrites any union data inside the AggregationBase_Filters_0_Item as the provided ExistsQueryFilter

func (*AggregationBase_Filters_0_Item) FromOrQueryFilter

func (t *AggregationBase_Filters_0_Item) FromOrQueryFilter(v OrQueryFilter) error

FromOrQueryFilter overwrites any union data inside the AggregationBase_Filters_0_Item as the provided OrQueryFilter

func (*AggregationBase_Filters_0_Item) FromQueryFilter

func (t *AggregationBase_Filters_0_Item) FromQueryFilter(v QueryFilter) error

FromQueryFilter overwrites any union data inside the AggregationBase_Filters_0_Item as the provided QueryFilter

func (*AggregationBase_Filters_0_Item) FromRangeQueryFilter

func (t *AggregationBase_Filters_0_Item) FromRangeQueryFilter(v RangeQueryFilter) error

FromRangeQueryFilter overwrites any union data inside the AggregationBase_Filters_0_Item as the provided RangeQueryFilter

func (*AggregationBase_Filters_0_Item) FromRelativeRangeQueryFilter

func (t *AggregationBase_Filters_0_Item) FromRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

FromRelativeRangeQueryFilter overwrites any union data inside the AggregationBase_Filters_0_Item as the provided RelativeRangeQueryFilter

func (AggregationBase_Filters_0_Item) MarshalJSON

func (t AggregationBase_Filters_0_Item) MarshalJSON() ([]byte, error)

func (*AggregationBase_Filters_0_Item) MergeArrayMatchQueryFilter

func (t *AggregationBase_Filters_0_Item) MergeArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

MergeArrayMatchQueryFilter performs a merge with any union data inside the AggregationBase_Filters_0_Item, using the provided ArrayMatchQueryFilter

func (*AggregationBase_Filters_0_Item) MergeExistsQueryFilter

func (t *AggregationBase_Filters_0_Item) MergeExistsQueryFilter(v ExistsQueryFilter) error

MergeExistsQueryFilter performs a merge with any union data inside the AggregationBase_Filters_0_Item, using the provided ExistsQueryFilter

func (*AggregationBase_Filters_0_Item) MergeOrQueryFilter

func (t *AggregationBase_Filters_0_Item) MergeOrQueryFilter(v OrQueryFilter) error

MergeOrQueryFilter performs a merge with any union data inside the AggregationBase_Filters_0_Item, using the provided OrQueryFilter

func (*AggregationBase_Filters_0_Item) MergeQueryFilter

func (t *AggregationBase_Filters_0_Item) MergeQueryFilter(v QueryFilter) error

MergeQueryFilter performs a merge with any union data inside the AggregationBase_Filters_0_Item, using the provided QueryFilter

func (*AggregationBase_Filters_0_Item) MergeRangeQueryFilter

func (t *AggregationBase_Filters_0_Item) MergeRangeQueryFilter(v RangeQueryFilter) error

MergeRangeQueryFilter performs a merge with any union data inside the AggregationBase_Filters_0_Item, using the provided RangeQueryFilter

func (*AggregationBase_Filters_0_Item) MergeRelativeRangeQueryFilter

func (t *AggregationBase_Filters_0_Item) MergeRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

MergeRelativeRangeQueryFilter performs a merge with any union data inside the AggregationBase_Filters_0_Item, using the provided RelativeRangeQueryFilter

func (*AggregationBase_Filters_0_Item) UnmarshalJSON

func (t *AggregationBase_Filters_0_Item) UnmarshalJSON(b []byte) error

type AggregationFilterOperand

type AggregationFilterOperand struct {
	// contains filtered or unexported fields
}

AggregationFilterOperand defines model for AggregationFilterOperand.

func (AggregationFilterOperand) AsAggregationLogicalFilter

func (t AggregationFilterOperand) AsAggregationLogicalFilter() (AggregationLogicalFilter, error)

AsAggregationLogicalFilter returns the union data inside the AggregationFilterOperand as a AggregationLogicalFilter

func (AggregationFilterOperand) AsArrayMatchQueryFilter

func (t AggregationFilterOperand) AsArrayMatchQueryFilter() (ArrayMatchQueryFilter, error)

AsArrayMatchQueryFilter returns the union data inside the AggregationFilterOperand as a ArrayMatchQueryFilter

func (AggregationFilterOperand) AsExistsQueryFilter

func (t AggregationFilterOperand) AsExistsQueryFilter() (ExistsQueryFilter, error)

AsExistsQueryFilter returns the union data inside the AggregationFilterOperand as a ExistsQueryFilter

func (AggregationFilterOperand) AsQueryFilter

func (t AggregationFilterOperand) AsQueryFilter() (QueryFilter, error)

AsQueryFilter returns the union data inside the AggregationFilterOperand as a QueryFilter

func (AggregationFilterOperand) AsRangeQueryFilter

func (t AggregationFilterOperand) AsRangeQueryFilter() (RangeQueryFilter, error)

AsRangeQueryFilter returns the union data inside the AggregationFilterOperand as a RangeQueryFilter

func (AggregationFilterOperand) AsRelativeRangeQueryFilter

func (t AggregationFilterOperand) AsRelativeRangeQueryFilter() (RelativeRangeQueryFilter, error)

AsRelativeRangeQueryFilter returns the union data inside the AggregationFilterOperand as a RelativeRangeQueryFilter

func (*AggregationFilterOperand) FromAggregationLogicalFilter

func (t *AggregationFilterOperand) FromAggregationLogicalFilter(v AggregationLogicalFilter) error

FromAggregationLogicalFilter overwrites any union data inside the AggregationFilterOperand as the provided AggregationLogicalFilter

func (*AggregationFilterOperand) FromArrayMatchQueryFilter

func (t *AggregationFilterOperand) FromArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

FromArrayMatchQueryFilter overwrites any union data inside the AggregationFilterOperand as the provided ArrayMatchQueryFilter

func (*AggregationFilterOperand) FromExistsQueryFilter

func (t *AggregationFilterOperand) FromExistsQueryFilter(v ExistsQueryFilter) error

FromExistsQueryFilter overwrites any union data inside the AggregationFilterOperand as the provided ExistsQueryFilter

func (*AggregationFilterOperand) FromQueryFilter

func (t *AggregationFilterOperand) FromQueryFilter(v QueryFilter) error

FromQueryFilter overwrites any union data inside the AggregationFilterOperand as the provided QueryFilter

func (*AggregationFilterOperand) FromRangeQueryFilter

func (t *AggregationFilterOperand) FromRangeQueryFilter(v RangeQueryFilter) error

FromRangeQueryFilter overwrites any union data inside the AggregationFilterOperand as the provided RangeQueryFilter

func (*AggregationFilterOperand) FromRelativeRangeQueryFilter

func (t *AggregationFilterOperand) FromRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

FromRelativeRangeQueryFilter overwrites any union data inside the AggregationFilterOperand as the provided RelativeRangeQueryFilter

func (AggregationFilterOperand) MarshalJSON

func (t AggregationFilterOperand) MarshalJSON() ([]byte, error)

func (*AggregationFilterOperand) MergeAggregationLogicalFilter

func (t *AggregationFilterOperand) MergeAggregationLogicalFilter(v AggregationLogicalFilter) error

MergeAggregationLogicalFilter performs a merge with any union data inside the AggregationFilterOperand, using the provided AggregationLogicalFilter

func (*AggregationFilterOperand) MergeArrayMatchQueryFilter

func (t *AggregationFilterOperand) MergeArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

MergeArrayMatchQueryFilter performs a merge with any union data inside the AggregationFilterOperand, using the provided ArrayMatchQueryFilter

func (*AggregationFilterOperand) MergeExistsQueryFilter

func (t *AggregationFilterOperand) MergeExistsQueryFilter(v ExistsQueryFilter) error

MergeExistsQueryFilter performs a merge with any union data inside the AggregationFilterOperand, using the provided ExistsQueryFilter

func (*AggregationFilterOperand) MergeQueryFilter

func (t *AggregationFilterOperand) MergeQueryFilter(v QueryFilter) error

MergeQueryFilter performs a merge with any union data inside the AggregationFilterOperand, using the provided QueryFilter

func (*AggregationFilterOperand) MergeRangeQueryFilter

func (t *AggregationFilterOperand) MergeRangeQueryFilter(v RangeQueryFilter) error

MergeRangeQueryFilter performs a merge with any union data inside the AggregationFilterOperand, using the provided RangeQueryFilter

func (*AggregationFilterOperand) MergeRelativeRangeQueryFilter

func (t *AggregationFilterOperand) MergeRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

MergeRelativeRangeQueryFilter performs a merge with any union data inside the AggregationFilterOperand, using the provided RelativeRangeQueryFilter

func (*AggregationFilterOperand) UnmarshalJSON

func (t *AggregationFilterOperand) UnmarshalJSON(b []byte) error

type AggregationLogicalFilter

type AggregationLogicalFilter struct {
	And *[]AggregationFilterOperand         `json:"$and,omitempty"`
	Or  *[]AggregationLogicalFilter_Or_Item `json:"$or,omitempty"`
}

AggregationLogicalFilter An aggregation filter tree node. Set exactly one of `$and` or `$or`. Each child is a leaf filter or another node. Trees are limited to 10 levels and 200 nodes, and the `$or` filter operator is not allowed inside a tree.

Example: {"$and":[{"field":"type","op":"$eq","value":"$login"},{"$or":[{"field":"scores.account_takeover.score","op":"$range","value":{"gt":0.9}},{"field":"scores.bot.score","op":"$range","value":{"gt":0.9}}]}]}

type AggregationLogicalFilter_Or_Item

type AggregationLogicalFilter_Or_Item struct {
	// contains filtered or unexported fields
}

AggregationLogicalFilter_Or_Item defines model for AggregationLogicalFilter.$or.Item.

func (AggregationLogicalFilter_Or_Item) AsAggregationLogicalFilter

func (t AggregationLogicalFilter_Or_Item) AsAggregationLogicalFilter() (AggregationLogicalFilter, error)

AsAggregationLogicalFilter returns the union data inside the AggregationLogicalFilter_Or_Item as a AggregationLogicalFilter

func (AggregationLogicalFilter_Or_Item) AsArrayMatchQueryFilter

func (t AggregationLogicalFilter_Or_Item) AsArrayMatchQueryFilter() (ArrayMatchQueryFilter, error)

AsArrayMatchQueryFilter returns the union data inside the AggregationLogicalFilter_Or_Item as a ArrayMatchQueryFilter

func (AggregationLogicalFilter_Or_Item) AsExistsQueryFilter

func (t AggregationLogicalFilter_Or_Item) AsExistsQueryFilter() (ExistsQueryFilter, error)

AsExistsQueryFilter returns the union data inside the AggregationLogicalFilter_Or_Item as a ExistsQueryFilter

func (AggregationLogicalFilter_Or_Item) AsQueryFilter

func (t AggregationLogicalFilter_Or_Item) AsQueryFilter() (QueryFilter, error)

AsQueryFilter returns the union data inside the AggregationLogicalFilter_Or_Item as a QueryFilter

func (AggregationLogicalFilter_Or_Item) AsRangeQueryFilter

func (t AggregationLogicalFilter_Or_Item) AsRangeQueryFilter() (RangeQueryFilter, error)

AsRangeQueryFilter returns the union data inside the AggregationLogicalFilter_Or_Item as a RangeQueryFilter

func (AggregationLogicalFilter_Or_Item) AsRelativeRangeQueryFilter

func (t AggregationLogicalFilter_Or_Item) AsRelativeRangeQueryFilter() (RelativeRangeQueryFilter, error)

AsRelativeRangeQueryFilter returns the union data inside the AggregationLogicalFilter_Or_Item as a RelativeRangeQueryFilter

func (*AggregationLogicalFilter_Or_Item) FromAggregationLogicalFilter

func (t *AggregationLogicalFilter_Or_Item) FromAggregationLogicalFilter(v AggregationLogicalFilter) error

FromAggregationLogicalFilter overwrites any union data inside the AggregationLogicalFilter_Or_Item as the provided AggregationLogicalFilter

func (*AggregationLogicalFilter_Or_Item) FromArrayMatchQueryFilter

func (t *AggregationLogicalFilter_Or_Item) FromArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

FromArrayMatchQueryFilter overwrites any union data inside the AggregationLogicalFilter_Or_Item as the provided ArrayMatchQueryFilter

func (*AggregationLogicalFilter_Or_Item) FromExistsQueryFilter

func (t *AggregationLogicalFilter_Or_Item) FromExistsQueryFilter(v ExistsQueryFilter) error

FromExistsQueryFilter overwrites any union data inside the AggregationLogicalFilter_Or_Item as the provided ExistsQueryFilter

func (*AggregationLogicalFilter_Or_Item) FromQueryFilter

func (t *AggregationLogicalFilter_Or_Item) FromQueryFilter(v QueryFilter) error

FromQueryFilter overwrites any union data inside the AggregationLogicalFilter_Or_Item as the provided QueryFilter

func (*AggregationLogicalFilter_Or_Item) FromRangeQueryFilter

func (t *AggregationLogicalFilter_Or_Item) FromRangeQueryFilter(v RangeQueryFilter) error

FromRangeQueryFilter overwrites any union data inside the AggregationLogicalFilter_Or_Item as the provided RangeQueryFilter

func (*AggregationLogicalFilter_Or_Item) FromRelativeRangeQueryFilter

func (t *AggregationLogicalFilter_Or_Item) FromRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

FromRelativeRangeQueryFilter overwrites any union data inside the AggregationLogicalFilter_Or_Item as the provided RelativeRangeQueryFilter

func (AggregationLogicalFilter_Or_Item) MarshalJSON

func (t AggregationLogicalFilter_Or_Item) MarshalJSON() ([]byte, error)

func (*AggregationLogicalFilter_Or_Item) MergeAggregationLogicalFilter

func (t *AggregationLogicalFilter_Or_Item) MergeAggregationLogicalFilter(v AggregationLogicalFilter) error

MergeAggregationLogicalFilter performs a merge with any union data inside the AggregationLogicalFilter_Or_Item, using the provided AggregationLogicalFilter

func (*AggregationLogicalFilter_Or_Item) MergeArrayMatchQueryFilter

func (t *AggregationLogicalFilter_Or_Item) MergeArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

MergeArrayMatchQueryFilter performs a merge with any union data inside the AggregationLogicalFilter_Or_Item, using the provided ArrayMatchQueryFilter

func (*AggregationLogicalFilter_Or_Item) MergeExistsQueryFilter

func (t *AggregationLogicalFilter_Or_Item) MergeExistsQueryFilter(v ExistsQueryFilter) error

MergeExistsQueryFilter performs a merge with any union data inside the AggregationLogicalFilter_Or_Item, using the provided ExistsQueryFilter

func (*AggregationLogicalFilter_Or_Item) MergeQueryFilter

func (t *AggregationLogicalFilter_Or_Item) MergeQueryFilter(v QueryFilter) error

MergeQueryFilter performs a merge with any union data inside the AggregationLogicalFilter_Or_Item, using the provided QueryFilter

func (*AggregationLogicalFilter_Or_Item) MergeRangeQueryFilter

func (t *AggregationLogicalFilter_Or_Item) MergeRangeQueryFilter(v RangeQueryFilter) error

MergeRangeQueryFilter performs a merge with any union data inside the AggregationLogicalFilter_Or_Item, using the provided RangeQueryFilter

func (*AggregationLogicalFilter_Or_Item) MergeRelativeRangeQueryFilter

func (t *AggregationLogicalFilter_Or_Item) MergeRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

MergeRelativeRangeQueryFilter performs a merge with any union data inside the AggregationLogicalFilter_Or_Item, using the provided RelativeRangeQueryFilter

func (*AggregationLogicalFilter_Or_Item) UnmarshalJSON

func (t *AggregationLogicalFilter_Or_Item) UnmarshalJSON(b []byte) error

type AggregationRequest

type AggregationRequest struct {
	// contains filtered or unexported fields
}

AggregationRequest defines model for AggregationRequest.

func (AggregationRequest) AsAggregationRequestWithValue

func (t AggregationRequest) AsAggregationRequestWithValue() (AggregationRequestWithValue, error)

AsAggregationRequestWithValue returns the union data inside the AggregationRequest as a AggregationRequestWithValue

func (AggregationRequest) AsAggregationRequestWithoutValue

func (t AggregationRequest) AsAggregationRequestWithoutValue() (AggregationRequestWithoutValue, error)

AsAggregationRequestWithoutValue returns the union data inside the AggregationRequest as a AggregationRequestWithoutValue

func (AggregationRequest) Discriminator

func (t AggregationRequest) Discriminator() (string, error)

func (*AggregationRequest) FromAggregationRequestWithValue

func (t *AggregationRequest) FromAggregationRequestWithValue(v AggregationRequestWithValue) error

FromAggregationRequestWithValue overwrites any union data inside the AggregationRequest as the provided AggregationRequestWithValue

func (*AggregationRequest) FromAggregationRequestWithoutValue

func (t *AggregationRequest) FromAggregationRequestWithoutValue(v AggregationRequestWithoutValue) error

FromAggregationRequestWithoutValue overwrites any union data inside the AggregationRequest as the provided AggregationRequestWithoutValue

func (AggregationRequest) MarshalJSON

func (t AggregationRequest) MarshalJSON() ([]byte, error)

func (*AggregationRequest) MergeAggregationRequestWithValue

func (t *AggregationRequest) MergeAggregationRequestWithValue(v AggregationRequestWithValue) error

MergeAggregationRequestWithValue performs a merge with any union data inside the AggregationRequest, using the provided AggregationRequestWithValue

func (*AggregationRequest) MergeAggregationRequestWithoutValue

func (t *AggregationRequest) MergeAggregationRequestWithoutValue(v AggregationRequestWithoutValue) error

MergeAggregationRequestWithoutValue performs a merge with any union data inside the AggregationRequest, using the provided AggregationRequestWithoutValue

func (*AggregationRequest) UnmarshalJSON

func (t *AggregationRequest) UnmarshalJSON(b []byte) error

func (AggregationRequest) ValueByDiscriminator

func (t AggregationRequest) ValueByDiscriminator() (interface{}, error)

type AggregationRequestWithValue

type AggregationRequestWithValue struct {
	AggregationType AggregationRequestWithValueAggregationType `json:"aggregation_type"`

	// Description Description of the aggregation
	//
	// Example: Maximum Account TakeOver score seen per IP in the last day.
	Description nullable.Nullable[string] `json:"description,omitempty"`

	// Filters Event filters to define when aggregation should be triggered. Accepts a list of filters or a filter tree.
	Filters *AggregationRequestWithValue_Filters `json:"filters,omitempty"`
	GroupBy nullable.Nullable[struct {
		// Fields The fields names to group by
		Fields *[]struct {
			// Field Example: ip.address
			Field string `json:"field"`
		} `json:"fields,omitempty"`
	}] `json:"group_by,omitempty"`

	// Interval Time interval in seconds over which aggregation should be observed. Maximum is 180 days.
	//
	// Example: 86400
	Interval int `json:"interval"`

	// Metadata Metadata is useful for providing additional, structured information on an object.
	Metadata *Metadata `json:"metadata,omitempty"`

	// Name Human-readable name of the aggregation
	//
	// Example: Critical Events per IP in 1h
	Name string `json:"name"`

	// Value Field name where to get the value from for the aggregation
	Value struct {
		// Field Field name
		//
		// Example: scores.account_takeover.score
		Field string `json:"field"`
	} `json:"value"`
}

AggregationRequestWithValue defines model for AggregationRequestWithValue.

type AggregationRequestWithValueAggregationType

type AggregationRequestWithValueAggregationType string

AggregationRequestWithValueAggregationType defines model for AggregationRequestWithValue.AggregationType.

const (
	AggregationRequestWithValueAggregationTypeAvg       AggregationRequestWithValueAggregationType = "$avg"
	AggregationRequestWithValueAggregationTypeCountUniq AggregationRequestWithValueAggregationType = "$count_uniq"
	AggregationRequestWithValueAggregationTypeFirst     AggregationRequestWithValueAggregationType = "$first"
	AggregationRequestWithValueAggregationTypeLast      AggregationRequestWithValueAggregationType = "$last"
	AggregationRequestWithValueAggregationTypeMax       AggregationRequestWithValueAggregationType = "$max"
	AggregationRequestWithValueAggregationTypeMin       AggregationRequestWithValueAggregationType = "$min"
	AggregationRequestWithValueAggregationTypeSum       AggregationRequestWithValueAggregationType = "$sum"
)

Defines values for AggregationRequestWithValueAggregationType.

func (AggregationRequestWithValueAggregationType) Valid

Valid indicates whether the value is a known member of the AggregationRequestWithValueAggregationType enum.

type AggregationRequestWithValueFilters0

type AggregationRequestWithValueFilters0 = []AggregationRequestWithValue_Filters_0_Item

AggregationRequestWithValueFilters0 defines model for AggregationRequestWithValue.Filters.0.

type AggregationRequestWithValue_Filters

type AggregationRequestWithValue_Filters struct {
	// contains filtered or unexported fields
}

AggregationRequestWithValue_Filters Event filters to define when aggregation should be triggered. Accepts a list of filters or a filter tree.

func (AggregationRequestWithValue_Filters) AsAggregationLogicalFilter

func (t AggregationRequestWithValue_Filters) AsAggregationLogicalFilter() (AggregationLogicalFilter, error)

AsAggregationLogicalFilter returns the union data inside the AggregationRequestWithValue_Filters as a AggregationLogicalFilter

func (AggregationRequestWithValue_Filters) AsAggregationRequestWithValueFilters0

func (t AggregationRequestWithValue_Filters) AsAggregationRequestWithValueFilters0() (AggregationRequestWithValueFilters0, error)

AsAggregationRequestWithValueFilters0 returns the union data inside the AggregationRequestWithValue_Filters as a AggregationRequestWithValueFilters0

func (*AggregationRequestWithValue_Filters) FromAggregationLogicalFilter

func (t *AggregationRequestWithValue_Filters) FromAggregationLogicalFilter(v AggregationLogicalFilter) error

FromAggregationLogicalFilter overwrites any union data inside the AggregationRequestWithValue_Filters as the provided AggregationLogicalFilter

func (*AggregationRequestWithValue_Filters) FromAggregationRequestWithValueFilters0

func (t *AggregationRequestWithValue_Filters) FromAggregationRequestWithValueFilters0(v AggregationRequestWithValueFilters0) error

FromAggregationRequestWithValueFilters0 overwrites any union data inside the AggregationRequestWithValue_Filters as the provided AggregationRequestWithValueFilters0

func (AggregationRequestWithValue_Filters) MarshalJSON

func (t AggregationRequestWithValue_Filters) MarshalJSON() ([]byte, error)

func (*AggregationRequestWithValue_Filters) MergeAggregationLogicalFilter

func (t *AggregationRequestWithValue_Filters) MergeAggregationLogicalFilter(v AggregationLogicalFilter) error

MergeAggregationLogicalFilter performs a merge with any union data inside the AggregationRequestWithValue_Filters, using the provided AggregationLogicalFilter

func (*AggregationRequestWithValue_Filters) MergeAggregationRequestWithValueFilters0

func (t *AggregationRequestWithValue_Filters) MergeAggregationRequestWithValueFilters0(v AggregationRequestWithValueFilters0) error

MergeAggregationRequestWithValueFilters0 performs a merge with any union data inside the AggregationRequestWithValue_Filters, using the provided AggregationRequestWithValueFilters0

func (*AggregationRequestWithValue_Filters) UnmarshalJSON

func (t *AggregationRequestWithValue_Filters) UnmarshalJSON(b []byte) error

type AggregationRequestWithValue_Filters_0_Item

type AggregationRequestWithValue_Filters_0_Item struct {
	// contains filtered or unexported fields
}

AggregationRequestWithValue_Filters_0_Item defines model for AggregationRequestWithValue.Filters.0.Item.

func (AggregationRequestWithValue_Filters_0_Item) AsArrayMatchQueryFilter

AsArrayMatchQueryFilter returns the union data inside the AggregationRequestWithValue_Filters_0_Item as a ArrayMatchQueryFilter

func (AggregationRequestWithValue_Filters_0_Item) AsExistsQueryFilter

AsExistsQueryFilter returns the union data inside the AggregationRequestWithValue_Filters_0_Item as a ExistsQueryFilter

func (AggregationRequestWithValue_Filters_0_Item) AsOrQueryFilter

AsOrQueryFilter returns the union data inside the AggregationRequestWithValue_Filters_0_Item as a OrQueryFilter

func (AggregationRequestWithValue_Filters_0_Item) AsQueryFilter

AsQueryFilter returns the union data inside the AggregationRequestWithValue_Filters_0_Item as a QueryFilter

func (AggregationRequestWithValue_Filters_0_Item) AsRangeQueryFilter

AsRangeQueryFilter returns the union data inside the AggregationRequestWithValue_Filters_0_Item as a RangeQueryFilter

func (AggregationRequestWithValue_Filters_0_Item) AsRelativeRangeQueryFilter

AsRelativeRangeQueryFilter returns the union data inside the AggregationRequestWithValue_Filters_0_Item as a RelativeRangeQueryFilter

func (*AggregationRequestWithValue_Filters_0_Item) FromArrayMatchQueryFilter

FromArrayMatchQueryFilter overwrites any union data inside the AggregationRequestWithValue_Filters_0_Item as the provided ArrayMatchQueryFilter

func (*AggregationRequestWithValue_Filters_0_Item) FromExistsQueryFilter

FromExistsQueryFilter overwrites any union data inside the AggregationRequestWithValue_Filters_0_Item as the provided ExistsQueryFilter

func (*AggregationRequestWithValue_Filters_0_Item) FromOrQueryFilter

FromOrQueryFilter overwrites any union data inside the AggregationRequestWithValue_Filters_0_Item as the provided OrQueryFilter

func (*AggregationRequestWithValue_Filters_0_Item) FromQueryFilter

FromQueryFilter overwrites any union data inside the AggregationRequestWithValue_Filters_0_Item as the provided QueryFilter

func (*AggregationRequestWithValue_Filters_0_Item) FromRangeQueryFilter

FromRangeQueryFilter overwrites any union data inside the AggregationRequestWithValue_Filters_0_Item as the provided RangeQueryFilter

func (*AggregationRequestWithValue_Filters_0_Item) FromRelativeRangeQueryFilter

FromRelativeRangeQueryFilter overwrites any union data inside the AggregationRequestWithValue_Filters_0_Item as the provided RelativeRangeQueryFilter

func (AggregationRequestWithValue_Filters_0_Item) MarshalJSON

func (*AggregationRequestWithValue_Filters_0_Item) MergeArrayMatchQueryFilter

MergeArrayMatchQueryFilter performs a merge with any union data inside the AggregationRequestWithValue_Filters_0_Item, using the provided ArrayMatchQueryFilter

func (*AggregationRequestWithValue_Filters_0_Item) MergeExistsQueryFilter

MergeExistsQueryFilter performs a merge with any union data inside the AggregationRequestWithValue_Filters_0_Item, using the provided ExistsQueryFilter

func (*AggregationRequestWithValue_Filters_0_Item) MergeOrQueryFilter

MergeOrQueryFilter performs a merge with any union data inside the AggregationRequestWithValue_Filters_0_Item, using the provided OrQueryFilter

func (*AggregationRequestWithValue_Filters_0_Item) MergeQueryFilter

MergeQueryFilter performs a merge with any union data inside the AggregationRequestWithValue_Filters_0_Item, using the provided QueryFilter

func (*AggregationRequestWithValue_Filters_0_Item) MergeRangeQueryFilter

MergeRangeQueryFilter performs a merge with any union data inside the AggregationRequestWithValue_Filters_0_Item, using the provided RangeQueryFilter

func (*AggregationRequestWithValue_Filters_0_Item) MergeRelativeRangeQueryFilter

MergeRelativeRangeQueryFilter performs a merge with any union data inside the AggregationRequestWithValue_Filters_0_Item, using the provided RelativeRangeQueryFilter

func (*AggregationRequestWithValue_Filters_0_Item) UnmarshalJSON

type AggregationRequestWithoutValue

type AggregationRequestWithoutValue struct {
	AggregationType AggregationRequestWithoutValueAggregationType `json:"aggregation_type"`

	// Description Description of the aggregation
	//
	// Example: Maximum Account TakeOver score seen per IP in the last day.
	Description nullable.Nullable[string] `json:"description,omitempty"`

	// Filters Event filters to define when aggregation should be triggered. Accepts a list of filters or a filter tree.
	Filters *AggregationRequestWithoutValue_Filters `json:"filters,omitempty"`
	GroupBy nullable.Nullable[struct {
		// Fields The fields names to group by
		Fields *[]struct {
			// Field Example: ip.address
			Field string `json:"field"`
		} `json:"fields,omitempty"`
	}] `json:"group_by,omitempty"`

	// Interval Time interval in seconds over which aggregation should be observed. Maximum is 180 days.
	//
	// Example: 86400
	Interval int `json:"interval"`

	// Metadata Metadata is useful for providing additional, structured information on an object.
	Metadata *Metadata `json:"metadata,omitempty"`

	// Name Human-readable name of the aggregation
	//
	// Example: Critical Events per IP in 1h
	Name string `json:"name"`

	// Value Field name where to get the value from for the aggregation
	Value *struct {
		// Field Field name
		//
		// Example: scores.account_takeover.score
		Field string `json:"field"`
	} `json:"value,omitempty"`
}

AggregationRequestWithoutValue defines model for AggregationRequestWithoutValue.

type AggregationRequestWithoutValueAggregationType

type AggregationRequestWithoutValueAggregationType string

AggregationRequestWithoutValueAggregationType defines model for AggregationRequestWithoutValue.AggregationType.

const (
	AggregationRequestWithoutValueAggregationTypeCount AggregationRequestWithoutValueAggregationType = "$count"
)

Defines values for AggregationRequestWithoutValueAggregationType.

func (AggregationRequestWithoutValueAggregationType) Valid

Valid indicates whether the value is a known member of the AggregationRequestWithoutValueAggregationType enum.

type AggregationRequestWithoutValueFilters0

type AggregationRequestWithoutValueFilters0 = []AggregationRequestWithoutValue_Filters_0_Item

AggregationRequestWithoutValueFilters0 defines model for AggregationRequestWithoutValue.Filters.0.

type AggregationRequestWithoutValue_Filters

type AggregationRequestWithoutValue_Filters struct {
	// contains filtered or unexported fields
}

AggregationRequestWithoutValue_Filters Event filters to define when aggregation should be triggered. Accepts a list of filters or a filter tree.

func (AggregationRequestWithoutValue_Filters) AsAggregationLogicalFilter

func (t AggregationRequestWithoutValue_Filters) AsAggregationLogicalFilter() (AggregationLogicalFilter, error)

AsAggregationLogicalFilter returns the union data inside the AggregationRequestWithoutValue_Filters as a AggregationLogicalFilter

func (AggregationRequestWithoutValue_Filters) AsAggregationRequestWithoutValueFilters0

func (t AggregationRequestWithoutValue_Filters) AsAggregationRequestWithoutValueFilters0() (AggregationRequestWithoutValueFilters0, error)

AsAggregationRequestWithoutValueFilters0 returns the union data inside the AggregationRequestWithoutValue_Filters as a AggregationRequestWithoutValueFilters0

func (*AggregationRequestWithoutValue_Filters) FromAggregationLogicalFilter

func (t *AggregationRequestWithoutValue_Filters) FromAggregationLogicalFilter(v AggregationLogicalFilter) error

FromAggregationLogicalFilter overwrites any union data inside the AggregationRequestWithoutValue_Filters as the provided AggregationLogicalFilter

func (*AggregationRequestWithoutValue_Filters) FromAggregationRequestWithoutValueFilters0

func (t *AggregationRequestWithoutValue_Filters) FromAggregationRequestWithoutValueFilters0(v AggregationRequestWithoutValueFilters0) error

FromAggregationRequestWithoutValueFilters0 overwrites any union data inside the AggregationRequestWithoutValue_Filters as the provided AggregationRequestWithoutValueFilters0

func (AggregationRequestWithoutValue_Filters) MarshalJSON

func (t AggregationRequestWithoutValue_Filters) MarshalJSON() ([]byte, error)

func (*AggregationRequestWithoutValue_Filters) MergeAggregationLogicalFilter

func (t *AggregationRequestWithoutValue_Filters) MergeAggregationLogicalFilter(v AggregationLogicalFilter) error

MergeAggregationLogicalFilter performs a merge with any union data inside the AggregationRequestWithoutValue_Filters, using the provided AggregationLogicalFilter

func (*AggregationRequestWithoutValue_Filters) MergeAggregationRequestWithoutValueFilters0

func (t *AggregationRequestWithoutValue_Filters) MergeAggregationRequestWithoutValueFilters0(v AggregationRequestWithoutValueFilters0) error

MergeAggregationRequestWithoutValueFilters0 performs a merge with any union data inside the AggregationRequestWithoutValue_Filters, using the provided AggregationRequestWithoutValueFilters0

func (*AggregationRequestWithoutValue_Filters) UnmarshalJSON

func (t *AggregationRequestWithoutValue_Filters) UnmarshalJSON(b []byte) error

type AggregationRequestWithoutValue_Filters_0_Item

type AggregationRequestWithoutValue_Filters_0_Item struct {
	// contains filtered or unexported fields
}

AggregationRequestWithoutValue_Filters_0_Item defines model for AggregationRequestWithoutValue.Filters.0.Item.

func (AggregationRequestWithoutValue_Filters_0_Item) AsArrayMatchQueryFilter

AsArrayMatchQueryFilter returns the union data inside the AggregationRequestWithoutValue_Filters_0_Item as a ArrayMatchQueryFilter

func (AggregationRequestWithoutValue_Filters_0_Item) AsExistsQueryFilter

AsExistsQueryFilter returns the union data inside the AggregationRequestWithoutValue_Filters_0_Item as a ExistsQueryFilter

func (AggregationRequestWithoutValue_Filters_0_Item) AsOrQueryFilter

AsOrQueryFilter returns the union data inside the AggregationRequestWithoutValue_Filters_0_Item as a OrQueryFilter

func (AggregationRequestWithoutValue_Filters_0_Item) AsQueryFilter

AsQueryFilter returns the union data inside the AggregationRequestWithoutValue_Filters_0_Item as a QueryFilter

func (AggregationRequestWithoutValue_Filters_0_Item) AsRangeQueryFilter

AsRangeQueryFilter returns the union data inside the AggregationRequestWithoutValue_Filters_0_Item as a RangeQueryFilter

func (AggregationRequestWithoutValue_Filters_0_Item) AsRelativeRangeQueryFilter

AsRelativeRangeQueryFilter returns the union data inside the AggregationRequestWithoutValue_Filters_0_Item as a RelativeRangeQueryFilter

func (*AggregationRequestWithoutValue_Filters_0_Item) FromArrayMatchQueryFilter

FromArrayMatchQueryFilter overwrites any union data inside the AggregationRequestWithoutValue_Filters_0_Item as the provided ArrayMatchQueryFilter

func (*AggregationRequestWithoutValue_Filters_0_Item) FromExistsQueryFilter

FromExistsQueryFilter overwrites any union data inside the AggregationRequestWithoutValue_Filters_0_Item as the provided ExistsQueryFilter

func (*AggregationRequestWithoutValue_Filters_0_Item) FromOrQueryFilter

FromOrQueryFilter overwrites any union data inside the AggregationRequestWithoutValue_Filters_0_Item as the provided OrQueryFilter

func (*AggregationRequestWithoutValue_Filters_0_Item) FromQueryFilter

FromQueryFilter overwrites any union data inside the AggregationRequestWithoutValue_Filters_0_Item as the provided QueryFilter

func (*AggregationRequestWithoutValue_Filters_0_Item) FromRangeQueryFilter

FromRangeQueryFilter overwrites any union data inside the AggregationRequestWithoutValue_Filters_0_Item as the provided RangeQueryFilter

func (*AggregationRequestWithoutValue_Filters_0_Item) FromRelativeRangeQueryFilter

FromRelativeRangeQueryFilter overwrites any union data inside the AggregationRequestWithoutValue_Filters_0_Item as the provided RelativeRangeQueryFilter

func (AggregationRequestWithoutValue_Filters_0_Item) MarshalJSON

func (*AggregationRequestWithoutValue_Filters_0_Item) MergeArrayMatchQueryFilter

MergeArrayMatchQueryFilter performs a merge with any union data inside the AggregationRequestWithoutValue_Filters_0_Item, using the provided ArrayMatchQueryFilter

func (*AggregationRequestWithoutValue_Filters_0_Item) MergeExistsQueryFilter

MergeExistsQueryFilter performs a merge with any union data inside the AggregationRequestWithoutValue_Filters_0_Item, using the provided ExistsQueryFilter

func (*AggregationRequestWithoutValue_Filters_0_Item) MergeOrQueryFilter

MergeOrQueryFilter performs a merge with any union data inside the AggregationRequestWithoutValue_Filters_0_Item, using the provided OrQueryFilter

func (*AggregationRequestWithoutValue_Filters_0_Item) MergeQueryFilter

MergeQueryFilter performs a merge with any union data inside the AggregationRequestWithoutValue_Filters_0_Item, using the provided QueryFilter

func (*AggregationRequestWithoutValue_Filters_0_Item) MergeRangeQueryFilter

MergeRangeQueryFilter performs a merge with any union data inside the AggregationRequestWithoutValue_Filters_0_Item, using the provided RangeQueryFilter

func (*AggregationRequestWithoutValue_Filters_0_Item) MergeRelativeRangeQueryFilter

MergeRelativeRangeQueryFilter performs a merge with any union data inside the AggregationRequestWithoutValue_Filters_0_Item, using the provided RelativeRangeQueryFilter

func (*AggregationRequestWithoutValue_Filters_0_Item) UnmarshalJSON

type ArchiveListItemResponse

type ArchiveListItemResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseArchiveListItemResponse

func ParseArchiveListItemResponse(rsp *http.Response) (*ArchiveListItemResponse, error)

ParseArchiveListItemResponse parses an HTTP response from a ArchiveListItemWithResponse call

func (ArchiveListItemResponse) ContentType

func (r ArchiveListItemResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ArchiveListItemResponse) GetBody

func (r ArchiveListItemResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ArchiveListItemResponse) Status

func (r ArchiveListItemResponse) Status() string

Status returns HTTPResponse.Status

func (ArchiveListItemResponse) StatusCode

func (r ArchiveListItemResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ArrayMatchQueryFilter

type ArrayMatchQueryFilter struct {
	// Field Name of the array field to match against.
	//
	// Example: ip.tunnels
	Field string `json:"field"`

	// Op Example: $array_match_any
	Op ArrayMatchQueryFilterOp `json:"op"`

	// Value Sub-clauses evaluated against each array element.
	//
	// Example: [{"field":"operator","op":"$eq","value":"NordVPN"},{"field":"last_seen_at","op":"$range","value":{"gt":"2026-03-15 00:00:00"}}]
	Value []ArrayMatchQueryFilter_Value_Item `json:"value"`
}

ArrayMatchQueryFilter Matches against elements of an array field whose items are tuples with named subfields (e.g. `ip.tunnels` with subfields like `operator`, `last_seen_at`).

- `$array_match_any` — at least one element satisfies all sub-clauses. - `$array_match_all` — every element satisfies all sub-clauses. - `$narray_match_any` — no element satisfies all sub-clauses (negation of `$array_match_any`). - `$narray_match_all` — at least one element fails to satisfy all sub-clauses (negation of `$array_match_all`).

Each sub-clause targets a tuple subfield and is validated as if it were a top-level filter against that subfield — the subfield's declared `operations` whitelist, value type, and enum membership all apply.

type ArrayMatchQueryFilterOp

type ArrayMatchQueryFilterOp string

ArrayMatchQueryFilterOp Example: $array_match_any

const (
	ArrayMatchQueryFilterOpArrayMatchAll  ArrayMatchQueryFilterOp = "$array_match_all"
	ArrayMatchQueryFilterOpArrayMatchAny  ArrayMatchQueryFilterOp = "$array_match_any"
	ArrayMatchQueryFilterOpNarrayMatchAll ArrayMatchQueryFilterOp = "$narray_match_all"
	ArrayMatchQueryFilterOpNarrayMatchAny ArrayMatchQueryFilterOp = "$narray_match_any"
)

Defines values for ArrayMatchQueryFilterOp.

func (ArrayMatchQueryFilterOp) Valid

func (e ArrayMatchQueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the ArrayMatchQueryFilterOp enum.

type ArrayMatchQueryFilter_Value_Item

type ArrayMatchQueryFilter_Value_Item struct {
	// contains filtered or unexported fields
}

ArrayMatchQueryFilter_Value_Item defines model for ArrayMatchQueryFilter.value.Item.

func (ArrayMatchQueryFilter_Value_Item) AsExistsQueryFilter

func (t ArrayMatchQueryFilter_Value_Item) AsExistsQueryFilter() (ExistsQueryFilter, error)

AsExistsQueryFilter returns the union data inside the ArrayMatchQueryFilter_Value_Item as a ExistsQueryFilter

func (ArrayMatchQueryFilter_Value_Item) AsQueryFilter

func (t ArrayMatchQueryFilter_Value_Item) AsQueryFilter() (QueryFilter, error)

AsQueryFilter returns the union data inside the ArrayMatchQueryFilter_Value_Item as a QueryFilter

func (ArrayMatchQueryFilter_Value_Item) AsRangeQueryFilter

func (t ArrayMatchQueryFilter_Value_Item) AsRangeQueryFilter() (RangeQueryFilter, error)

AsRangeQueryFilter returns the union data inside the ArrayMatchQueryFilter_Value_Item as a RangeQueryFilter

func (ArrayMatchQueryFilter_Value_Item) AsRelativeRangeQueryFilter

func (t ArrayMatchQueryFilter_Value_Item) AsRelativeRangeQueryFilter() (RelativeRangeQueryFilter, error)

AsRelativeRangeQueryFilter returns the union data inside the ArrayMatchQueryFilter_Value_Item as a RelativeRangeQueryFilter

func (*ArrayMatchQueryFilter_Value_Item) FromExistsQueryFilter

func (t *ArrayMatchQueryFilter_Value_Item) FromExistsQueryFilter(v ExistsQueryFilter) error

FromExistsQueryFilter overwrites any union data inside the ArrayMatchQueryFilter_Value_Item as the provided ExistsQueryFilter

func (*ArrayMatchQueryFilter_Value_Item) FromQueryFilter

func (t *ArrayMatchQueryFilter_Value_Item) FromQueryFilter(v QueryFilter) error

FromQueryFilter overwrites any union data inside the ArrayMatchQueryFilter_Value_Item as the provided QueryFilter

func (*ArrayMatchQueryFilter_Value_Item) FromRangeQueryFilter

func (t *ArrayMatchQueryFilter_Value_Item) FromRangeQueryFilter(v RangeQueryFilter) error

FromRangeQueryFilter overwrites any union data inside the ArrayMatchQueryFilter_Value_Item as the provided RangeQueryFilter

func (*ArrayMatchQueryFilter_Value_Item) FromRelativeRangeQueryFilter

func (t *ArrayMatchQueryFilter_Value_Item) FromRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

FromRelativeRangeQueryFilter overwrites any union data inside the ArrayMatchQueryFilter_Value_Item as the provided RelativeRangeQueryFilter

func (ArrayMatchQueryFilter_Value_Item) MarshalJSON

func (t ArrayMatchQueryFilter_Value_Item) MarshalJSON() ([]byte, error)

func (*ArrayMatchQueryFilter_Value_Item) MergeExistsQueryFilter

func (t *ArrayMatchQueryFilter_Value_Item) MergeExistsQueryFilter(v ExistsQueryFilter) error

MergeExistsQueryFilter performs a merge with any union data inside the ArrayMatchQueryFilter_Value_Item, using the provided ExistsQueryFilter

func (*ArrayMatchQueryFilter_Value_Item) MergeQueryFilter

func (t *ArrayMatchQueryFilter_Value_Item) MergeQueryFilter(v QueryFilter) error

MergeQueryFilter performs a merge with any union data inside the ArrayMatchQueryFilter_Value_Item, using the provided QueryFilter

func (*ArrayMatchQueryFilter_Value_Item) MergeRangeQueryFilter

func (t *ArrayMatchQueryFilter_Value_Item) MergeRangeQueryFilter(v RangeQueryFilter) error

MergeRangeQueryFilter performs a merge with any union data inside the ArrayMatchQueryFilter_Value_Item, using the provided RangeQueryFilter

func (*ArrayMatchQueryFilter_Value_Item) MergeRelativeRangeQueryFilter

func (t *ArrayMatchQueryFilter_Value_Item) MergeRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

MergeRelativeRangeQueryFilter performs a merge with any union data inside the ArrayMatchQueryFilter_Value_Item, using the provided RelativeRangeQueryFilter

func (*ArrayMatchQueryFilter_Value_Item) UnmarshalJSON

func (t *ArrayMatchQueryFilter_Value_Item) UnmarshalJSON(b []byte) error

type AssessmentResponse

type AssessmentResponse struct {
	// Agent AI agent identified for this event/context. Omitted when no agent is identified
	Agent *Agent `json:"agent,omitempty"`

	// Authenticated Authenticated or Anonymous visitor
	//
	// Example: true
	Authenticated *bool `json:"authenticated,omitempty"`

	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`
	Behavior             *struct {
		// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
		Fingerprint nullable.Nullable[string] `json:"fingerprint,omitempty"`
	} `json:"behavior,omitempty"`

	// CreatedAt Event timestamp
	//
	// Example: 2021-09-27T16:46:38.313Z
	CreatedAt *time.Time `json:"created_at,omitempty"`
	Device    struct {
		// Fingerprint Example: ohvjn8adSnetYTzZ8B7bOP
		Fingerprint nullable.Nullable[string] `json:"fingerprint"`
		Hardware    *struct {
			Brand   nullable.Nullable[string] `json:"brand"`
			Display struct {
				// Height Example: 982
				Height nullable.Nullable[int] `json:"height"`

				// Width Example: 1512
				Width nullable.Nullable[int] `json:"width"`
			} `json:"display"`
			Model struct {
				Code nullable.Nullable[string] `json:"code"`
				Name nullable.Nullable[string] `json:"name"`
			} `json:"model"`
			Name nullable.Nullable[string] `json:"name"`

			// Type Example: computer
			Type string `json:"type"`
		} `json:"hardware,omitempty"`
		Os *struct {
			// Name Example: Windows 10
			Name    string `json:"name"`
			Version struct {
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 10
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"os,omitempty"`
		Screen *struct {
			// Orientation Example: landscape
			Orientation nullable.Nullable[string] `json:"orientation,omitempty"`

			// Screen Example: 2
			Screen nullable.Nullable[int] `json:"screen,omitempty"`
		} `json:"screen,omitempty"`
		Software *struct {
			// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
			Fingerprint nullable.Nullable[string] `json:"fingerprint"`

			// Languages Example: ["en-us","en"]
			Languages []string `json:"languages"`

			// Name Example: Chrome
			Name string `json:"name"`

			// Type Example: browser
			Type    string `json:"type"`
			Version struct {
				// Full Example: 91.0.4472
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 91
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"software,omitempty"`
		Timezone *struct {
			// Name Example: America/New_York
			Name nullable.Nullable[string] `json:"name,omitempty"`

			// Offset Time offset from UTC measured in minutes
			//
			// Example: -300
			Offset nullable.Nullable[int] `json:"offset,omitempty"`
		} `json:"timezone,omitempty"`

		// Token Device token generated or found
		//
		// Example: eyJhbGciOiJIUzI1NiJ9.eyJ0b2tlbiI6IjEzc2x6RzNHQ0RzeFJCejdJWF9SUDJkV1Y0RFgiLCJxdWFsaWZpZXIiOiJBUUlEQ2pFME5EZzFPREF3T1RZIiwiYW5vbnltb3VzIjpmYWxzZSwidmVyc2lvbiI6MC4zfQ.y3vOt-W1IpOi7Oyn1jll1uDw1YL-JPZtNMTU-PyaYhQ
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Token *string `json:"token,omitempty"`

		// UserAgent Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
		UserAgent *string `json:"user_agent,omitempty"`
	} `json:"device"`

	// Email User Email Object
	Email *struct {
		// Disposable Example: false
		Disposable *bool `json:"disposable,omitempty"`

		// Domain Example: gmail.com
		Domain        *string `json:"domain,omitempty"`
		DomainDetails *struct {
			// CreatedAt Example: 2021-09-27T16:46:38.313Z
			CreatedAt   *time.Time `json:"created_at,omitempty"`
			DmarcRecord *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"dmarc_record,omitempty"`

			// ExpiresAt Example: 2021-09-27T16:46:38.313Z
			ExpiresAt *time.Time `json:"expires_at,omitempty"`
			MxRecords *struct {
				// NullMx Example: false
				NullMx nullable.Nullable[bool] `json:"null_mx,omitempty"`
			} `json:"mx_records,omitempty"`

			// Nameservers Example: ["ns1.hosting.com","ns2.hosting.com","ns3.hosting.com"]
			Nameservers *[]string `json:"nameservers,omitempty"`
			Registrar   *string   `json:"registrar,omitempty"`
			SpfRecord   *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"spf_record,omitempty"`

			// UpdatedAt Example: 2021-09-27T16:46:38.313Z
			UpdatedAt *time.Time `json:"updated_at,omitempty"`
		} `json:"domain_details,omitempty"`

		// Normalized Example: user.email@example.com
		Normalized *string `json:"normalized,omitempty"`

		// Unreachable Example: false
		Unreachable *bool `json:"unreachable,omitempty"`
	} `json:"email,omitempty"`

	// Endpoint Castle Request Endpoint
	//
	// Example: /v1/risk
	Endpoint *string `json:"endpoint,omitempty"`

	// Id Castle Event ID
	//
	// Example: ASZoelALT5-PaVw2pAVMXg
	Id *string `json:"id,omitempty"`
	Ip *IP     `json:"ip,omitempty"`

	// Metrics Metrics triggered for this event/context
	//
	// Example: {"1":{},"2":{},"3":{},"4":{},"5":{}}
	Metrics *map[string]map[string]interface{} `json:"metrics,omitempty"`

	// Name Event Full Name
	//
	// Example: Login Succeeded
	Name *string `json:"name,omitempty"`

	// Params The params object
	Params *EventParams `json:"params,omitempty"`

	// Policy The matching policy
	Policy  Policy   `json:"policy"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties
	Properties *Properties `json:"properties,omitempty"`

	// Risk Deprecated Risk Score - use `scores` instead. Calculated only when `request_token` and `context` are provided.
	//
	// Example: 0.65
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Risk *float32 `json:"risk,omitempty"`

	// Scores Castle Scores breakdown. Calculated only when `request_token` and `context` are provided.
	Scores *struct {
		AccountAbuse struct {
			// Score Calculated Account Abuse Risk Score.
			//
			// Example: 0.65
			Score *float32 `json:"score,omitempty"`
		} `json:"account_abuse"`
		AccountTakeover struct {
			// Score Calculated Account Takeover Risk Score.
			//
			// Example: 0.77
			Score *float32 `json:"score,omitempty"`
		} `json:"account_takeover"`
		Bot struct {
			// Score Calculated Bot Risk Score.
			//
			// Example: 0.34
			Score *float32 `json:"score,omitempty"`
		} `json:"bot"`
	} `json:"scores,omitempty"`

	// Sdks Castle SDKs details
	Sdks *struct {
		Client *struct {
			// Name Example: castle-web
			Name *string `json:"name,omitempty"`

			// Version Example: 2.0.0
			Version *string `json:"version,omitempty"`
		} `json:"client,omitempty"`
		Server *struct {
			// Name Example: castle-postman
			Name *string `json:"name,omitempty"`

			// Version Example: 0.1.0
			Version *string `json:"version,omitempty"`
		} `json:"server,omitempty"`
	} `json:"sdks,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// Signals Signals triggered for this event/context
	//
	// Example: {"bot_behavior":{},"disposable_email":{},"multiple_accounts_per_device":{},"proxy_ip":{},"residential_proxy_access":{},"spoofed_device":{}}
	Signals *map[string]map[string]interface{} `json:"signals,omitempty"`

	// Status Event status
	//
	// Example: $succeeded
	Status *string `json:"status,omitempty"`

	// Type Event type
	//
	// Example: $login
	Type *string                `json:"type,omitempty"`
	User *UserForMonitorAndRisk `json:"user,omitempty"`
}

AssessmentResponse defines model for AssessmentResponse.

type AuthenticationMethod

type AuthenticationMethod struct {
	// Email Used when `type` is `$email`
	Email *string `json:"email,omitempty"`

	// Phone Used when `type` is `$phone`
	Phone   *string                  `json:"phone,omitempty"`
	Type    AuthenticationMethodType `json:"type"`
	Variant *string                  `json:"variant,omitempty"`
}

AuthenticationMethod Example: {"type":"$social","variant":"facebook"}

type AuthenticationMethodType

type AuthenticationMethodType string

AuthenticationMethodType defines model for AuthenticationMethodType.

const (
	AuthenticationMethodTypeAuthenticator AuthenticationMethodType = "$authenticator"
	AuthenticationMethodTypeBiometrics    AuthenticationMethodType = "$biometrics"
	AuthenticationMethodTypeDocument      AuthenticationMethodType = "$document"
	AuthenticationMethodTypeElectronicId  AuthenticationMethodType = "$electronic_id"
	AuthenticationMethodTypeEmail         AuthenticationMethodType = "$email"
	AuthenticationMethodTypeKba           AuthenticationMethodType = "$kba"
	AuthenticationMethodTypeOther         AuthenticationMethodType = "$other"
	AuthenticationMethodTypePasskey       AuthenticationMethodType = "$passkey"
	AuthenticationMethodTypePassword      AuthenticationMethodType = "$password"
	AuthenticationMethodTypePayment       AuthenticationMethodType = "$payment"
	AuthenticationMethodTypePhone         AuthenticationMethodType = "$phone"
	AuthenticationMethodTypePhysicalId    AuthenticationMethodType = "$physical_id"
	AuthenticationMethodTypePop           AuthenticationMethodType = "$pop"
	AuthenticationMethodTypePush          AuthenticationMethodType = "$push"
	AuthenticationMethodTypeSecurityKey   AuthenticationMethodType = "$security_key"
	AuthenticationMethodTypeSocial        AuthenticationMethodType = "$social"
	AuthenticationMethodTypeSso           AuthenticationMethodType = "$sso"
	AuthenticationMethodTypeVideo         AuthenticationMethodType = "$video"
)

Defines values for AuthenticationMethodType.

func (AuthenticationMethodType) Valid

func (e AuthenticationMethodType) Valid() bool

Valid indicates whether the value is a known member of the AuthenticationMethodType enum.

type AuthorType

type AuthorType string

AuthorType defines model for AuthorType.

const (
	AuthorTypeAnalystEmail        AuthorType = "$analyst_email"
	AuthorTypeCastleAgent         AuthorType = "$castle_agent"
	AuthorTypeCastleDashboardUser AuthorType = "$castle_dashboard_user"
	AuthorTypeCastlePolicy        AuthorType = "$castle_policy"
	AuthorTypeOther               AuthorType = "$other"
	AuthorTypeUser                AuthorType = "$user"
	AuthorTypeUserEmail           AuthorType = "$user_email"
)

Defines values for AuthorType.

func (AuthorType) Valid

func (e AuthorType) Valid() bool

Valid indicates whether the value is a known member of the AuthorType enum.

type BaseBucket

type BaseBucket struct {
	// Field Name of the field the bucket is based on
	//
	// Example: user.id
	Field string `json:"field"`

	// Name Name of the aggregation
	//
	// Example: user_id_count
	Name string `json:"name"`
}

BaseBucket defines model for BaseBucket.

type BaseItem

type BaseItem struct {
	// Author Indicates who or how the list item was created. Typically, this refers to the user that created the item from within the Castle Dashboard, or the policy ID if it was automatically created via automation.
	Author *ListItemAuthor `json:"author,omitempty"`

	// AutoArchivesAt Time after which a the List Item will be automatically archived and no longer matched against each event. A value of `null` means auto archivation is disabled and the record will stay active in the list forever.
	//
	// Example: 2021-09-27T16:46:38.313Z
	AutoArchivesAt nullable.Nullable[time.Time] `json:"auto_archives_at,omitempty"`

	// Comment An arbitrary string that can be used to eg. explain why this List Item was created. Often useful to display to other users.
	//
	// Example: Fradulent user found through manual inspection
	Comment *string `json:"comment,omitempty"`

	// PrimaryValue Value of the `primary_field` as described by the List definition. For example, if `primary_field` is configured to be the Event `user.id`, the `primary_value` on the List Item referes to the actual User ID value.
	//
	// Example: A04t7AcfSA69cBTTusx0RQ
	PrimaryValue *string `json:"primary_value,omitempty"`

	// SecondaryValue Optional secondary value. If this value is set, it means that for a List Item to match an Event, both the `primary_value` and `secondary_value` must match.
	//
	// Example: 2ee938c8-24c2-4c26-9d25-19511dd75029
	SecondaryValue nullable.Nullable[string] `json:"secondary_value,omitempty"`
}

BaseItem List Item

type BaseList

type BaseList struct {
	// Color Color assigned to the List. These colors can be used to represent different sentiments, such as red for blocked records or green for trusted.
	//
	// Example: $red
	Color *ListColor `json:"color,omitempty"`

	// DefaultItemArchivationTime Default time, in seconds, after which Items in this List automatically gets archived after they are created. It is possible to override this value when creating the individual List Items
	//
	// Example: 2592000
	DefaultItemArchivationTime nullable.Nullable[int] `json:"default_item_archivation_time,omitempty"`

	// Description Description of the List
	//
	// Example: We block these IPs from withdrawing funds. Please be careful.
	Description nullable.Nullable[string] `json:"description,omitempty"`

	// Name Name of the List
	//
	// Example: Malicious IPs
	Name *string `json:"name,omitempty"`
}

BaseList List

type BaseQuery

type BaseQuery struct {
	// Filters Either a list of filters or a filter tree (`{ "$and" | "$or": [...] }`). A tree can nest `$and` and `$or`
	// groups, for example `(A OR B) AND (C OR D)`, which the list form cannot express.
	Filters EventFilters `json:"filters"`
	Page    *int         `json:"page,omitempty"`

	// QueryType The type of query to perform.
	//
	// - `$count` returns the number of records matching the query (`total_count` will be present and `data` will be empty)
	// - `$records` returns the records matching the query (`total_count` will be 0)
	// - `$records_with_count` returns the number of records matching the query and the records matching the query
	QueryType *BaseQueryQueryType `json:"query_type,omitempty"`
}

BaseQuery defines model for BaseQuery.

type BaseQueryQueryType

type BaseQueryQueryType string

BaseQueryQueryType The type of query to perform.

- `$count` returns the number of records matching the query (`total_count` will be present and `data` will be empty) - `$records` returns the records matching the query (`total_count` will be 0) - `$records_with_count` returns the number of records matching the query and the records matching the query

const (
	BaseQueryQueryTypeCount            BaseQueryQueryType = "$count"
	BaseQueryQueryTypeRecords          BaseQueryQueryType = "$records"
	BaseQueryQueryTypeRecordsWithCount BaseQueryQueryType = "$records_with_count"
)

Defines values for BaseQueryQueryType.

func (BaseQueryQueryType) Valid

func (e BaseQueryQueryType) Valid() bool

Valid indicates whether the value is a known member of the BaseQueryQueryType enum.

type BaseRequest

type BaseRequest struct {
	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	Product   *Product   `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`
}

BaseRequest defines model for BaseRequest.

type BoundingBoxFilter

type BoundingBoxFilter struct {
	BottomRight Coordinates `json:"bottom_right"`
	TopLeft     Coordinates `json:"top_left"`
}

BoundingBoxFilter defines model for BoundingBoxFilter.

type Challenge

type Challenge struct {
	// TriggerEvent The event that triggered this challenge
	TriggerEvent ChallengeTriggerEvent `json:"trigger_event"`
}

Challenge Challenge object containing information about the event that triggered this challenge

type ChallengeFilterRequest

type ChallengeFilterRequest struct {
	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`

	// Challenge Challenge object containing information about the event that triggered this challenge
	Challenge *Challenge `json:"challenge,omitempty"`

	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand *[]string `json:"expand,omitempty"`

	// MatchingUserId User id related connected with the request
	//
	// Example: 123
	MatchingUserId *string `json:"matching_user_id,omitempty"`
	Params         *struct {
		// Email The email address sent by the user
		//
		// Example: Rhea.Franecki@example.org
		Email *string `json:"email,omitempty"`

		// Phone The phone number sent by the user
		//
		// Example: +16175551212
		Phone *string `json:"phone,omitempty"`

		// Username The username sent by the user
		//
		// Example: superhero123
		Username *string `json:"username,omitempty"`
	} `json:"params,omitempty"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](https://docs.castle.io/docs/quickstart)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool                         `json:"skip_request_token_validation,omitempty"`
	Status                     *ChallengeFilterRequestStatus `json:"status,omitempty"`

	// Type Castle supported events available for this endpoint
	Type ChallengeFilterRequestType `json:"type"`
	User *struct {
		// Email The identified user's email address
		//
		// Example: Rhea.Franecki@example.org
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Email *string `json:"email,omitempty"`

		// Phone The identified user's phone number
		//
		// Example: +16175551212
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Phone *string `json:"phone,omitempty"`
	} `json:"user,omitempty"`
}

ChallengeFilterRequest defines model for ChallengeFilterRequest.

type ChallengeFilterRequestStatus

type ChallengeFilterRequestStatus string

ChallengeFilterRequestStatus defines model for ChallengeFilterRequest.Status.

const (
	ChallengeFilterRequestStatusFailed    ChallengeFilterRequestStatus = "$failed"
	ChallengeFilterRequestStatusRequested ChallengeFilterRequestStatus = "$requested"
	ChallengeFilterRequestStatusSucceeded ChallengeFilterRequestStatus = "$succeeded"
)

Defines values for ChallengeFilterRequestStatus.

func (ChallengeFilterRequestStatus) Valid

Valid indicates whether the value is a known member of the ChallengeFilterRequestStatus enum.

type ChallengeFilterRequestType

type ChallengeFilterRequestType string

ChallengeFilterRequestType Castle supported events available for this endpoint

const (
	ChallengeFilterRequestTypeChallenge ChallengeFilterRequestType = "$challenge"
)

Defines values for ChallengeFilterRequestType.

func (ChallengeFilterRequestType) Valid

func (e ChallengeFilterRequestType) Valid() bool

Valid indicates whether the value is a known member of the ChallengeFilterRequestType enum.

type ChallengeResponse

type ChallengeResponse struct {
	// Agent AI agent identified for this event/context. Omitted when no agent is identified
	Agent *Agent `json:"agent,omitempty"`

	// Authenticated Authenticated or Anonymous visitor
	//
	// Example: true
	Authenticated *bool `json:"authenticated,omitempty"`

	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`
	Behavior             *struct {
		// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
		Fingerprint nullable.Nullable[string] `json:"fingerprint,omitempty"`
	} `json:"behavior,omitempty"`

	// CreatedAt Event timestamp
	//
	// Example: 2021-09-27T16:46:38.313Z
	CreatedAt *time.Time `json:"created_at,omitempty"`
	Device    struct {
		// Fingerprint Example: ohvjn8adSnetYTzZ8B7bOP
		Fingerprint nullable.Nullable[string] `json:"fingerprint"`
		Hardware    *struct {
			Brand   nullable.Nullable[string] `json:"brand"`
			Display struct {
				// Height Example: 982
				Height nullable.Nullable[int] `json:"height"`

				// Width Example: 1512
				Width nullable.Nullable[int] `json:"width"`
			} `json:"display"`
			Model struct {
				Code nullable.Nullable[string] `json:"code"`
				Name nullable.Nullable[string] `json:"name"`
			} `json:"model"`
			Name nullable.Nullable[string] `json:"name"`

			// Type Example: computer
			Type string `json:"type"`
		} `json:"hardware,omitempty"`
		Os *struct {
			// Name Example: Windows 10
			Name    string `json:"name"`
			Version struct {
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 10
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"os,omitempty"`
		Screen *struct {
			// Orientation Example: landscape
			Orientation nullable.Nullable[string] `json:"orientation,omitempty"`

			// Screen Example: 2
			Screen nullable.Nullable[int] `json:"screen,omitempty"`
		} `json:"screen,omitempty"`
		Software *struct {
			// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
			Fingerprint nullable.Nullable[string] `json:"fingerprint"`

			// Languages Example: ["en-us","en"]
			Languages []string `json:"languages"`

			// Name Example: Chrome
			Name string `json:"name"`

			// Type Example: browser
			Type    string `json:"type"`
			Version struct {
				// Full Example: 91.0.4472
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 91
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"software,omitempty"`
		Timezone *struct {
			// Name Example: America/New_York
			Name nullable.Nullable[string] `json:"name,omitempty"`

			// Offset Time offset from UTC measured in minutes
			//
			// Example: -300
			Offset nullable.Nullable[int] `json:"offset,omitempty"`
		} `json:"timezone,omitempty"`

		// Token Device token generated or found
		//
		// Example: eyJhbGciOiJIUzI1NiJ9.eyJ0b2tlbiI6IjEzc2x6RzNHQ0RzeFJCejdJWF9SUDJkV1Y0RFgiLCJxdWFsaWZpZXIiOiJBUUlEQ2pFME5EZzFPREF3T1RZIiwiYW5vbnltb3VzIjpmYWxzZSwidmVyc2lvbiI6MC4zfQ.y3vOt-W1IpOi7Oyn1jll1uDw1YL-JPZtNMTU-PyaYhQ
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Token *string `json:"token,omitempty"`

		// UserAgent Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
		UserAgent *string `json:"user_agent,omitempty"`
	} `json:"device"`

	// Email User Email Object
	Email *struct {
		// Disposable Example: false
		Disposable *bool `json:"disposable,omitempty"`

		// Domain Example: gmail.com
		Domain        *string `json:"domain,omitempty"`
		DomainDetails *struct {
			// CreatedAt Example: 2021-09-27T16:46:38.313Z
			CreatedAt   *time.Time `json:"created_at,omitempty"`
			DmarcRecord *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"dmarc_record,omitempty"`

			// ExpiresAt Example: 2021-09-27T16:46:38.313Z
			ExpiresAt *time.Time `json:"expires_at,omitempty"`
			MxRecords *struct {
				// NullMx Example: false
				NullMx nullable.Nullable[bool] `json:"null_mx,omitempty"`
			} `json:"mx_records,omitempty"`

			// Nameservers Example: ["ns1.hosting.com","ns2.hosting.com","ns3.hosting.com"]
			Nameservers *[]string `json:"nameservers,omitempty"`
			Registrar   *string   `json:"registrar,omitempty"`
			SpfRecord   *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"spf_record,omitempty"`

			// UpdatedAt Example: 2021-09-27T16:46:38.313Z
			UpdatedAt *time.Time `json:"updated_at,omitempty"`
		} `json:"domain_details,omitempty"`

		// Normalized Example: user.email@example.com
		Normalized *string `json:"normalized,omitempty"`

		// Unreachable Example: false
		Unreachable *bool `json:"unreachable,omitempty"`
	} `json:"email,omitempty"`

	// Endpoint Castle Request Endpoint
	//
	// Example: /v1/risk
	Endpoint *string `json:"endpoint,omitempty"`

	// Id Castle Event ID
	//
	// Example: ASZoelALT5-PaVw2pAVMXg
	Id *string `json:"id,omitempty"`
	Ip *IP     `json:"ip,omitempty"`

	// Metrics Metrics triggered for this event/context
	//
	// Example: {"1":{},"2":{},"3":{},"4":{},"5":{}}
	Metrics *map[string]map[string]interface{} `json:"metrics,omitempty"`

	// Name Event Full Name
	//
	// Example: Login Succeeded
	Name *string `json:"name,omitempty"`

	// Params The params object
	Params *EventParams `json:"params,omitempty"`

	// Policy The matching policy
	Policy  Policy   `json:"policy"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties
	Properties *Properties `json:"properties,omitempty"`

	// Risk Deprecated Risk Score - use `scores` instead. Calculated only when `request_token` and `context` are provided.
	//
	// Example: 0.65
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Risk *float32 `json:"risk,omitempty"`

	// Scores Castle Scores breakdown. Calculated only when `request_token` and `context` are provided.
	Scores *struct {
		AccountAbuse struct {
			// Score Calculated Account Abuse Risk Score.
			//
			// Example: 0.65
			Score *float32 `json:"score,omitempty"`
		} `json:"account_abuse"`
		AccountTakeover struct {
			// Score Calculated Account Takeover Risk Score.
			//
			// Example: 0.77
			Score *float32 `json:"score,omitempty"`
		} `json:"account_takeover"`
		Bot struct {
			// Score Calculated Bot Risk Score.
			//
			// Example: 0.34
			Score *float32 `json:"score,omitempty"`
		} `json:"bot"`
	} `json:"scores,omitempty"`

	// Sdks Castle SDKs details
	Sdks *struct {
		Client *struct {
			// Name Example: castle-web
			Name *string `json:"name,omitempty"`

			// Version Example: 2.0.0
			Version *string `json:"version,omitempty"`
		} `json:"client,omitempty"`
		Server *struct {
			// Name Example: castle-postman
			Name *string `json:"name,omitempty"`

			// Version Example: 0.1.0
			Version *string `json:"version,omitempty"`
		} `json:"server,omitempty"`
	} `json:"sdks,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// Signals Signals triggered for this event/context
	//
	// Example: {"bot_behavior":{},"disposable_email":{},"multiple_accounts_per_device":{},"proxy_ip":{},"residential_proxy_access":{},"spoofed_device":{}}
	Signals *map[string]map[string]interface{} `json:"signals,omitempty"`
	Status  *ChallengeResponseStatus           `json:"status,omitempty"`

	// Type Castle supported events available for this endpoint
	Type ChallengeResponseType  `json:"type"`
	User *UserForMonitorAndRisk `json:"user,omitempty"`
}

ChallengeResponse defines model for ChallengeResponse.

type ChallengeResponseStatus

type ChallengeResponseStatus string

ChallengeResponseStatus defines model for ChallengeResponse.Status.

const (
	ChallengeResponseStatusAttempted ChallengeResponseStatus = "$attempted"
	ChallengeResponseStatusFailed    ChallengeResponseStatus = "$failed"
	ChallengeResponseStatusSucceeded ChallengeResponseStatus = "$succeeded"
)

Defines values for ChallengeResponseStatus.

func (ChallengeResponseStatus) Valid

func (e ChallengeResponseStatus) Valid() bool

Valid indicates whether the value is a known member of the ChallengeResponseStatus enum.

type ChallengeResponseType

type ChallengeResponseType string

ChallengeResponseType Castle supported events available for this endpoint

const (
	ChallengeResponseTypeChallenge ChallengeResponseType = "$challenge"
)

Defines values for ChallengeResponseType.

func (ChallengeResponseType) Valid

func (e ChallengeResponseType) Valid() bool

Valid indicates whether the value is a known member of the ChallengeResponseType enum.

type ChallengeRiskRequest

type ChallengeRiskRequest struct {
	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`

	// Challenge Challenge object containing information about the event that triggered this challenge
	Challenge *Challenge `json:"challenge,omitempty"`

	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand  *[]string `json:"expand,omitempty"`
	Product *Product  `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](/v1/getting-started)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool                      `json:"skip_request_token_validation,omitempty"`
	Status                     ChallengeRiskRequestStatus `json:"status"`

	// Type Castle supported events available for this endpoint
	Type ChallengeRiskRequestType `json:"type"`
	User UserForMonitorAndRisk    `json:"user"`
}

ChallengeRiskRequest defines model for ChallengeRiskRequest.

type ChallengeRiskRequestStatus

type ChallengeRiskRequestStatus string

ChallengeRiskRequestStatus defines model for ChallengeRiskRequest.Status.

const (
	ChallengeRiskRequestStatusFailed    ChallengeRiskRequestStatus = "$failed"
	ChallengeRiskRequestStatusRequested ChallengeRiskRequestStatus = "$requested"
	ChallengeRiskRequestStatusSucceeded ChallengeRiskRequestStatus = "$succeeded"
)

Defines values for ChallengeRiskRequestStatus.

func (ChallengeRiskRequestStatus) Valid

func (e ChallengeRiskRequestStatus) Valid() bool

Valid indicates whether the value is a known member of the ChallengeRiskRequestStatus enum.

type ChallengeRiskRequestType

type ChallengeRiskRequestType string

ChallengeRiskRequestType Castle supported events available for this endpoint

const (
	ChallengeRiskRequestTypeChallenge ChallengeRiskRequestType = "$challenge"
)

Defines values for ChallengeRiskRequestType.

func (ChallengeRiskRequestType) Valid

func (e ChallengeRiskRequestType) Valid() bool

Valid indicates whether the value is a known member of the ChallengeRiskRequestType enum.

type ChallengeTriggerEvent

type ChallengeTriggerEvent struct {
	// contains filtered or unexported fields
}

ChallengeTriggerEvent The event that triggered this challenge

func (ChallengeTriggerEvent) AsChallengeTriggerEventCustom

func (t ChallengeTriggerEvent) AsChallengeTriggerEventCustom() (ChallengeTriggerEventCustom, error)

AsChallengeTriggerEventCustom returns the union data inside the ChallengeTriggerEvent as a ChallengeTriggerEventCustom

func (ChallengeTriggerEvent) AsChallengeTriggerEventStandard

func (t ChallengeTriggerEvent) AsChallengeTriggerEventStandard() (ChallengeTriggerEventStandard, error)

AsChallengeTriggerEventStandard returns the union data inside the ChallengeTriggerEvent as a ChallengeTriggerEventStandard

func (ChallengeTriggerEvent) Discriminator

func (t ChallengeTriggerEvent) Discriminator() (string, error)

func (*ChallengeTriggerEvent) FromChallengeTriggerEventCustom

func (t *ChallengeTriggerEvent) FromChallengeTriggerEventCustom(v ChallengeTriggerEventCustom) error

FromChallengeTriggerEventCustom overwrites any union data inside the ChallengeTriggerEvent as the provided ChallengeTriggerEventCustom

func (*ChallengeTriggerEvent) FromChallengeTriggerEventStandard

func (t *ChallengeTriggerEvent) FromChallengeTriggerEventStandard(v ChallengeTriggerEventStandard) error

FromChallengeTriggerEventStandard overwrites any union data inside the ChallengeTriggerEvent as the provided ChallengeTriggerEventStandard

func (ChallengeTriggerEvent) MarshalJSON

func (t ChallengeTriggerEvent) MarshalJSON() ([]byte, error)

func (*ChallengeTriggerEvent) MergeChallengeTriggerEventCustom

func (t *ChallengeTriggerEvent) MergeChallengeTriggerEventCustom(v ChallengeTriggerEventCustom) error

MergeChallengeTriggerEventCustom performs a merge with any union data inside the ChallengeTriggerEvent, using the provided ChallengeTriggerEventCustom

func (*ChallengeTriggerEvent) MergeChallengeTriggerEventStandard

func (t *ChallengeTriggerEvent) MergeChallengeTriggerEventStandard(v ChallengeTriggerEventStandard) error

MergeChallengeTriggerEventStandard performs a merge with any union data inside the ChallengeTriggerEvent, using the provided ChallengeTriggerEventStandard

func (*ChallengeTriggerEvent) UnmarshalJSON

func (t *ChallengeTriggerEvent) UnmarshalJSON(b []byte) error

func (ChallengeTriggerEvent) ValueByDiscriminator

func (t ChallengeTriggerEvent) ValueByDiscriminator() (interface{}, error)

type ChallengeTriggerEventCustom

type ChallengeTriggerEventCustom struct {
	// Name Name of the custom event
	Name string `json:"name"`

	// Status Status of the triggering event
	Status ChallengeTriggerEventCustomStatus `json:"status"`

	// Type Type of event that triggered the challenge
	Type ChallengeTriggerEventCustomType `json:"type"`
}

ChallengeTriggerEventCustom Custom event that triggered a challenge

type ChallengeTriggerEventCustomStatus

type ChallengeTriggerEventCustomStatus string

ChallengeTriggerEventCustomStatus Status of the triggering event

const (
	ChallengeTriggerEventCustomStatusAttempted ChallengeTriggerEventCustomStatus = "$attempted"
	ChallengeTriggerEventCustomStatusFailed    ChallengeTriggerEventCustomStatus = "$failed"
	ChallengeTriggerEventCustomStatusSucceeded ChallengeTriggerEventCustomStatus = "$succeeded"
)

Defines values for ChallengeTriggerEventCustomStatus.

func (ChallengeTriggerEventCustomStatus) Valid

Valid indicates whether the value is a known member of the ChallengeTriggerEventCustomStatus enum.

type ChallengeTriggerEventCustomType

type ChallengeTriggerEventCustomType string

ChallengeTriggerEventCustomType Type of event that triggered the challenge

const (
	ChallengeTriggerEventCustomTypeCustom ChallengeTriggerEventCustomType = "$custom"
)

Defines values for ChallengeTriggerEventCustomType.

func (ChallengeTriggerEventCustomType) Valid

Valid indicates whether the value is a known member of the ChallengeTriggerEventCustomType enum.

type ChallengeTriggerEventStandard

type ChallengeTriggerEventStandard struct {
	// Status Status of the triggering event
	Status ChallengeTriggerEventStandardStatus `json:"status"`

	// Type Type of event that triggered the challenge
	Type ChallengeTriggerEventStandardType `json:"type"`
}

ChallengeTriggerEventStandard Standard event type that triggered a challenge

type ChallengeTriggerEventStandardStatus

type ChallengeTriggerEventStandardStatus string

ChallengeTriggerEventStandardStatus Status of the triggering event

const (
	ChallengeTriggerEventStandardStatusAttempted ChallengeTriggerEventStandardStatus = "$attempted"
	ChallengeTriggerEventStandardStatusFailed    ChallengeTriggerEventStandardStatus = "$failed"
	ChallengeTriggerEventStandardStatusSucceeded ChallengeTriggerEventStandardStatus = "$succeeded"
)

Defines values for ChallengeTriggerEventStandardStatus.

func (ChallengeTriggerEventStandardStatus) Valid

Valid indicates whether the value is a known member of the ChallengeTriggerEventStandardStatus enum.

type ChallengeTriggerEventStandardType

type ChallengeTriggerEventStandardType string

ChallengeTriggerEventStandardType Type of event that triggered the challenge

const (
	ChallengeTriggerEventStandardTypeChallenge            ChallengeTriggerEventStandardType = "$challenge"
	ChallengeTriggerEventStandardTypeLogin                ChallengeTriggerEventStandardType = "$login"
	ChallengeTriggerEventStandardTypeLogout               ChallengeTriggerEventStandardType = "$logout"
	ChallengeTriggerEventStandardTypePasswordResetRequest ChallengeTriggerEventStandardType = "$password_reset_request"
	ChallengeTriggerEventStandardTypeProfileReset         ChallengeTriggerEventStandardType = "$profile_reset"
	ChallengeTriggerEventStandardTypeProfileUpdate        ChallengeTriggerEventStandardType = "$profile_update"
	ChallengeTriggerEventStandardTypeRegistration         ChallengeTriggerEventStandardType = "$registration"
	ChallengeTriggerEventStandardTypeTransaction          ChallengeTriggerEventStandardType = "$transaction"
)

Defines values for ChallengeTriggerEventStandardType.

func (ChallengeTriggerEventStandardType) Valid

Valid indicates whether the value is a known member of the ChallengeTriggerEventStandardType enum.

type ChangedChangesetEntry

type ChangedChangesetEntry struct {
	Changed ChangedChangesetEntryChanged `json:"changed"`
}

ChangedChangesetEntry Information that the attribute changed along with the changed values. Examples: `{ "password": { "changed": true } }`

type ChangedChangesetEntryChanged

type ChangedChangesetEntryChanged bool

ChangedChangesetEntryChanged defines model for ChangedChangesetEntry.Changed.

Defines values for ChangedChangesetEntryChanged.

func (ChangedChangesetEntryChanged) Valid

Valid indicates whether the value is a known member of the ChangedChangesetEntryChanged enum.

type Changeset

type Changeset struct {
	AuthenticationMethodType *Changeset_AuthenticationMethodType `json:"authentication_method.type,omitempty"`

	// Email Email address change. You can also inform Castle that the email changed without sending the values explicitly: `{ "email": { "changed": true } }`
	Email *Changeset_Email `json:"email,omitempty"`
	Name  *Changeset_Name  `json:"name,omitempty"`

	// Password Information that the attribute changed along with the changed values. Examples: `{ "password": { "changed": true } }`
	Password *ChangedChangesetEntry `json:"password,omitempty"`

	// Phone Phone number change. You can also inform Castle that the phone changed without sending the values explicitly: `{ "phone": { "changed": true } }`
	Phone                *Changeset_Phone                          `json:"phone,omitempty"`
	AdditionalProperties map[string]Changeset_AdditionalProperties `json:"-"`
}

Changeset An object containing information about attributes that changed due to the event. You can send either anonymous attributes (eg. to track password changes) or full attributes (eg. email changes). To simplify your implementation, Castle *automatically* tracks changes to name, email, and phone, however, if you have the `from` and `to` values at hand, you can also send the changeset yourself, which also allows you to specify changes a user’s password as well as any other custom attributes. Changes to custom attributes won’t be searchable in the dashboard, but they will appear in the event stream.

Example: [{"authentication_method.type":{"from":"$authenticator","to":"$email"},"email":{"from":"before@exmaple.com","to":"after@example.com"},"name":{"from":null,"to":"John Snow"},"password":{"changed":true}}]

func (Changeset) Get

func (a Changeset) Get(fieldName string) (value Changeset_AdditionalProperties, found bool)

Getter for additional properties for Changeset. Returns the specified element and whether it was found

func (Changeset) MarshalJSON

func (a Changeset) MarshalJSON() ([]byte, error)

Override default JSON handling for Changeset to handle AdditionalProperties

func (*Changeset) Set

func (a *Changeset) Set(fieldName string, value Changeset_AdditionalProperties)

Setter for additional properties for Changeset

func (*Changeset) UnmarshalJSON

func (a *Changeset) UnmarshalJSON(b []byte) error

Override default JSON handling for Changeset to handle AdditionalProperties

type ChangesetAuthenticationMethodType1

type ChangesetAuthenticationMethodType1 struct {
	From nullable.Nullable[ChangesetAuthenticationMethodType1From] `json:"from,omitempty"`
	To   nullable.Nullable[ChangesetAuthenticationMethodType1To]   `json:"to,omitempty"`
}

ChangesetAuthenticationMethodType1 Change to MFA method. Both from and to can be null.

type ChangesetAuthenticationMethodType1From

type ChangesetAuthenticationMethodType1From string

ChangesetAuthenticationMethodType1From defines model for Changeset.AuthenticationMethodType.1.From.

const (
	ChangesetAuthenticationMethodType1FromAuthenticator ChangesetAuthenticationMethodType1From = "$authenticator"
	ChangesetAuthenticationMethodType1FromBiometrics    ChangesetAuthenticationMethodType1From = "$biometrics"
	ChangesetAuthenticationMethodType1FromDocument      ChangesetAuthenticationMethodType1From = "$document"
	ChangesetAuthenticationMethodType1FromElectronicId  ChangesetAuthenticationMethodType1From = "$electronic_id"
	ChangesetAuthenticationMethodType1FromEmail         ChangesetAuthenticationMethodType1From = "$email"
	ChangesetAuthenticationMethodType1FromKba           ChangesetAuthenticationMethodType1From = "$kba"
	ChangesetAuthenticationMethodType1FromOther         ChangesetAuthenticationMethodType1From = "$other"
	ChangesetAuthenticationMethodType1FromPasskey       ChangesetAuthenticationMethodType1From = "$passkey"
	ChangesetAuthenticationMethodType1FromPassword      ChangesetAuthenticationMethodType1From = "$password"
	ChangesetAuthenticationMethodType1FromPayment       ChangesetAuthenticationMethodType1From = "$payment"
	ChangesetAuthenticationMethodType1FromPhone         ChangesetAuthenticationMethodType1From = "$phone"
	ChangesetAuthenticationMethodType1FromPhysicalId    ChangesetAuthenticationMethodType1From = "$physical_id"
	ChangesetAuthenticationMethodType1FromPop           ChangesetAuthenticationMethodType1From = "$pop"
	ChangesetAuthenticationMethodType1FromPush          ChangesetAuthenticationMethodType1From = "$push"
	ChangesetAuthenticationMethodType1FromSecurityKey   ChangesetAuthenticationMethodType1From = "$security_key"
	ChangesetAuthenticationMethodType1FromSocial        ChangesetAuthenticationMethodType1From = "$social"
	ChangesetAuthenticationMethodType1FromSso           ChangesetAuthenticationMethodType1From = "$sso"
	ChangesetAuthenticationMethodType1FromVideo         ChangesetAuthenticationMethodType1From = "$video"
)

Defines values for ChangesetAuthenticationMethodType1From.

func (ChangesetAuthenticationMethodType1From) Valid

Valid indicates whether the value is a known member of the ChangesetAuthenticationMethodType1From enum.

type ChangesetAuthenticationMethodType1To

type ChangesetAuthenticationMethodType1To string

ChangesetAuthenticationMethodType1To defines model for Changeset.AuthenticationMethodType.1.To.

const (
	ChangesetAuthenticationMethodType1ToAuthenticator ChangesetAuthenticationMethodType1To = "$authenticator"
	ChangesetAuthenticationMethodType1ToBiometrics    ChangesetAuthenticationMethodType1To = "$biometrics"
	ChangesetAuthenticationMethodType1ToDocument      ChangesetAuthenticationMethodType1To = "$document"
	ChangesetAuthenticationMethodType1ToElectronicId  ChangesetAuthenticationMethodType1To = "$electronic_id"
	ChangesetAuthenticationMethodType1ToEmail         ChangesetAuthenticationMethodType1To = "$email"
	ChangesetAuthenticationMethodType1ToKba           ChangesetAuthenticationMethodType1To = "$kba"
	ChangesetAuthenticationMethodType1ToOther         ChangesetAuthenticationMethodType1To = "$other"
	ChangesetAuthenticationMethodType1ToPasskey       ChangesetAuthenticationMethodType1To = "$passkey"
	ChangesetAuthenticationMethodType1ToPassword      ChangesetAuthenticationMethodType1To = "$password"
	ChangesetAuthenticationMethodType1ToPayment       ChangesetAuthenticationMethodType1To = "$payment"
	ChangesetAuthenticationMethodType1ToPhone         ChangesetAuthenticationMethodType1To = "$phone"
	ChangesetAuthenticationMethodType1ToPhysicalId    ChangesetAuthenticationMethodType1To = "$physical_id"
	ChangesetAuthenticationMethodType1ToPop           ChangesetAuthenticationMethodType1To = "$pop"
	ChangesetAuthenticationMethodType1ToPush          ChangesetAuthenticationMethodType1To = "$push"
	ChangesetAuthenticationMethodType1ToSecurityKey   ChangesetAuthenticationMethodType1To = "$security_key"
	ChangesetAuthenticationMethodType1ToSocial        ChangesetAuthenticationMethodType1To = "$social"
	ChangesetAuthenticationMethodType1ToSso           ChangesetAuthenticationMethodType1To = "$sso"
	ChangesetAuthenticationMethodType1ToVideo         ChangesetAuthenticationMethodType1To = "$video"
)

Defines values for ChangesetAuthenticationMethodType1To.

func (ChangesetAuthenticationMethodType1To) Valid

Valid indicates whether the value is a known member of the ChangesetAuthenticationMethodType1To enum.

type ChangesetEmail1

type ChangesetEmail1 struct {
	// From Attribute value before the event.
	From string `json:"from"`

	// To Attribute value after the event.
	To nullable.Nullable[string] `json:"to"`
}

ChangesetEmail1 defines model for Changeset.Email.1.

type ChangesetEntry

type ChangesetEntry struct {
	// From Attribute value before the event
	From nullable.Nullable[string] `json:"from"`

	// To Attribute value after the event
	To nullable.Nullable[string] `json:"to"`
}

ChangesetEntry Information that the attribute changed along with the changed values. Examples: `{ "email": { "from": "a@example.com", "to": "b@example.com" }`, `{ "authentication_method.type": { "from": null, "to": "$push" }`

type ChangesetPhone1

type ChangesetPhone1 struct {
	// From Attribute value before the event.
	From nullable.Nullable[string] `json:"from"`

	// To Attribute value after the event.
	To nullable.Nullable[string] `json:"to"`
}

ChangesetPhone1 defines model for Changeset.Phone.1.

type Changeset_AdditionalProperties

type Changeset_AdditionalProperties struct {
	// contains filtered or unexported fields
}

Changeset_AdditionalProperties defines model for Changeset.AdditionalProperties.

func (Changeset_AdditionalProperties) AsChangedChangesetEntry

func (t Changeset_AdditionalProperties) AsChangedChangesetEntry() (ChangedChangesetEntry, error)

AsChangedChangesetEntry returns the union data inside the Changeset_AdditionalProperties as a ChangedChangesetEntry

func (Changeset_AdditionalProperties) AsChangesetEntry

func (t Changeset_AdditionalProperties) AsChangesetEntry() (ChangesetEntry, error)

AsChangesetEntry returns the union data inside the Changeset_AdditionalProperties as a ChangesetEntry

func (*Changeset_AdditionalProperties) FromChangedChangesetEntry

func (t *Changeset_AdditionalProperties) FromChangedChangesetEntry(v ChangedChangesetEntry) error

FromChangedChangesetEntry overwrites any union data inside the Changeset_AdditionalProperties as the provided ChangedChangesetEntry

func (*Changeset_AdditionalProperties) FromChangesetEntry

func (t *Changeset_AdditionalProperties) FromChangesetEntry(v ChangesetEntry) error

FromChangesetEntry overwrites any union data inside the Changeset_AdditionalProperties as the provided ChangesetEntry

func (Changeset_AdditionalProperties) MarshalJSON

func (t Changeset_AdditionalProperties) MarshalJSON() ([]byte, error)

func (*Changeset_AdditionalProperties) MergeChangedChangesetEntry

func (t *Changeset_AdditionalProperties) MergeChangedChangesetEntry(v ChangedChangesetEntry) error

MergeChangedChangesetEntry performs a merge with any union data inside the Changeset_AdditionalProperties, using the provided ChangedChangesetEntry

func (*Changeset_AdditionalProperties) MergeChangesetEntry

func (t *Changeset_AdditionalProperties) MergeChangesetEntry(v ChangesetEntry) error

MergeChangesetEntry performs a merge with any union data inside the Changeset_AdditionalProperties, using the provided ChangesetEntry

func (*Changeset_AdditionalProperties) UnmarshalJSON

func (t *Changeset_AdditionalProperties) UnmarshalJSON(b []byte) error

type Changeset_AuthenticationMethodType

type Changeset_AuthenticationMethodType struct {
	// contains filtered or unexported fields
}

Changeset_AuthenticationMethodType defines model for Changeset.AuthenticationMethodType.

func (Changeset_AuthenticationMethodType) AsChangedChangesetEntry

func (t Changeset_AuthenticationMethodType) AsChangedChangesetEntry() (ChangedChangesetEntry, error)

AsChangedChangesetEntry returns the union data inside the Changeset_AuthenticationMethodType as a ChangedChangesetEntry

func (Changeset_AuthenticationMethodType) AsChangesetAuthenticationMethodType1

func (t Changeset_AuthenticationMethodType) AsChangesetAuthenticationMethodType1() (ChangesetAuthenticationMethodType1, error)

AsChangesetAuthenticationMethodType1 returns the union data inside the Changeset_AuthenticationMethodType as a ChangesetAuthenticationMethodType1

func (*Changeset_AuthenticationMethodType) FromChangedChangesetEntry

func (t *Changeset_AuthenticationMethodType) FromChangedChangesetEntry(v ChangedChangesetEntry) error

FromChangedChangesetEntry overwrites any union data inside the Changeset_AuthenticationMethodType as the provided ChangedChangesetEntry

func (*Changeset_AuthenticationMethodType) FromChangesetAuthenticationMethodType1

func (t *Changeset_AuthenticationMethodType) FromChangesetAuthenticationMethodType1(v ChangesetAuthenticationMethodType1) error

FromChangesetAuthenticationMethodType1 overwrites any union data inside the Changeset_AuthenticationMethodType as the provided ChangesetAuthenticationMethodType1

func (Changeset_AuthenticationMethodType) MarshalJSON

func (t Changeset_AuthenticationMethodType) MarshalJSON() ([]byte, error)

func (*Changeset_AuthenticationMethodType) MergeChangedChangesetEntry

func (t *Changeset_AuthenticationMethodType) MergeChangedChangesetEntry(v ChangedChangesetEntry) error

MergeChangedChangesetEntry performs a merge with any union data inside the Changeset_AuthenticationMethodType, using the provided ChangedChangesetEntry

func (*Changeset_AuthenticationMethodType) MergeChangesetAuthenticationMethodType1

func (t *Changeset_AuthenticationMethodType) MergeChangesetAuthenticationMethodType1(v ChangesetAuthenticationMethodType1) error

MergeChangesetAuthenticationMethodType1 performs a merge with any union data inside the Changeset_AuthenticationMethodType, using the provided ChangesetAuthenticationMethodType1

func (*Changeset_AuthenticationMethodType) UnmarshalJSON

func (t *Changeset_AuthenticationMethodType) UnmarshalJSON(b []byte) error

type Changeset_Email

type Changeset_Email struct {
	// contains filtered or unexported fields
}

Changeset_Email Email address change. You can also inform Castle that the email changed without sending the values explicitly: `{ "email": { "changed": true } }`

func (Changeset_Email) AsChangedChangesetEntry

func (t Changeset_Email) AsChangedChangesetEntry() (ChangedChangesetEntry, error)

AsChangedChangesetEntry returns the union data inside the Changeset_Email as a ChangedChangesetEntry

func (Changeset_Email) AsChangesetEmail1

func (t Changeset_Email) AsChangesetEmail1() (ChangesetEmail1, error)

AsChangesetEmail1 returns the union data inside the Changeset_Email as a ChangesetEmail1

func (*Changeset_Email) FromChangedChangesetEntry

func (t *Changeset_Email) FromChangedChangesetEntry(v ChangedChangesetEntry) error

FromChangedChangesetEntry overwrites any union data inside the Changeset_Email as the provided ChangedChangesetEntry

func (*Changeset_Email) FromChangesetEmail1

func (t *Changeset_Email) FromChangesetEmail1(v ChangesetEmail1) error

FromChangesetEmail1 overwrites any union data inside the Changeset_Email as the provided ChangesetEmail1

func (Changeset_Email) MarshalJSON

func (t Changeset_Email) MarshalJSON() ([]byte, error)

func (*Changeset_Email) MergeChangedChangesetEntry

func (t *Changeset_Email) MergeChangedChangesetEntry(v ChangedChangesetEntry) error

MergeChangedChangesetEntry performs a merge with any union data inside the Changeset_Email, using the provided ChangedChangesetEntry

func (*Changeset_Email) MergeChangesetEmail1

func (t *Changeset_Email) MergeChangesetEmail1(v ChangesetEmail1) error

MergeChangesetEmail1 performs a merge with any union data inside the Changeset_Email, using the provided ChangesetEmail1

func (*Changeset_Email) UnmarshalJSON

func (t *Changeset_Email) UnmarshalJSON(b []byte) error

type Changeset_Name

type Changeset_Name struct {
	// contains filtered or unexported fields
}

Changeset_Name defines model for Changeset.Name.

func (Changeset_Name) AsChangedChangesetEntry

func (t Changeset_Name) AsChangedChangesetEntry() (ChangedChangesetEntry, error)

AsChangedChangesetEntry returns the union data inside the Changeset_Name as a ChangedChangesetEntry

func (Changeset_Name) AsChangesetEntry

func (t Changeset_Name) AsChangesetEntry() (ChangesetEntry, error)

AsChangesetEntry returns the union data inside the Changeset_Name as a ChangesetEntry

func (*Changeset_Name) FromChangedChangesetEntry

func (t *Changeset_Name) FromChangedChangesetEntry(v ChangedChangesetEntry) error

FromChangedChangesetEntry overwrites any union data inside the Changeset_Name as the provided ChangedChangesetEntry

func (*Changeset_Name) FromChangesetEntry

func (t *Changeset_Name) FromChangesetEntry(v ChangesetEntry) error

FromChangesetEntry overwrites any union data inside the Changeset_Name as the provided ChangesetEntry

func (Changeset_Name) MarshalJSON

func (t Changeset_Name) MarshalJSON() ([]byte, error)

func (*Changeset_Name) MergeChangedChangesetEntry

func (t *Changeset_Name) MergeChangedChangesetEntry(v ChangedChangesetEntry) error

MergeChangedChangesetEntry performs a merge with any union data inside the Changeset_Name, using the provided ChangedChangesetEntry

func (*Changeset_Name) MergeChangesetEntry

func (t *Changeset_Name) MergeChangesetEntry(v ChangesetEntry) error

MergeChangesetEntry performs a merge with any union data inside the Changeset_Name, using the provided ChangesetEntry

func (*Changeset_Name) UnmarshalJSON

func (t *Changeset_Name) UnmarshalJSON(b []byte) error

type Changeset_Phone

type Changeset_Phone struct {
	// contains filtered or unexported fields
}

Changeset_Phone Phone number change. You can also inform Castle that the phone changed without sending the values explicitly: `{ "phone": { "changed": true } }`

func (Changeset_Phone) AsChangedChangesetEntry

func (t Changeset_Phone) AsChangedChangesetEntry() (ChangedChangesetEntry, error)

AsChangedChangesetEntry returns the union data inside the Changeset_Phone as a ChangedChangesetEntry

func (Changeset_Phone) AsChangesetPhone1

func (t Changeset_Phone) AsChangesetPhone1() (ChangesetPhone1, error)

AsChangesetPhone1 returns the union data inside the Changeset_Phone as a ChangesetPhone1

func (*Changeset_Phone) FromChangedChangesetEntry

func (t *Changeset_Phone) FromChangedChangesetEntry(v ChangedChangesetEntry) error

FromChangedChangesetEntry overwrites any union data inside the Changeset_Phone as the provided ChangedChangesetEntry

func (*Changeset_Phone) FromChangesetPhone1

func (t *Changeset_Phone) FromChangesetPhone1(v ChangesetPhone1) error

FromChangesetPhone1 overwrites any union data inside the Changeset_Phone as the provided ChangesetPhone1

func (Changeset_Phone) MarshalJSON

func (t Changeset_Phone) MarshalJSON() ([]byte, error)

func (*Changeset_Phone) MergeChangedChangesetEntry

func (t *Changeset_Phone) MergeChangedChangesetEntry(v ChangedChangesetEntry) error

MergeChangedChangesetEntry performs a merge with any union data inside the Changeset_Phone, using the provided ChangedChangesetEntry

func (*Changeset_Phone) MergeChangesetPhone1

func (t *Changeset_Phone) MergeChangesetPhone1(v ChangesetPhone1) error

MergeChangesetPhone1 performs a merge with any union data inside the Changeset_Phone, using the provided ChangesetPhone1

func (*Changeset_Phone) UnmarshalJSON

func (t *Changeset_Phone) UnmarshalJSON(b []byte) error

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) ArchiveListItem

func (c *Client) ArchiveListItem(ctx context.Context, listId string, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

ArchiveListItem Archive a List Item

Archives a List Item.

Corresponds with DELETE /lists/{list_id}/items/{id}/archive (the `ArchiveListItem` operationId).

func (*Client) CountListItems

func (c *Client) CountListItems(ctx context.Context, listId string, body CountListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

CountListItems Count List Items

Takes a body of the `application/json` content type.

Corresponds with POST /lists/{list_id}/items/count (the `CountListItems` operationId).

func (*Client) CountListItemsWithBody

func (c *Client) CountListItemsWithBody(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

CountListItemsWithBody Count List Items

Takes any type of body and a specified content type.

Corresponds with POST /lists/{list_id}/items/count (the `CountListItems` operationId).

func (*Client) CreateList

func (c *Client) CreateList(ctx context.Context, body CreateListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateList Create a new List

Takes a body of the `application/json` content type.

Corresponds with POST /lists (the `CreateList` operationId).

func (*Client) CreateListItem

func (c *Client) CreateListItem(ctx context.Context, listId string, body CreateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateListItem Create a new List Item

Takes a body of the `application/json` content type.

Corresponds with POST /lists/{list_id}/items (the `CreateListItem` operationId).

func (*Client) CreateListItemWithBody

func (c *Client) CreateListItemWithBody(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateListItemWithBody Create a new List Item

Takes any type of body and a specified content type.

Corresponds with POST /lists/{list_id}/items (the `CreateListItem` operationId).

func (*Client) CreateListWithBody

func (c *Client) CreateListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateListWithBody Create a new List

Takes any type of body and a specified content type.

Corresponds with POST /lists (the `CreateList` operationId).

func (*Client) CreateOrUpdateBatchListItems

func (c *Client) CreateOrUpdateBatchListItems(ctx context.Context, listId string, body CreateOrUpdateBatchListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateOrUpdateBatchListItems Create or update multiple List Items

Takes a body of the `application/json` content type.

Corresponds with POST /lists/{list_id}/items/batch (the `CreateOrUpdateBatchListItems` operationId).

func (*Client) CreateOrUpdateBatchListItemsWithBody

func (c *Client) CreateOrUpdateBatchListItemsWithBody(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateOrUpdateBatchListItemsWithBody Create or update multiple List Items

Takes any type of body and a specified content type.

Corresponds with POST /lists/{list_id}/items/batch (the `CreateOrUpdateBatchListItems` operationId).

func (*Client) DeleteList

func (c *Client) DeleteList(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteList Delete List

Corresponds with DELETE /lists/{id} (the `DeleteList` operationId).

func (*Client) DeleteUserPrivacy

func (c *Client) DeleteUserPrivacy(ctx context.Context, body DeleteUserPrivacyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteUserPrivacy Delete User Data

GDPR introduced [Article 17: Right to be forgotten](https://gdpr-info.eu/art-17-gdpr/). This states that users have the right to request that all the data held on them be permanently purged. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can purge that user’s data too. This API endpoint is designed to be used for these User Data Purge Requests. A call to this endpoint will permanently delete the user and their data from our systems.

Takes a body of the `application/json` content type.

Corresponds with DELETE /privacy/users (the `DeleteUserPrivacy` operationId).

func (*Client) DeleteUserPrivacyDeprecated

func (c *Client) DeleteUserPrivacyDeprecated(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteUserPrivacyDeprecated Delete User Data

GDPR introduced [Article 17: Right to be forgotten](https://gdpr-info.eu/art-17-gdpr/). This states that users have the right to request that all the data held on them be permanently purged. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can purge that user’s data too. This API endpoint is designed to be used for these User Data Purge Requests. A call to this endpoint will permanently delete the user and their data from our systems.

Corresponds with DELETE /privacy/users/{id} (the `DeleteUserPrivacyDeprecated` operationId). Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set

func (*Client) DeleteUserPrivacyWithBody

func (c *Client) DeleteUserPrivacyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteUserPrivacyWithBody Delete User Data

GDPR introduced [Article 17: Right to be forgotten](https://gdpr-info.eu/art-17-gdpr/). This states that users have the right to request that all the data held on them be permanently purged. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can purge that user’s data too. This API endpoint is designed to be used for these User Data Purge Requests. A call to this endpoint will permanently delete the user and their data from our systems.

Takes any type of body and a specified content type.

Corresponds with DELETE /privacy/users (the `DeleteUserPrivacy` operationId).

func (*Client) DownloadIpDatasetExport

func (c *Client) DownloadIpDatasetExport(ctx context.Context, dataset string, window string, format string, reqEditors ...RequestEditorFn) (*http.Response, error)

DownloadIpDatasetExport IP Dataset Download

Returns a `302` redirect to a presigned URL for the gzip-compressed IP dataset download.

The presigned URL includes a `Content-Disposition` header so the downloaded file has a meaningful name (e.g. `proxies-7d.jsonl.gz`).

Corresponds with GET /ips/downloads/{dataset}/{window}.{format}.gz (the `DownloadIpDatasetExport` operationId).

func (*Client) Filter

func (c *Client) Filter(ctx context.Context, body FilterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

Filter Filter

Used to block bots and bad traffic early in the request chain, typically at registration. Read more in the [Protecting the Login](https://docs.castle.io/docs/login-activity) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.

**At minimum the `User-Agent` key is required in the `headers` object.**

Takes a body of the `application/json` content type.

Corresponds with POST /filter (the `Filter` operationId).

func (*Client) FilterWithBody

func (c *Client) FilterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

FilterWithBody Filter

Used to block bots and bad traffic early in the request chain, typically at registration. Read more in the [Protecting the Login](https://docs.castle.io/docs/login-activity) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.

**At minimum the `User-Agent` key is required in the `headers` object.**

Takes any type of body and a specified content type.

Corresponds with POST /filter (the `Filter` operationId).

func (*Client) GetEventSchema

func (c *Client) GetEventSchema(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

GetEventSchema Get Events Schema

Get schema for the Event object. Returns all fields with their respective descriptions, types and allowed funcs and operations.

Corresponds with GET /events/schema (the `GetEventSchema` operationId).

func (*Client) GetLatestIpDatasetExportMetadata

func (c *Client) GetLatestIpDatasetExportMetadata(ctx context.Context, dataset string, window string, format string, reqEditors ...RequestEditorFn) (*http.Response, error)

GetLatestIpDatasetExportMetadata IP Dataset Download metadata

Returns metadata for the latest file as response headers, including generation time.

Corresponds with HEAD /ips/downloads/{dataset}/{window}.{format}.gz (the `GetLatestIpDatasetExportMetadata` operationId).

func (*Client) GetList

func (c *Client) GetList(ctx context.Context, id string, params *GetListParams, reqEditors ...RequestEditorFn) (*http.Response, error)

GetList Return a List by ID

Corresponds with GET /lists/{id} (the `GetList` operationId).

func (*Client) GetListItem

func (c *Client) GetListItem(ctx context.Context, listId string, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

GetListItem Fetch a List Item by ID

Corresponds with GET /lists/{list_id}/items/{id} (the `GetListItem` operationId).

func (*Client) GetLists

func (c *Client) GetLists(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

GetLists List all Lists

Corresponds with GET /lists (the `GetLists` operationId).

func (*Client) GetUserPrivacy

func (c *Client) GetUserPrivacy(ctx context.Context, body GetUserPrivacyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

GetUserPrivacy Request User Data

GDPR introduced [Article 15: Right of access by the data subject](https://gdpr-info.eu/art-15-gdpr/). This states that users have the right to request access to the data held on them. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can provide data related to this user as well. This API endpoint is designed to be used for these User Data Access Requests.

### **Important**: before you call this API you first need to [configure your company's privacy email](https://docs.castle.io/docs/gdpr-compliance#user-data-access-requests).

When calling this endpoint, Castle will compile records pertaining to the associated user. When the data compilation is completed, an email containing a data download link will be sent to the configured privacy email address.

Takes a body of the `application/json` content type.

Corresponds with POST /privacy/users (the `GetUserPrivacy` operationId).

func (*Client) GetUserPrivacyDeprecated

func (c *Client) GetUserPrivacyDeprecated(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

GetUserPrivacyDeprecated Request User Data

GDPR introduced [Article 15: Right of access by the data subject](https://gdpr-info.eu/art-15-gdpr/). This states that users have the right to request access to the data held on them. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can provide data related to this user as well. This API endpoint is designed to be used for these User Data Access Requests.

### **Important**: before you call this API you first need to [configure your company's privacy email](https://docs.castle.io/docs/gdpr-compliance#user-data-access-requests).

When calling this endpoint, Castle will compile records pertaining to the associated user. When the data compilation is completed, an email containing a data download link will be sent to the configured privacy email address.

Corresponds with POST /privacy/users/{id} (the `GetUserPrivacyDeprecated` operationId). Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set

func (*Client) GetUserPrivacyWithBody

func (c *Client) GetUserPrivacyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

GetUserPrivacyWithBody Request User Data

GDPR introduced [Article 15: Right of access by the data subject](https://gdpr-info.eu/art-15-gdpr/). This states that users have the right to request access to the data held on them. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can provide data related to this user as well. This API endpoint is designed to be used for these User Data Access Requests.

### **Important**: before you call this API you first need to [configure your company's privacy email](https://docs.castle.io/docs/gdpr-compliance#user-data-access-requests).

When calling this endpoint, Castle will compile records pertaining to the associated user. When the data compilation is completed, an email containing a data download link will be sent to the configured privacy email address.

Takes any type of body and a specified content type.

Corresponds with POST /privacy/users (the `GetUserPrivacy` operationId).

func (*Client) GroupEvents

func (c *Client) GroupEvents(ctx context.Context, body GroupEventsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

GroupEvents Group Events

Aggregate on events.

Takes a body of the `application/json` content type.

Corresponds with POST /events/group (the `GroupEvents` operationId).

func (*Client) GroupEventsWithBody

func (c *Client) GroupEventsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

GroupEventsWithBody Group Events

Aggregate on events.

Takes any type of body and a specified content type.

Corresponds with POST /events/group (the `GroupEvents` operationId).

func (*Client) IpsLookupBatch

func (c *Client) IpsLookupBatch(ctx context.Context, body IpsLookupBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

IpsLookupBatch Look up IPs in a batch

Batch equivalent of `GET /v1/ips/{value}`. Accepts 1-1000 IP addresses, silently deduplicates and drops unparseable inputs, and returns one intelligence record per valid, unique input. `meta.total` and `meta.valid` let callers detect input hygiene issues.

Takes a body of the `application/json` content type.

Corresponds with POST /ips/query (the `IpsLookupBatch` operationId).

func (*Client) IpsLookupBatchWithBody

func (c *Client) IpsLookupBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

IpsLookupBatchWithBody Look up IPs in a batch

Batch equivalent of `GET /v1/ips/{value}`. Accepts 1-1000 IP addresses, silently deduplicates and drops unparseable inputs, and returns one intelligence record per valid, unique input. `meta.total` and `meta.valid` let callers detect input hygiene issues.

Takes any type of body and a specified content type.

Corresponds with POST /ips/query (the `IpsLookupBatch` operationId).

func (*Client) IpsLookupSingle

func (c *Client) IpsLookupSingle(ctx context.Context, value string, reqEditors ...RequestEditorFn) (*http.Response, error)

IpsLookupSingle Look up a single IP

Returns Castle's IP intelligence record for a single IP address: address metadata (family, ASN, coarse geolocation) plus the list of tunnel observations Castle has recorded for it.

Corresponds with GET /ips/{value} (the `IpsLookupSingle` operationId).

func (*Client) QueryEvents

func (c *Client) QueryEvents(ctx context.Context, body QueryEventsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

QueryEvents Search Events

Search for events.

Takes a body of the `application/json` content type.

Corresponds with POST /events/query (the `QueryEvents` operationId).

func (*Client) QueryEventsWithBody

func (c *Client) QueryEventsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

QueryEventsWithBody Search Events

Search for events.

Takes any type of body and a specified content type.

Corresponds with POST /events/query (the `QueryEvents` operationId).

func (*Client) QueryListItems

func (c *Client) QueryListItems(ctx context.Context, listId string, body QueryListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

QueryListItems Search List Items

Takes a body of the `application/json` content type.

Corresponds with POST /lists/{list_id}/items/query (the `QueryListItems` operationId).

func (*Client) QueryListItemsWithBody

func (c *Client) QueryListItemsWithBody(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

QueryListItemsWithBody Search List Items

Takes any type of body and a specified content type.

Corresponds with POST /lists/{list_id}/items/query (the `QueryListItems` operationId).

func (*Client) QueryLists

func (c *Client) QueryLists(ctx context.Context, body QueryListsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

QueryLists Search Lists

Takes a body of the `application/json` content type.

Corresponds with POST /lists/query (the `QueryLists` operationId).

func (*Client) QueryListsWithBody

func (c *Client) QueryListsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

QueryListsWithBody Search Lists

Takes any type of body and a specified content type.

Corresponds with POST /lists/query (the `QueryLists` operationId).

func (*Client) Risk

func (c *Client) Risk(ctx context.Context, body RiskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

Risk Risk

Used to request a risk evaluation from Castle's API. The most obvious use of this is for login requests, where the API can indicate malicious and questionable circumstances. Read more in the [Prevent Account Takeovers](https://docs.castle.io/docs/automate-account-recovery) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.

Takes a body of the `application/json` content type.

Corresponds with POST /risk (the `Risk` operationId).

func (*Client) RiskWithBody

func (c *Client) RiskWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

RiskWithBody Risk

Used to request a risk evaluation from Castle's API. The most obvious use of this is for login requests, where the API can indicate malicious and questionable circumstances. Read more in the [Prevent Account Takeovers](https://docs.castle.io/docs/automate-account-recovery) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.

Takes any type of body and a specified content type.

Corresponds with POST /risk (the `Risk` operationId).

func (*Client) UnarchiveListItem

func (c *Client) UnarchiveListItem(ctx context.Context, listId string, id string, body UnarchiveListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

UnarchiveListItem Unarchive a List Item

Unarchives a List Item.

Takes a body of the `application/json` content type.

Corresponds with PUT /lists/{list_id}/items/{id}/unarchive (the `UnarchiveListItem` operationId).

func (*Client) UnarchiveListItemWithBody

func (c *Client) UnarchiveListItemWithBody(ctx context.Context, listId string, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

UnarchiveListItemWithBody Unarchive a List Item

Unarchives a List Item.

Takes any type of body and a specified content type.

Corresponds with PUT /lists/{list_id}/items/{id}/unarchive (the `UnarchiveListItem` operationId).

func (*Client) UpdateList

func (c *Client) UpdateList(ctx context.Context, id string, body UpdateListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateList Update a List

Takes a body of the `application/json` content type.

Corresponds with PUT /lists/{id} (the `UpdateList` operationId).

func (*Client) UpdateListItem

func (c *Client) UpdateListItem(ctx context.Context, listId string, id string, body UpdateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateListItem Update a List Item

Takes a body of the `application/json` content type.

Corresponds with PUT /lists/{list_id}/items/{id} (the `UpdateListItem` operationId).

func (*Client) UpdateListItemWithBody

func (c *Client) UpdateListItemWithBody(ctx context.Context, listId string, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateListItemWithBody Update a List Item

Takes any type of body and a specified content type.

Corresponds with PUT /lists/{list_id}/items/{id} (the `UpdateListItem` operationId).

func (*Client) UpdateListWithBody

func (c *Client) UpdateListWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateListWithBody Update a List

Takes any type of body and a specified content type.

Corresponds with PUT /lists/{id} (the `UpdateList` operationId).

type ClientInterface

type ClientInterface interface {

	// GroupEventsWithBody Group Events
	//
	// Aggregate on events.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /events/group (the `GroupEvents` operationId).
	GroupEventsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GroupEvents Group Events
	//
	// Aggregate on events.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /events/group (the `GroupEvents` operationId).
	GroupEvents(ctx context.Context, body GroupEventsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// QueryEventsWithBody Search Events
	//
	// Search for events.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /events/query (the `QueryEvents` operationId).
	QueryEventsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// QueryEvents Search Events
	//
	// Search for events.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /events/query (the `QueryEvents` operationId).
	QueryEvents(ctx context.Context, body QueryEventsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetEventSchema Get Events Schema
	//
	// Get schema for the Event object. Returns all fields with their respective descriptions, types and allowed funcs and operations.
	//
	// Corresponds with GET /events/schema (the `GetEventSchema` operationId).
	GetEventSchema(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// FilterWithBody Filter
	//
	// Used to block bots and bad traffic early in the request chain, typically at registration. Read more in the [Protecting the Login](https://docs.castle.io/docs/login-activity) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.
	//
	// **At minimum the `User-Agent` key is required in the `headers` object.**
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /filter (the `Filter` operationId).
	FilterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Filter Filter
	//
	// Used to block bots and bad traffic early in the request chain, typically at registration. Read more in the [Protecting the Login](https://docs.castle.io/docs/login-activity) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.
	//
	// **At minimum the `User-Agent` key is required in the `headers` object.**
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /filter (the `Filter` operationId).
	Filter(ctx context.Context, body FilterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DownloadIpDatasetExport IP Dataset Download
	//
	// Returns a `302` redirect to a presigned URL for the gzip-compressed IP dataset download.
	//
	// The presigned URL includes a `Content-Disposition` header so the downloaded file has a
	// meaningful name (e.g. `proxies-7d.jsonl.gz`).
	//
	// Corresponds with GET /ips/downloads/{dataset}/{window}.{format}.gz (the `DownloadIpDatasetExport` operationId).
	DownloadIpDatasetExport(ctx context.Context, dataset string, window string, format string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetLatestIpDatasetExportMetadata IP Dataset Download metadata
	//
	// Returns metadata for the latest file as response headers, including generation time.
	//
	// Corresponds with HEAD /ips/downloads/{dataset}/{window}.{format}.gz (the `GetLatestIpDatasetExportMetadata` operationId).
	GetLatestIpDatasetExportMetadata(ctx context.Context, dataset string, window string, format string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// IpsLookupBatchWithBody Look up IPs in a batch
	//
	// Batch equivalent of `GET /v1/ips/{value}`. Accepts 1-1000 IP addresses,
	// silently deduplicates and drops unparseable inputs, and returns one
	// intelligence record per valid, unique input. `meta.total` and `meta.valid`
	// let callers detect input hygiene issues.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /ips/query (the `IpsLookupBatch` operationId).
	IpsLookupBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// IpsLookupBatch Look up IPs in a batch
	//
	// Batch equivalent of `GET /v1/ips/{value}`. Accepts 1-1000 IP addresses,
	// silently deduplicates and drops unparseable inputs, and returns one
	// intelligence record per valid, unique input. `meta.total` and `meta.valid`
	// let callers detect input hygiene issues.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /ips/query (the `IpsLookupBatch` operationId).
	IpsLookupBatch(ctx context.Context, body IpsLookupBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// IpsLookupSingle Look up a single IP
	//
	// Returns Castle's IP intelligence record for a single IP address: address
	// metadata (family, ASN, coarse geolocation) plus the list of tunnel
	// observations Castle has recorded for it.
	//
	// Corresponds with GET /ips/{value} (the `IpsLookupSingle` operationId).
	IpsLookupSingle(ctx context.Context, value string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetLists List all Lists
	//
	// Corresponds with GET /lists (the `GetLists` operationId).
	GetLists(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateListWithBody Create a new List
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /lists (the `CreateList` operationId).
	CreateListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateList Create a new List
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /lists (the `CreateList` operationId).
	CreateList(ctx context.Context, body CreateListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// QueryListsWithBody Search Lists
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /lists/query (the `QueryLists` operationId).
	QueryListsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// QueryLists Search Lists
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /lists/query (the `QueryLists` operationId).
	QueryLists(ctx context.Context, body QueryListsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteList Delete List
	//
	// Corresponds with DELETE /lists/{id} (the `DeleteList` operationId).
	DeleteList(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetList Return a List by ID
	//
	// Corresponds with GET /lists/{id} (the `GetList` operationId).
	GetList(ctx context.Context, id string, params *GetListParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateListWithBody Update a List
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PUT /lists/{id} (the `UpdateList` operationId).
	UpdateListWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateList Update a List
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PUT /lists/{id} (the `UpdateList` operationId).
	UpdateList(ctx context.Context, id string, body UpdateListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateListItemWithBody Create a new List Item
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /lists/{list_id}/items (the `CreateListItem` operationId).
	CreateListItemWithBody(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateListItem Create a new List Item
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /lists/{list_id}/items (the `CreateListItem` operationId).
	CreateListItem(ctx context.Context, listId string, body CreateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateOrUpdateBatchListItemsWithBody Create or update multiple List Items
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /lists/{list_id}/items/batch (the `CreateOrUpdateBatchListItems` operationId).
	CreateOrUpdateBatchListItemsWithBody(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateOrUpdateBatchListItems Create or update multiple List Items
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /lists/{list_id}/items/batch (the `CreateOrUpdateBatchListItems` operationId).
	CreateOrUpdateBatchListItems(ctx context.Context, listId string, body CreateOrUpdateBatchListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CountListItemsWithBody Count List Items
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /lists/{list_id}/items/count (the `CountListItems` operationId).
	CountListItemsWithBody(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CountListItems Count List Items
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /lists/{list_id}/items/count (the `CountListItems` operationId).
	CountListItems(ctx context.Context, listId string, body CountListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// QueryListItemsWithBody Search List Items
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /lists/{list_id}/items/query (the `QueryListItems` operationId).
	QueryListItemsWithBody(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// QueryListItems Search List Items
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /lists/{list_id}/items/query (the `QueryListItems` operationId).
	QueryListItems(ctx context.Context, listId string, body QueryListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetListItem Fetch a List Item by ID
	//
	// Corresponds with GET /lists/{list_id}/items/{id} (the `GetListItem` operationId).
	GetListItem(ctx context.Context, listId string, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateListItemWithBody Update a List Item
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PUT /lists/{list_id}/items/{id} (the `UpdateListItem` operationId).
	UpdateListItemWithBody(ctx context.Context, listId string, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateListItem Update a List Item
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PUT /lists/{list_id}/items/{id} (the `UpdateListItem` operationId).
	UpdateListItem(ctx context.Context, listId string, id string, body UpdateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ArchiveListItem Archive a List Item
	//
	// Archives a List Item.
	//
	// Corresponds with DELETE /lists/{list_id}/items/{id}/archive (the `ArchiveListItem` operationId).
	ArchiveListItem(ctx context.Context, listId string, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UnarchiveListItemWithBody Unarchive a List Item
	//
	// Unarchives a List Item.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PUT /lists/{list_id}/items/{id}/unarchive (the `UnarchiveListItem` operationId).
	UnarchiveListItemWithBody(ctx context.Context, listId string, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UnarchiveListItem Unarchive a List Item
	//
	// Unarchives a List Item.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PUT /lists/{list_id}/items/{id}/unarchive (the `UnarchiveListItem` operationId).
	UnarchiveListItem(ctx context.Context, listId string, id string, body UnarchiveListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteUserPrivacyWithBody Delete User Data
	//
	// GDPR introduced [Article 17: Right to be forgotten](https://gdpr-info.eu/art-17-gdpr/). This states that users have the right to request that all the data held on them be permanently purged. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can purge that user’s data too.
	// This API endpoint is designed to be used for these User Data Purge Requests. A call to this endpoint will permanently delete the user and their data from our systems.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with DELETE /privacy/users (the `DeleteUserPrivacy` operationId).
	DeleteUserPrivacyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteUserPrivacy Delete User Data
	//
	// GDPR introduced [Article 17: Right to be forgotten](https://gdpr-info.eu/art-17-gdpr/). This states that users have the right to request that all the data held on them be permanently purged. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can purge that user’s data too.
	// This API endpoint is designed to be used for these User Data Purge Requests. A call to this endpoint will permanently delete the user and their data from our systems.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with DELETE /privacy/users (the `DeleteUserPrivacy` operationId).
	DeleteUserPrivacy(ctx context.Context, body DeleteUserPrivacyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetUserPrivacyWithBody Request User Data
	//
	// GDPR introduced [Article 15: Right of access by the data subject](https://gdpr-info.eu/art-15-gdpr/). This states that users have the right to request access to the data held on them. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can provide data related to this user as well.
	// This API endpoint is designed to be used for these User Data Access Requests.
	//
	// ### **Important**: before you call this API you first need to [configure your company's privacy email](https://docs.castle.io/docs/gdpr-compliance#user-data-access-requests).
	//
	// When calling this endpoint, Castle will compile records pertaining to the associated user. When the data compilation is completed, an email containing a data download link will be sent to the configured privacy email address.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /privacy/users (the `GetUserPrivacy` operationId).
	GetUserPrivacyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetUserPrivacy Request User Data
	//
	// GDPR introduced [Article 15: Right of access by the data subject](https://gdpr-info.eu/art-15-gdpr/). This states that users have the right to request access to the data held on them. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can provide data related to this user as well.
	// This API endpoint is designed to be used for these User Data Access Requests.
	//
	// ### **Important**: before you call this API you first need to [configure your company's privacy email](https://docs.castle.io/docs/gdpr-compliance#user-data-access-requests).
	//
	// When calling this endpoint, Castle will compile records pertaining to the associated user. When the data compilation is completed, an email containing a data download link will be sent to the configured privacy email address.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /privacy/users (the `GetUserPrivacy` operationId).
	GetUserPrivacy(ctx context.Context, body GetUserPrivacyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteUserPrivacyDeprecated Delete User Data
	//
	// GDPR introduced [Article 17: Right to be forgotten](https://gdpr-info.eu/art-17-gdpr/). This states that users have the right to request that all the data held on them be permanently purged. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can purge that user’s data too.
	// This API endpoint is designed to be used for these User Data Purge Requests. A call to this endpoint will permanently delete the user and their data from our systems.
	//
	// Corresponds with DELETE /privacy/users/{id} (the `DeleteUserPrivacyDeprecated` operationId).
	//
	// Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	DeleteUserPrivacyDeprecated(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetUserPrivacyDeprecated Request User Data
	//
	// GDPR introduced [Article 15: Right of access by the data subject](https://gdpr-info.eu/art-15-gdpr/). This states that users have the right to request access to the data held on them. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can provide data related to this user as well.
	// This API endpoint is designed to be used for these User Data Access Requests.
	//
	// ### **Important**: before you call this API you first need to [configure your company's privacy email](https://docs.castle.io/docs/gdpr-compliance#user-data-access-requests).
	//
	// When calling this endpoint, Castle will compile records pertaining to the associated user. When the data compilation is completed, an email containing a data download link will be sent to the configured privacy email address.
	//
	// Corresponds with POST /privacy/users/{id} (the `GetUserPrivacyDeprecated` operationId).
	//
	// Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	GetUserPrivacyDeprecated(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RiskWithBody Risk
	//
	// Used to request a risk evaluation from Castle's API. The most obvious use of this is for login requests, where the API can indicate malicious and questionable circumstances. Read more in the [Prevent Account Takeovers](https://docs.castle.io/docs/automate-account-recovery) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /risk (the `Risk` operationId).
	RiskWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Risk Risk
	//
	// Used to request a risk evaluation from Castle's API. The most obvious use of this is for login requests, where the API can indicate malicious and questionable circumstances. Read more in the [Prevent Account Takeovers](https://docs.castle.io/docs/automate-account-recovery) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /risk (the `Risk` operationId).
	Risk(ctx context.Context, body RiskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) ArchiveListItemWithResponse

func (c *ClientWithResponses) ArchiveListItemWithResponse(ctx context.Context, listId string, id string, reqEditors ...RequestEditorFn) (*ArchiveListItemResponse, error)

ArchiveListItemWithResponse Archive a List Item

Archives a List Item.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /lists/{list_id}/items/{id}/archive (the `ArchiveListItem` operationId).

func (*ClientWithResponses) CountListItemsWithBodyWithResponse

func (c *ClientWithResponses) CountListItemsWithBodyWithResponse(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CountListItemsResponse, error)

CountListItemsWithBodyWithResponse Count List Items

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /lists/{list_id}/items/count (the `CountListItems` operationId).

func (*ClientWithResponses) CountListItemsWithResponse

func (c *ClientWithResponses) CountListItemsWithResponse(ctx context.Context, listId string, body CountListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*CountListItemsResponse, error)

CountListItemsWithResponse Count List Items

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /lists/{list_id}/items/count (the `CountListItems` operationId).

func (*ClientWithResponses) CreateListItemWithBodyWithResponse

func (c *ClientWithResponses) CreateListItemWithBodyWithResponse(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateListItemResponse, error)

CreateListItemWithBodyWithResponse Create a new List Item

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /lists/{list_id}/items (the `CreateListItem` operationId).

func (*ClientWithResponses) CreateListItemWithResponse

func (c *ClientWithResponses) CreateListItemWithResponse(ctx context.Context, listId string, body CreateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateListItemResponse, error)

CreateListItemWithResponse Create a new List Item

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /lists/{list_id}/items (the `CreateListItem` operationId).

func (*ClientWithResponses) CreateListWithBodyWithResponse

func (c *ClientWithResponses) CreateListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateListResponse, error)

CreateListWithBodyWithResponse Create a new List

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /lists (the `CreateList` operationId).

func (*ClientWithResponses) CreateListWithResponse

func (c *ClientWithResponses) CreateListWithResponse(ctx context.Context, body CreateListJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateListResponse, error)

CreateListWithResponse Create a new List

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /lists (the `CreateList` operationId).

func (*ClientWithResponses) CreateOrUpdateBatchListItemsWithBodyWithResponse

func (c *ClientWithResponses) CreateOrUpdateBatchListItemsWithBodyWithResponse(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrUpdateBatchListItemsResponse, error)

CreateOrUpdateBatchListItemsWithBodyWithResponse Create or update multiple List Items

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /lists/{list_id}/items/batch (the `CreateOrUpdateBatchListItems` operationId).

func (*ClientWithResponses) CreateOrUpdateBatchListItemsWithResponse

func (c *ClientWithResponses) CreateOrUpdateBatchListItemsWithResponse(ctx context.Context, listId string, body CreateOrUpdateBatchListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrUpdateBatchListItemsResponse, error)

CreateOrUpdateBatchListItemsWithResponse Create or update multiple List Items

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /lists/{list_id}/items/batch (the `CreateOrUpdateBatchListItems` operationId).

func (*ClientWithResponses) DeleteListWithResponse

func (c *ClientWithResponses) DeleteListWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteListResponse, error)

DeleteListWithResponse Delete List

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /lists/{id} (the `DeleteList` operationId).

func (*ClientWithResponses) DeleteUserPrivacyDeprecatedWithResponse deprecated

func (c *ClientWithResponses) DeleteUserPrivacyDeprecatedWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteUserPrivacyDeprecatedResponse, error)

DeleteUserPrivacyDeprecatedWithResponse Delete User Data

GDPR introduced [Article 17: Right to be forgotten](https://gdpr-info.eu/art-17-gdpr/). This states that users have the right to request that all the data held on them be permanently purged. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can purge that user’s data too. This API endpoint is designed to be used for these User Data Purge Requests. A call to this endpoint will permanently delete the user and their data from our systems.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /privacy/users/{id} (the `DeleteUserPrivacyDeprecated` operationId).

Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set

func (*ClientWithResponses) DeleteUserPrivacyWithBodyWithResponse

func (c *ClientWithResponses) DeleteUserPrivacyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteUserPrivacyResponse, error)

DeleteUserPrivacyWithBodyWithResponse Delete User Data

GDPR introduced [Article 17: Right to be forgotten](https://gdpr-info.eu/art-17-gdpr/). This states that users have the right to request that all the data held on them be permanently purged. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can purge that user’s data too. This API endpoint is designed to be used for these User Data Purge Requests. A call to this endpoint will permanently delete the user and their data from our systems.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with DELETE /privacy/users (the `DeleteUserPrivacy` operationId).

func (*ClientWithResponses) DeleteUserPrivacyWithResponse

func (c *ClientWithResponses) DeleteUserPrivacyWithResponse(ctx context.Context, body DeleteUserPrivacyJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteUserPrivacyResponse, error)

DeleteUserPrivacyWithResponse Delete User Data

GDPR introduced [Article 17: Right to be forgotten](https://gdpr-info.eu/art-17-gdpr/). This states that users have the right to request that all the data held on them be permanently purged. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can purge that user’s data too. This API endpoint is designed to be used for these User Data Purge Requests. A call to this endpoint will permanently delete the user and their data from our systems.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with DELETE /privacy/users (the `DeleteUserPrivacy` operationId).

func (*ClientWithResponses) DownloadIpDatasetExportWithResponse

func (c *ClientWithResponses) DownloadIpDatasetExportWithResponse(ctx context.Context, dataset string, window string, format string, reqEditors ...RequestEditorFn) (*DownloadIpDatasetExportResponse, error)

DownloadIpDatasetExportWithResponse IP Dataset Download

Returns a `302` redirect to a presigned URL for the gzip-compressed IP dataset download.

The presigned URL includes a `Content-Disposition` header so the downloaded file has a meaningful name (e.g. `proxies-7d.jsonl.gz`).

Returns a wrapper object for the known response body format(s).

Corresponds with GET /ips/downloads/{dataset}/{window}.{format}.gz (the `DownloadIpDatasetExport` operationId).

func (*ClientWithResponses) FilterWithBodyWithResponse

func (c *ClientWithResponses) FilterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FilterResponse, error)

FilterWithBodyWithResponse Filter

Used to block bots and bad traffic early in the request chain, typically at registration. Read more in the [Protecting the Login](https://docs.castle.io/docs/login-activity) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.

**At minimum the `User-Agent` key is required in the `headers` object.**

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /filter (the `Filter` operationId).

func (*ClientWithResponses) FilterWithResponse

func (c *ClientWithResponses) FilterWithResponse(ctx context.Context, body FilterJSONRequestBody, reqEditors ...RequestEditorFn) (*FilterResponse, error)

FilterWithResponse Filter

Used to block bots and bad traffic early in the request chain, typically at registration. Read more in the [Protecting the Login](https://docs.castle.io/docs/login-activity) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.

**At minimum the `User-Agent` key is required in the `headers` object.**

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /filter (the `Filter` operationId).

func (*ClientWithResponses) GetEventSchemaWithResponse

func (c *ClientWithResponses) GetEventSchemaWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEventSchemaResponse, error)

GetEventSchemaWithResponse Get Events Schema

Get schema for the Event object. Returns all fields with their respective descriptions, types and allowed funcs and operations.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /events/schema (the `GetEventSchema` operationId).

func (*ClientWithResponses) GetLatestIpDatasetExportMetadataWithResponse

func (c *ClientWithResponses) GetLatestIpDatasetExportMetadataWithResponse(ctx context.Context, dataset string, window string, format string, reqEditors ...RequestEditorFn) (*GetLatestIpDatasetExportMetadataResponse, error)

GetLatestIpDatasetExportMetadataWithResponse IP Dataset Download metadata

Returns metadata for the latest file as response headers, including generation time.

Returns a wrapper object for the known response body format(s).

Corresponds with HEAD /ips/downloads/{dataset}/{window}.{format}.gz (the `GetLatestIpDatasetExportMetadata` operationId).

func (*ClientWithResponses) GetListItemWithResponse

func (c *ClientWithResponses) GetListItemWithResponse(ctx context.Context, listId string, id string, reqEditors ...RequestEditorFn) (*GetListItemResponse, error)

GetListItemWithResponse Fetch a List Item by ID

Returns a wrapper object for the known response body format(s).

Corresponds with GET /lists/{list_id}/items/{id} (the `GetListItem` operationId).

func (*ClientWithResponses) GetListWithResponse

func (c *ClientWithResponses) GetListWithResponse(ctx context.Context, id string, params *GetListParams, reqEditors ...RequestEditorFn) (*GetListResponse, error)

GetListWithResponse Return a List by ID

Returns a wrapper object for the known response body format(s).

Corresponds with GET /lists/{id} (the `GetList` operationId).

func (*ClientWithResponses) GetListsWithResponse

func (c *ClientWithResponses) GetListsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetListsResponse, error)

GetListsWithResponse List all Lists

Returns a wrapper object for the known response body format(s).

Corresponds with GET /lists (the `GetLists` operationId).

func (*ClientWithResponses) GetUserPrivacyDeprecatedWithResponse deprecated

func (c *ClientWithResponses) GetUserPrivacyDeprecatedWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetUserPrivacyDeprecatedResponse, error)

GetUserPrivacyDeprecatedWithResponse Request User Data

GDPR introduced [Article 15: Right of access by the data subject](https://gdpr-info.eu/art-15-gdpr/). This states that users have the right to request access to the data held on them. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can provide data related to this user as well. This API endpoint is designed to be used for these User Data Access Requests.

### **Important**: before you call this API you first need to [configure your company's privacy email](https://docs.castle.io/docs/gdpr-compliance#user-data-access-requests).

When calling this endpoint, Castle will compile records pertaining to the associated user. When the data compilation is completed, an email containing a data download link will be sent to the configured privacy email address.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /privacy/users/{id} (the `GetUserPrivacyDeprecated` operationId).

Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set

func (*ClientWithResponses) GetUserPrivacyWithBodyWithResponse

func (c *ClientWithResponses) GetUserPrivacyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetUserPrivacyResponse, error)

GetUserPrivacyWithBodyWithResponse Request User Data

GDPR introduced [Article 15: Right of access by the data subject](https://gdpr-info.eu/art-15-gdpr/). This states that users have the right to request access to the data held on them. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can provide data related to this user as well. This API endpoint is designed to be used for these User Data Access Requests.

### **Important**: before you call this API you first need to [configure your company's privacy email](https://docs.castle.io/docs/gdpr-compliance#user-data-access-requests).

When calling this endpoint, Castle will compile records pertaining to the associated user. When the data compilation is completed, an email containing a data download link will be sent to the configured privacy email address.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /privacy/users (the `GetUserPrivacy` operationId).

func (*ClientWithResponses) GetUserPrivacyWithResponse

func (c *ClientWithResponses) GetUserPrivacyWithResponse(ctx context.Context, body GetUserPrivacyJSONRequestBody, reqEditors ...RequestEditorFn) (*GetUserPrivacyResponse, error)

GetUserPrivacyWithResponse Request User Data

GDPR introduced [Article 15: Right of access by the data subject](https://gdpr-info.eu/art-15-gdpr/). This states that users have the right to request access to the data held on them. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can provide data related to this user as well. This API endpoint is designed to be used for these User Data Access Requests.

### **Important**: before you call this API you first need to [configure your company's privacy email](https://docs.castle.io/docs/gdpr-compliance#user-data-access-requests).

When calling this endpoint, Castle will compile records pertaining to the associated user. When the data compilation is completed, an email containing a data download link will be sent to the configured privacy email address.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /privacy/users (the `GetUserPrivacy` operationId).

func (*ClientWithResponses) GroupEventsWithBodyWithResponse

func (c *ClientWithResponses) GroupEventsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GroupEventsResponse, error)

GroupEventsWithBodyWithResponse Group Events

Aggregate on events.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /events/group (the `GroupEvents` operationId).

func (*ClientWithResponses) GroupEventsWithResponse

func (c *ClientWithResponses) GroupEventsWithResponse(ctx context.Context, body GroupEventsJSONRequestBody, reqEditors ...RequestEditorFn) (*GroupEventsResponse, error)

GroupEventsWithResponse Group Events

Aggregate on events.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /events/group (the `GroupEvents` operationId).

func (*ClientWithResponses) IpsLookupBatchWithBodyWithResponse

func (c *ClientWithResponses) IpsLookupBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IpsLookupBatchResponse, error)

IpsLookupBatchWithBodyWithResponse Look up IPs in a batch

Batch equivalent of `GET /v1/ips/{value}`. Accepts 1-1000 IP addresses, silently deduplicates and drops unparseable inputs, and returns one intelligence record per valid, unique input. `meta.total` and `meta.valid` let callers detect input hygiene issues.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /ips/query (the `IpsLookupBatch` operationId).

func (*ClientWithResponses) IpsLookupBatchWithResponse

func (c *ClientWithResponses) IpsLookupBatchWithResponse(ctx context.Context, body IpsLookupBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*IpsLookupBatchResponse, error)

IpsLookupBatchWithResponse Look up IPs in a batch

Batch equivalent of `GET /v1/ips/{value}`. Accepts 1-1000 IP addresses, silently deduplicates and drops unparseable inputs, and returns one intelligence record per valid, unique input. `meta.total` and `meta.valid` let callers detect input hygiene issues.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /ips/query (the `IpsLookupBatch` operationId).

func (*ClientWithResponses) IpsLookupSingleWithResponse

func (c *ClientWithResponses) IpsLookupSingleWithResponse(ctx context.Context, value string, reqEditors ...RequestEditorFn) (*IpsLookupSingleResponse, error)

IpsLookupSingleWithResponse Look up a single IP

Returns Castle's IP intelligence record for a single IP address: address metadata (family, ASN, coarse geolocation) plus the list of tunnel observations Castle has recorded for it.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /ips/{value} (the `IpsLookupSingle` operationId).

func (*ClientWithResponses) QueryEventsWithBodyWithResponse

func (c *ClientWithResponses) QueryEventsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QueryEventsResponse, error)

QueryEventsWithBodyWithResponse Search Events

Search for events.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /events/query (the `QueryEvents` operationId).

func (*ClientWithResponses) QueryEventsWithResponse

func (c *ClientWithResponses) QueryEventsWithResponse(ctx context.Context, body QueryEventsJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryEventsResponse, error)

QueryEventsWithResponse Search Events

Search for events.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /events/query (the `QueryEvents` operationId).

func (*ClientWithResponses) QueryListItemsWithBodyWithResponse

func (c *ClientWithResponses) QueryListItemsWithBodyWithResponse(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QueryListItemsResponse, error)

QueryListItemsWithBodyWithResponse Search List Items

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /lists/{list_id}/items/query (the `QueryListItems` operationId).

func (*ClientWithResponses) QueryListItemsWithResponse

func (c *ClientWithResponses) QueryListItemsWithResponse(ctx context.Context, listId string, body QueryListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryListItemsResponse, error)

QueryListItemsWithResponse Search List Items

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /lists/{list_id}/items/query (the `QueryListItems` operationId).

func (*ClientWithResponses) QueryListsWithBodyWithResponse

func (c *ClientWithResponses) QueryListsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QueryListsResponse, error)

QueryListsWithBodyWithResponse Search Lists

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /lists/query (the `QueryLists` operationId).

func (*ClientWithResponses) QueryListsWithResponse

func (c *ClientWithResponses) QueryListsWithResponse(ctx context.Context, body QueryListsJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryListsResponse, error)

QueryListsWithResponse Search Lists

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /lists/query (the `QueryLists` operationId).

func (*ClientWithResponses) RiskWithBodyWithResponse

func (c *ClientWithResponses) RiskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RiskResponse, error)

RiskWithBodyWithResponse Risk

Used to request a risk evaluation from Castle's API. The most obvious use of this is for login requests, where the API can indicate malicious and questionable circumstances. Read more in the [Prevent Account Takeovers](https://docs.castle.io/docs/automate-account-recovery) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /risk (the `Risk` operationId).

func (*ClientWithResponses) RiskWithResponse

func (c *ClientWithResponses) RiskWithResponse(ctx context.Context, body RiskJSONRequestBody, reqEditors ...RequestEditorFn) (*RiskResponse, error)

RiskWithResponse Risk

Used to request a risk evaluation from Castle's API. The most obvious use of this is for login requests, where the API can indicate malicious and questionable circumstances. Read more in the [Prevent Account Takeovers](https://docs.castle.io/docs/automate-account-recovery) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /risk (the `Risk` operationId).

func (*ClientWithResponses) UnarchiveListItemWithBodyWithResponse

func (c *ClientWithResponses) UnarchiveListItemWithBodyWithResponse(ctx context.Context, listId string, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UnarchiveListItemResponse, error)

UnarchiveListItemWithBodyWithResponse Unarchive a List Item

Unarchives a List Item.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /lists/{list_id}/items/{id}/unarchive (the `UnarchiveListItem` operationId).

func (*ClientWithResponses) UnarchiveListItemWithResponse

func (c *ClientWithResponses) UnarchiveListItemWithResponse(ctx context.Context, listId string, id string, body UnarchiveListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*UnarchiveListItemResponse, error)

UnarchiveListItemWithResponse Unarchive a List Item

Unarchives a List Item.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /lists/{list_id}/items/{id}/unarchive (the `UnarchiveListItem` operationId).

func (*ClientWithResponses) UpdateListItemWithBodyWithResponse

func (c *ClientWithResponses) UpdateListItemWithBodyWithResponse(ctx context.Context, listId string, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateListItemResponse, error)

UpdateListItemWithBodyWithResponse Update a List Item

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /lists/{list_id}/items/{id} (the `UpdateListItem` operationId).

func (*ClientWithResponses) UpdateListItemWithResponse

func (c *ClientWithResponses) UpdateListItemWithResponse(ctx context.Context, listId string, id string, body UpdateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateListItemResponse, error)

UpdateListItemWithResponse Update a List Item

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /lists/{list_id}/items/{id} (the `UpdateListItem` operationId).

func (*ClientWithResponses) UpdateListWithBodyWithResponse

func (c *ClientWithResponses) UpdateListWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateListResponse, error)

UpdateListWithBodyWithResponse Update a List

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /lists/{id} (the `UpdateList` operationId).

func (*ClientWithResponses) UpdateListWithResponse

func (c *ClientWithResponses) UpdateListWithResponse(ctx context.Context, id string, body UpdateListJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateListResponse, error)

UpdateListWithResponse Update a List

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /lists/{id} (the `UpdateList` operationId).

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {

	// GroupEventsWithBodyWithResponse Group Events
	//
	// Aggregate on events.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /events/group (the `GroupEvents` operationId).
	GroupEventsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GroupEventsResponse, error)

	// GroupEventsWithResponse Group Events
	//
	// Aggregate on events.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /events/group (the `GroupEvents` operationId).
	GroupEventsWithResponse(ctx context.Context, body GroupEventsJSONRequestBody, reqEditors ...RequestEditorFn) (*GroupEventsResponse, error)

	// QueryEventsWithBodyWithResponse Search Events
	//
	// Search for events.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /events/query (the `QueryEvents` operationId).
	QueryEventsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QueryEventsResponse, error)

	// QueryEventsWithResponse Search Events
	//
	// Search for events.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /events/query (the `QueryEvents` operationId).
	QueryEventsWithResponse(ctx context.Context, body QueryEventsJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryEventsResponse, error)

	// GetEventSchemaWithResponse Get Events Schema
	//
	// Get schema for the Event object. Returns all fields with their respective descriptions, types and allowed funcs and operations.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /events/schema (the `GetEventSchema` operationId).
	GetEventSchemaWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEventSchemaResponse, error)

	// FilterWithBodyWithResponse Filter
	//
	// Used to block bots and bad traffic early in the request chain, typically at registration. Read more in the [Protecting the Login](https://docs.castle.io/docs/login-activity) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.
	//
	// **At minimum the `User-Agent` key is required in the `headers` object.**
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /filter (the `Filter` operationId).
	FilterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FilterResponse, error)

	// FilterWithResponse Filter
	//
	// Used to block bots and bad traffic early in the request chain, typically at registration. Read more in the [Protecting the Login](https://docs.castle.io/docs/login-activity) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.
	//
	// **At minimum the `User-Agent` key is required in the `headers` object.**
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /filter (the `Filter` operationId).
	FilterWithResponse(ctx context.Context, body FilterJSONRequestBody, reqEditors ...RequestEditorFn) (*FilterResponse, error)

	// DownloadIpDatasetExportWithResponse IP Dataset Download
	//
	// Returns a `302` redirect to a presigned URL for the gzip-compressed IP dataset download.
	//
	// The presigned URL includes a `Content-Disposition` header so the downloaded file has a
	// meaningful name (e.g. `proxies-7d.jsonl.gz`).
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /ips/downloads/{dataset}/{window}.{format}.gz (the `DownloadIpDatasetExport` operationId).
	DownloadIpDatasetExportWithResponse(ctx context.Context, dataset string, window string, format string, reqEditors ...RequestEditorFn) (*DownloadIpDatasetExportResponse, error)

	// GetLatestIpDatasetExportMetadataWithResponse IP Dataset Download metadata
	//
	// Returns metadata for the latest file as response headers, including generation time.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with HEAD /ips/downloads/{dataset}/{window}.{format}.gz (the `GetLatestIpDatasetExportMetadata` operationId).
	GetLatestIpDatasetExportMetadataWithResponse(ctx context.Context, dataset string, window string, format string, reqEditors ...RequestEditorFn) (*GetLatestIpDatasetExportMetadataResponse, error)

	// IpsLookupBatchWithBodyWithResponse Look up IPs in a batch
	//
	// Batch equivalent of `GET /v1/ips/{value}`. Accepts 1-1000 IP addresses,
	// silently deduplicates and drops unparseable inputs, and returns one
	// intelligence record per valid, unique input. `meta.total` and `meta.valid`
	// let callers detect input hygiene issues.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /ips/query (the `IpsLookupBatch` operationId).
	IpsLookupBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IpsLookupBatchResponse, error)

	// IpsLookupBatchWithResponse Look up IPs in a batch
	//
	// Batch equivalent of `GET /v1/ips/{value}`. Accepts 1-1000 IP addresses,
	// silently deduplicates and drops unparseable inputs, and returns one
	// intelligence record per valid, unique input. `meta.total` and `meta.valid`
	// let callers detect input hygiene issues.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /ips/query (the `IpsLookupBatch` operationId).
	IpsLookupBatchWithResponse(ctx context.Context, body IpsLookupBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*IpsLookupBatchResponse, error)

	// IpsLookupSingleWithResponse Look up a single IP
	//
	// Returns Castle's IP intelligence record for a single IP address: address
	// metadata (family, ASN, coarse geolocation) plus the list of tunnel
	// observations Castle has recorded for it.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /ips/{value} (the `IpsLookupSingle` operationId).
	IpsLookupSingleWithResponse(ctx context.Context, value string, reqEditors ...RequestEditorFn) (*IpsLookupSingleResponse, error)

	// GetListsWithResponse List all Lists
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /lists (the `GetLists` operationId).
	GetListsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetListsResponse, error)

	// CreateListWithBodyWithResponse Create a new List
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /lists (the `CreateList` operationId).
	CreateListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateListResponse, error)

	// CreateListWithResponse Create a new List
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /lists (the `CreateList` operationId).
	CreateListWithResponse(ctx context.Context, body CreateListJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateListResponse, error)

	// QueryListsWithBodyWithResponse Search Lists
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /lists/query (the `QueryLists` operationId).
	QueryListsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QueryListsResponse, error)

	// QueryListsWithResponse Search Lists
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /lists/query (the `QueryLists` operationId).
	QueryListsWithResponse(ctx context.Context, body QueryListsJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryListsResponse, error)

	// DeleteListWithResponse Delete List
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /lists/{id} (the `DeleteList` operationId).
	DeleteListWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteListResponse, error)

	// GetListWithResponse Return a List by ID
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /lists/{id} (the `GetList` operationId).
	GetListWithResponse(ctx context.Context, id string, params *GetListParams, reqEditors ...RequestEditorFn) (*GetListResponse, error)

	// UpdateListWithBodyWithResponse Update a List
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /lists/{id} (the `UpdateList` operationId).
	UpdateListWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateListResponse, error)

	// UpdateListWithResponse Update a List
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /lists/{id} (the `UpdateList` operationId).
	UpdateListWithResponse(ctx context.Context, id string, body UpdateListJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateListResponse, error)

	// CreateListItemWithBodyWithResponse Create a new List Item
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /lists/{list_id}/items (the `CreateListItem` operationId).
	CreateListItemWithBodyWithResponse(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateListItemResponse, error)

	// CreateListItemWithResponse Create a new List Item
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /lists/{list_id}/items (the `CreateListItem` operationId).
	CreateListItemWithResponse(ctx context.Context, listId string, body CreateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateListItemResponse, error)

	// CreateOrUpdateBatchListItemsWithBodyWithResponse Create or update multiple List Items
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /lists/{list_id}/items/batch (the `CreateOrUpdateBatchListItems` operationId).
	CreateOrUpdateBatchListItemsWithBodyWithResponse(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrUpdateBatchListItemsResponse, error)

	// CreateOrUpdateBatchListItemsWithResponse Create or update multiple List Items
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /lists/{list_id}/items/batch (the `CreateOrUpdateBatchListItems` operationId).
	CreateOrUpdateBatchListItemsWithResponse(ctx context.Context, listId string, body CreateOrUpdateBatchListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrUpdateBatchListItemsResponse, error)

	// CountListItemsWithBodyWithResponse Count List Items
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /lists/{list_id}/items/count (the `CountListItems` operationId).
	CountListItemsWithBodyWithResponse(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CountListItemsResponse, error)

	// CountListItemsWithResponse Count List Items
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /lists/{list_id}/items/count (the `CountListItems` operationId).
	CountListItemsWithResponse(ctx context.Context, listId string, body CountListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*CountListItemsResponse, error)

	// QueryListItemsWithBodyWithResponse Search List Items
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /lists/{list_id}/items/query (the `QueryListItems` operationId).
	QueryListItemsWithBodyWithResponse(ctx context.Context, listId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QueryListItemsResponse, error)

	// QueryListItemsWithResponse Search List Items
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /lists/{list_id}/items/query (the `QueryListItems` operationId).
	QueryListItemsWithResponse(ctx context.Context, listId string, body QueryListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryListItemsResponse, error)

	// GetListItemWithResponse Fetch a List Item by ID
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /lists/{list_id}/items/{id} (the `GetListItem` operationId).
	GetListItemWithResponse(ctx context.Context, listId string, id string, reqEditors ...RequestEditorFn) (*GetListItemResponse, error)

	// UpdateListItemWithBodyWithResponse Update a List Item
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /lists/{list_id}/items/{id} (the `UpdateListItem` operationId).
	UpdateListItemWithBodyWithResponse(ctx context.Context, listId string, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateListItemResponse, error)

	// UpdateListItemWithResponse Update a List Item
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /lists/{list_id}/items/{id} (the `UpdateListItem` operationId).
	UpdateListItemWithResponse(ctx context.Context, listId string, id string, body UpdateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateListItemResponse, error)

	// ArchiveListItemWithResponse Archive a List Item
	//
	// Archives a List Item.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /lists/{list_id}/items/{id}/archive (the `ArchiveListItem` operationId).
	ArchiveListItemWithResponse(ctx context.Context, listId string, id string, reqEditors ...RequestEditorFn) (*ArchiveListItemResponse, error)

	// UnarchiveListItemWithBodyWithResponse Unarchive a List Item
	//
	// Unarchives a List Item.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /lists/{list_id}/items/{id}/unarchive (the `UnarchiveListItem` operationId).
	UnarchiveListItemWithBodyWithResponse(ctx context.Context, listId string, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UnarchiveListItemResponse, error)

	// UnarchiveListItemWithResponse Unarchive a List Item
	//
	// Unarchives a List Item.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /lists/{list_id}/items/{id}/unarchive (the `UnarchiveListItem` operationId).
	UnarchiveListItemWithResponse(ctx context.Context, listId string, id string, body UnarchiveListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*UnarchiveListItemResponse, error)

	// DeleteUserPrivacyWithBodyWithResponse Delete User Data
	//
	// GDPR introduced [Article 17: Right to be forgotten](https://gdpr-info.eu/art-17-gdpr/). This states that users have the right to request that all the data held on them be permanently purged. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can purge that user’s data too.
	// This API endpoint is designed to be used for these User Data Purge Requests. A call to this endpoint will permanently delete the user and their data from our systems.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /privacy/users (the `DeleteUserPrivacy` operationId).
	DeleteUserPrivacyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteUserPrivacyResponse, error)

	// DeleteUserPrivacyWithResponse Delete User Data
	//
	// GDPR introduced [Article 17: Right to be forgotten](https://gdpr-info.eu/art-17-gdpr/). This states that users have the right to request that all the data held on them be permanently purged. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can purge that user’s data too.
	// This API endpoint is designed to be used for these User Data Purge Requests. A call to this endpoint will permanently delete the user and their data from our systems.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /privacy/users (the `DeleteUserPrivacy` operationId).
	DeleteUserPrivacyWithResponse(ctx context.Context, body DeleteUserPrivacyJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteUserPrivacyResponse, error)

	// GetUserPrivacyWithBodyWithResponse Request User Data
	//
	// GDPR introduced [Article 15: Right of access by the data subject](https://gdpr-info.eu/art-15-gdpr/). This states that users have the right to request access to the data held on them. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can provide data related to this user as well.
	// This API endpoint is designed to be used for these User Data Access Requests.
	//
	// ### **Important**: before you call this API you first need to [configure your company's privacy email](https://docs.castle.io/docs/gdpr-compliance#user-data-access-requests).
	//
	// When calling this endpoint, Castle will compile records pertaining to the associated user. When the data compilation is completed, an email containing a data download link will be sent to the configured privacy email address.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /privacy/users (the `GetUserPrivacy` operationId).
	GetUserPrivacyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetUserPrivacyResponse, error)

	// GetUserPrivacyWithResponse Request User Data
	//
	// GDPR introduced [Article 15: Right of access by the data subject](https://gdpr-info.eu/art-15-gdpr/). This states that users have the right to request access to the data held on them. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can provide data related to this user as well.
	// This API endpoint is designed to be used for these User Data Access Requests.
	//
	// ### **Important**: before you call this API you first need to [configure your company's privacy email](https://docs.castle.io/docs/gdpr-compliance#user-data-access-requests).
	//
	// When calling this endpoint, Castle will compile records pertaining to the associated user. When the data compilation is completed, an email containing a data download link will be sent to the configured privacy email address.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /privacy/users (the `GetUserPrivacy` operationId).
	GetUserPrivacyWithResponse(ctx context.Context, body GetUserPrivacyJSONRequestBody, reqEditors ...RequestEditorFn) (*GetUserPrivacyResponse, error)

	// DeleteUserPrivacyDeprecatedWithResponse Delete User Data
	//
	// GDPR introduced [Article 17: Right to be forgotten](https://gdpr-info.eu/art-17-gdpr/). This states that users have the right to request that all the data held on them be permanently purged. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can purge that user’s data too.
	// This API endpoint is designed to be used for these User Data Purge Requests. A call to this endpoint will permanently delete the user and their data from our systems.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /privacy/users/{id} (the `DeleteUserPrivacyDeprecated` operationId).
	//
	// Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	DeleteUserPrivacyDeprecatedWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteUserPrivacyDeprecatedResponse, error)

	// GetUserPrivacyDeprecatedWithResponse Request User Data
	//
	// GDPR introduced [Article 15: Right of access by the data subject](https://gdpr-info.eu/art-15-gdpr/). This states that users have the right to request access to the data held on them. If you receive this request from your user, you may also need to forward the request to your vendors, such as Castle, so that the vendor can provide data related to this user as well.
	// This API endpoint is designed to be used for these User Data Access Requests.
	//
	// ### **Important**: before you call this API you first need to [configure your company's privacy email](https://docs.castle.io/docs/gdpr-compliance#user-data-access-requests).
	//
	// When calling this endpoint, Castle will compile records pertaining to the associated user. When the data compilation is completed, an email containing a data download link will be sent to the configured privacy email address.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /privacy/users/{id} (the `GetUserPrivacyDeprecated` operationId).
	//
	// Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	GetUserPrivacyDeprecatedWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetUserPrivacyDeprecatedResponse, error)

	// RiskWithBodyWithResponse Risk
	//
	// Used to request a risk evaluation from Castle's API. The most obvious use of this is for login requests, where the API can indicate malicious and questionable circumstances. Read more in the [Prevent Account Takeovers](https://docs.castle.io/docs/automate-account-recovery) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /risk (the `Risk` operationId).
	RiskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RiskResponse, error)

	// RiskWithResponse Risk
	//
	// Used to request a risk evaluation from Castle's API. The most obvious use of this is for login requests, where the API can indicate malicious and questionable circumstances. Read more in the [Prevent Account Takeovers](https://docs.castle.io/docs/automate-account-recovery) section. See the [List of Recognized Events](https://docs.castle.io/docs/events) for supported events.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /risk (the `Risk` operationId).
	RiskWithResponse(ctx context.Context, body RiskJSONRequestBody, reqEditors ...RequestEditorFn) (*RiskResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Column

type Column struct {
	// Field Field name. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	Field string `json:"field"`

	// Func Aggregation function to be applied on the field
	//
	// Example: $sum
	Func *Func `json:"func,omitempty"`

	// Name Display name of the column
	//
	// Example: Sum of Risk
	Name string `json:"name"`

	// Options Options specific for each aggregation function
	Options *map[string]interface{} `json:"options,omitempty"`

	// Transform Describes how to transform the column value. The transformation is applied before the `func` aggregation function.
	Transform *Transform `json:"transform,omitempty"`
}

Column defines model for Column.

type Context

type Context struct {
	// Headers The Headers object of the originating request.
	// For best results, it's recommended to forward all headers from the originating request. At minimum, the following headers should be forwarded: `Host`, `User-Agent`, `Accept`, `Accept-Encoding`, `Accept-Language`.
	//
	// For [AI agent identification](https://docs.castle.io/docs/ai-agent-identification), also forward `Signature-Input`, `Signature` and `Signature-Agent`, and the originally requested `Host`.
	//
	//
	// Example: [["User-Agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"],["Accept-Encoding","gzip, deflate, br"],["Accept-Language","en-us"],["Accept","text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"],["Connection","close"],["Host","castle.io"]]
	Headers [][]Context_Headers_Item `json:"headers"`

	// Ip The IPv4 or IPv6 address of the originating request. Must be a valid, public IP. Supports ipv4
	// and ipv6
	//
	//
	// Example: 211.96.77.55
	Ip string `json:"ip"`
}

Context The context object contains information about the originating request, including IP address and HTTP headers.

**Note:** This field can be skipped by setting `skip_context_validation` to `true`.

type ContextHeaders0

type ContextHeaders0 = string

ContextHeaders0 defines model for Context.Headers.0.

type ContextHeaders1

type ContextHeaders1 = bool

ContextHeaders1 defines model for Context.Headers.1.

type ContextHeaders2

type ContextHeaders2 = int

ContextHeaders2 defines model for Context.Headers.2.

type Context_Headers_Item

type Context_Headers_Item struct {
	// contains filtered or unexported fields
}

Context_Headers_Item defines model for Context.headers.Item.

func (Context_Headers_Item) AsContextHeaders0

func (t Context_Headers_Item) AsContextHeaders0() (ContextHeaders0, error)

AsContextHeaders0 returns the union data inside the Context_Headers_Item as a ContextHeaders0

func (Context_Headers_Item) AsContextHeaders1

func (t Context_Headers_Item) AsContextHeaders1() (ContextHeaders1, error)

AsContextHeaders1 returns the union data inside the Context_Headers_Item as a ContextHeaders1

func (Context_Headers_Item) AsContextHeaders2

func (t Context_Headers_Item) AsContextHeaders2() (ContextHeaders2, error)

AsContextHeaders2 returns the union data inside the Context_Headers_Item as a ContextHeaders2

func (*Context_Headers_Item) FromContextHeaders0

func (t *Context_Headers_Item) FromContextHeaders0(v ContextHeaders0) error

FromContextHeaders0 overwrites any union data inside the Context_Headers_Item as the provided ContextHeaders0

func (*Context_Headers_Item) FromContextHeaders1

func (t *Context_Headers_Item) FromContextHeaders1(v ContextHeaders1) error

FromContextHeaders1 overwrites any union data inside the Context_Headers_Item as the provided ContextHeaders1

func (*Context_Headers_Item) FromContextHeaders2

func (t *Context_Headers_Item) FromContextHeaders2(v ContextHeaders2) error

FromContextHeaders2 overwrites any union data inside the Context_Headers_Item as the provided ContextHeaders2

func (Context_Headers_Item) MarshalJSON

func (t Context_Headers_Item) MarshalJSON() ([]byte, error)

func (*Context_Headers_Item) MergeContextHeaders0

func (t *Context_Headers_Item) MergeContextHeaders0(v ContextHeaders0) error

MergeContextHeaders0 performs a merge with any union data inside the Context_Headers_Item, using the provided ContextHeaders0

func (*Context_Headers_Item) MergeContextHeaders1

func (t *Context_Headers_Item) MergeContextHeaders1(v ContextHeaders1) error

MergeContextHeaders1 performs a merge with any union data inside the Context_Headers_Item, using the provided ContextHeaders1

func (*Context_Headers_Item) MergeContextHeaders2

func (t *Context_Headers_Item) MergeContextHeaders2(v ContextHeaders2) error

MergeContextHeaders2 performs a merge with any union data inside the Context_Headers_Item, using the provided ContextHeaders2

func (*Context_Headers_Item) UnmarshalJSON

func (t *Context_Headers_Item) UnmarshalJSON(b []byte) error

type Coordinates

type Coordinates struct {
	// Lat Latitude coordinate
	Lat float32 `json:"lat"`

	// Lon Longitude coordinate
	Lon float32 `json:"lon"`
}

Coordinates defines model for Coordinates.

type CountBucket

type CountBucket struct {
	// Field Name of the field the bucket is based on
	//
	// Example: user.id
	Field string `json:"field"`

	// Name Name of the aggregation
	//
	// Example: user_id_count
	Name    string `json:"name"`
	Options *struct {
		Size *struct {
			DataType CountBucketOptionsSizeDataType `json:"data_type"`
		} `json:"size,omitempty"`
	} `json:"options,omitempty"`

	// Type Example: $count
	Type CountBucketType `json:"type"`
}

CountBucket defines model for CountBucket.

type CountBucketOptionsSizeDataType

type CountBucketOptionsSizeDataType string

CountBucketOptionsSizeDataType defines model for CountBucket.Options.Size.DataType.

const (
	CountBucketOptionsSizeDataTypeInteger CountBucketOptionsSizeDataType = "integer"
)

Defines values for CountBucketOptionsSizeDataType.

func (CountBucketOptionsSizeDataType) Valid

Valid indicates whether the value is a known member of the CountBucketOptionsSizeDataType enum.

type CountBucketType

type CountBucketType string

CountBucketType Example: $count

const (
	CountBucketTypeCount CountBucketType = "$count"
)

Defines values for CountBucketType.

func (CountBucketType) Valid

func (e CountBucketType) Valid() bool

Valid indicates whether the value is a known member of the CountBucketType enum.

type CountListItemsJSONRequestBody

type CountListItemsJSONRequestBody = ListItemCount

CountListItemsJSONRequestBody defines body for CountListItems for application/json ContentType.

type CountListItemsResponse

type CountListItemsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ListItemListCount
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
}

func ParseCountListItemsResponse

func ParseCountListItemsResponse(rsp *http.Response) (*CountListItemsResponse, error)

ParseCountListItemsResponse parses an HTTP response from a CountListItemsWithResponse call

func (CountListItemsResponse) ContentType

func (r CountListItemsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CountListItemsResponse) GetBody

func (r CountListItemsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CountListItemsResponse) GetJSON200

func (r CountListItemsResponse) GetJSON200() *ListItemListCount

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (CountListItemsResponse) GetJSON422

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (CountListItemsResponse) Status

func (r CountListItemsResponse) Status() string

Status returns HTTPResponse.Status

func (CountListItemsResponse) StatusCode

func (r CountListItemsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateListItemJSONRequestBody

type CreateListItemJSONRequestBody = ListItemRequest

CreateListItemJSONRequestBody defines body for CreateListItem for application/json ContentType.

type CreateListItemResponse

type CreateListItemResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *ListItem
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
}

func ParseCreateListItemResponse

func ParseCreateListItemResponse(rsp *http.Response) (*CreateListItemResponse, error)

ParseCreateListItemResponse parses an HTTP response from a CreateListItemWithResponse call

func (CreateListItemResponse) ContentType

func (r CreateListItemResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreateListItemResponse) GetBody

func (r CreateListItemResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreateListItemResponse) GetJSON201

func (r CreateListItemResponse) GetJSON201() *ListItem

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (CreateListItemResponse) GetJSON422

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (CreateListItemResponse) Status

func (r CreateListItemResponse) Status() string

Status returns HTTPResponse.Status

func (CreateListItemResponse) StatusCode

func (r CreateListItemResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateListJSONRequestBody

type CreateListJSONRequestBody = ListRequest

CreateListJSONRequestBody defines body for CreateList for application/json ContentType.

type CreateListResponse

type CreateListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *List
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
}

func ParseCreateListResponse

func ParseCreateListResponse(rsp *http.Response) (*CreateListResponse, error)

ParseCreateListResponse parses an HTTP response from a CreateListWithResponse call

func (CreateListResponse) ContentType

func (r CreateListResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreateListResponse) GetBody

func (r CreateListResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreateListResponse) GetJSON201

func (r CreateListResponse) GetJSON201() *List

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (CreateListResponse) GetJSON422

func (r CreateListResponse) GetJSON422() *UnprocessableEntity

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (CreateListResponse) Status

func (r CreateListResponse) Status() string

Status returns HTTPResponse.Status

func (CreateListResponse) StatusCode

func (r CreateListResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateOrUpdateBatchListItemsJSONRequestBody

type CreateOrUpdateBatchListItemsJSONRequestBody = ListItemsBatchRequest

CreateOrUpdateBatchListItemsJSONRequestBody defines body for CreateOrUpdateBatchListItems for application/json ContentType.

type CreateOrUpdateBatchListItemsResponse

type CreateOrUpdateBatchListItemsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *ListItemsBatchResponse
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
}

func ParseCreateOrUpdateBatchListItemsResponse

func ParseCreateOrUpdateBatchListItemsResponse(rsp *http.Response) (*CreateOrUpdateBatchListItemsResponse, error)

ParseCreateOrUpdateBatchListItemsResponse parses an HTTP response from a CreateOrUpdateBatchListItemsWithResponse call

func (CreateOrUpdateBatchListItemsResponse) ContentType

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreateOrUpdateBatchListItemsResponse) GetBody

GetBody returns the raw response body bytes

func (CreateOrUpdateBatchListItemsResponse) GetJSON201

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (CreateOrUpdateBatchListItemsResponse) GetJSON422

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (CreateOrUpdateBatchListItemsResponse) Status

Status returns HTTPResponse.Status

func (CreateOrUpdateBatchListItemsResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type CryptoAmount

type CryptoAmount struct {
	// Currency Digital currency code, required when value is provided
	//
	// Example: BTC
	Currency *string          `json:"currency,omitempty"`
	Type     CryptoAmountType `json:"type"`

	// Value Monetary amount of transaction with decimals
	//
	// Example: 1.512342352
	Value *string `json:"value,omitempty"`
}

CryptoAmount defines model for CryptoAmount.

type CryptoAmountType

type CryptoAmountType string

CryptoAmountType defines model for CryptoAmount.Type.

const (
	Crypto CryptoAmountType = "$crypto"
)

Defines values for CryptoAmountType.

func (CryptoAmountType) Valid

func (e CryptoAmountType) Valid() bool

Valid indicates whether the value is a known member of the CryptoAmountType enum.

type CustomFilterRequest

type CustomFilterRequest struct {
	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand *[]string `json:"expand,omitempty"`

	// MatchingUserId User id related connected with the request
	//
	// Example: 123
	MatchingUserId *string `json:"matching_user_id,omitempty"`

	// Name Your custom name of the event.
	Name   *string `json:"name,omitempty"`
	Params *struct {
		// Email The email address sent by the user
		//
		// Example: Rhea.Franecki@example.org
		Email *string `json:"email,omitempty"`

		// Phone The phone number sent by the user
		//
		// Example: +16175551212
		Phone *string `json:"phone,omitempty"`

		// Username The username sent by the user
		//
		// Example: superhero123
		Username *string `json:"username,omitempty"`
	} `json:"params,omitempty"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](https://docs.castle.io/docs/quickstart)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool                                        `json:"skip_request_token_validation,omitempty"`
	Status                     nullable.Nullable[CustomFilterRequestStatus] `json:"status,omitempty"`

	// Type Castle supported events available for this endpoint
	Type CustomFilterRequestType `json:"type"`
	User *struct {
		// Email The identified user's email address
		//
		// Example: Rhea.Franecki@example.org
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Email *string `json:"email,omitempty"`

		// Phone The identified user's phone number
		//
		// Example: +16175551212
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Phone *string `json:"phone,omitempty"`
	} `json:"user,omitempty"`
}

CustomFilterRequest defines model for CustomFilterRequest.

type CustomFilterRequestStatus

type CustomFilterRequestStatus string

CustomFilterRequestStatus defines model for CustomFilterRequest.Status.

const (
	CustomFilterRequestStatusAttempted   CustomFilterRequestStatus = "$attempted"
	CustomFilterRequestStatusFailed      CustomFilterRequestStatus = "$failed"
	CustomFilterRequestStatusLessThannil CustomFilterRequestStatus = "<nil>"
	CustomFilterRequestStatusSucceeded   CustomFilterRequestStatus = "$succeeded"
)

Defines values for CustomFilterRequestStatus.

func (CustomFilterRequestStatus) Valid

func (e CustomFilterRequestStatus) Valid() bool

Valid indicates whether the value is a known member of the CustomFilterRequestStatus enum.

type CustomFilterRequestType

type CustomFilterRequestType string

CustomFilterRequestType Castle supported events available for this endpoint

const (
	CustomFilterRequestTypeCustom CustomFilterRequestType = "$custom"
)

Defines values for CustomFilterRequestType.

func (CustomFilterRequestType) Valid

func (e CustomFilterRequestType) Valid() bool

Valid indicates whether the value is a known member of the CustomFilterRequestType enum.

type CustomResponse

type CustomResponse struct {
	// Agent AI agent identified for this event/context. Omitted when no agent is identified
	Agent *Agent `json:"agent,omitempty"`

	// Authenticated Authenticated or Anonymous visitor
	//
	// Example: true
	Authenticated *bool `json:"authenticated,omitempty"`

	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`
	Behavior             *struct {
		// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
		Fingerprint nullable.Nullable[string] `json:"fingerprint,omitempty"`
	} `json:"behavior,omitempty"`

	// CreatedAt Event timestamp
	//
	// Example: 2021-09-27T16:46:38.313Z
	CreatedAt *time.Time `json:"created_at,omitempty"`
	Device    struct {
		// Fingerprint Example: ohvjn8adSnetYTzZ8B7bOP
		Fingerprint nullable.Nullable[string] `json:"fingerprint"`
		Hardware    *struct {
			Brand   nullable.Nullable[string] `json:"brand"`
			Display struct {
				// Height Example: 982
				Height nullable.Nullable[int] `json:"height"`

				// Width Example: 1512
				Width nullable.Nullable[int] `json:"width"`
			} `json:"display"`
			Model struct {
				Code nullable.Nullable[string] `json:"code"`
				Name nullable.Nullable[string] `json:"name"`
			} `json:"model"`
			Name nullable.Nullable[string] `json:"name"`

			// Type Example: computer
			Type string `json:"type"`
		} `json:"hardware,omitempty"`
		Os *struct {
			// Name Example: Windows 10
			Name    string `json:"name"`
			Version struct {
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 10
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"os,omitempty"`
		Screen *struct {
			// Orientation Example: landscape
			Orientation nullable.Nullable[string] `json:"orientation,omitempty"`

			// Screen Example: 2
			Screen nullable.Nullable[int] `json:"screen,omitempty"`
		} `json:"screen,omitempty"`
		Software *struct {
			// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
			Fingerprint nullable.Nullable[string] `json:"fingerprint"`

			// Languages Example: ["en-us","en"]
			Languages []string `json:"languages"`

			// Name Example: Chrome
			Name string `json:"name"`

			// Type Example: browser
			Type    string `json:"type"`
			Version struct {
				// Full Example: 91.0.4472
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 91
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"software,omitempty"`
		Timezone *struct {
			// Name Example: America/New_York
			Name nullable.Nullable[string] `json:"name,omitempty"`

			// Offset Time offset from UTC measured in minutes
			//
			// Example: -300
			Offset nullable.Nullable[int] `json:"offset,omitempty"`
		} `json:"timezone,omitempty"`

		// Token Device token generated or found
		//
		// Example: eyJhbGciOiJIUzI1NiJ9.eyJ0b2tlbiI6IjEzc2x6RzNHQ0RzeFJCejdJWF9SUDJkV1Y0RFgiLCJxdWFsaWZpZXIiOiJBUUlEQ2pFME5EZzFPREF3T1RZIiwiYW5vbnltb3VzIjpmYWxzZSwidmVyc2lvbiI6MC4zfQ.y3vOt-W1IpOi7Oyn1jll1uDw1YL-JPZtNMTU-PyaYhQ
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Token *string `json:"token,omitempty"`

		// UserAgent Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
		UserAgent *string `json:"user_agent,omitempty"`
	} `json:"device"`

	// Email User Email Object
	Email *struct {
		// Disposable Example: false
		Disposable *bool `json:"disposable,omitempty"`

		// Domain Example: gmail.com
		Domain        *string `json:"domain,omitempty"`
		DomainDetails *struct {
			// CreatedAt Example: 2021-09-27T16:46:38.313Z
			CreatedAt   *time.Time `json:"created_at,omitempty"`
			DmarcRecord *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"dmarc_record,omitempty"`

			// ExpiresAt Example: 2021-09-27T16:46:38.313Z
			ExpiresAt *time.Time `json:"expires_at,omitempty"`
			MxRecords *struct {
				// NullMx Example: false
				NullMx nullable.Nullable[bool] `json:"null_mx,omitempty"`
			} `json:"mx_records,omitempty"`

			// Nameservers Example: ["ns1.hosting.com","ns2.hosting.com","ns3.hosting.com"]
			Nameservers *[]string `json:"nameservers,omitempty"`
			Registrar   *string   `json:"registrar,omitempty"`
			SpfRecord   *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"spf_record,omitempty"`

			// UpdatedAt Example: 2021-09-27T16:46:38.313Z
			UpdatedAt *time.Time `json:"updated_at,omitempty"`
		} `json:"domain_details,omitempty"`

		// Normalized Example: user.email@example.com
		Normalized *string `json:"normalized,omitempty"`

		// Unreachable Example: false
		Unreachable *bool `json:"unreachable,omitempty"`
	} `json:"email,omitempty"`

	// Endpoint Castle Request Endpoint
	//
	// Example: /v1/risk
	Endpoint *string `json:"endpoint,omitempty"`

	// Id Castle Event ID
	//
	// Example: ASZoelALT5-PaVw2pAVMXg
	Id *string `json:"id,omitempty"`
	Ip *IP     `json:"ip,omitempty"`

	// Metrics Metrics triggered for this event/context
	//
	// Example: {"1":{},"2":{},"3":{},"4":{},"5":{}}
	Metrics *map[string]map[string]interface{} `json:"metrics,omitempty"`

	// Name Event Full Name
	//
	// Example: Login Succeeded
	Name *string `json:"name,omitempty"`

	// Params The params object
	Params *EventParams `json:"params,omitempty"`

	// Policy The matching policy
	Policy  Policy   `json:"policy"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties
	Properties *Properties `json:"properties,omitempty"`

	// Risk Deprecated Risk Score - use `scores` instead. Calculated only when `request_token` and `context` are provided.
	//
	// Example: 0.65
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Risk *float32 `json:"risk,omitempty"`

	// Scores Castle Scores breakdown. Calculated only when `request_token` and `context` are provided.
	Scores *struct {
		AccountAbuse struct {
			// Score Calculated Account Abuse Risk Score.
			//
			// Example: 0.65
			Score *float32 `json:"score,omitempty"`
		} `json:"account_abuse"`
		AccountTakeover struct {
			// Score Calculated Account Takeover Risk Score.
			//
			// Example: 0.77
			Score *float32 `json:"score,omitempty"`
		} `json:"account_takeover"`
		Bot struct {
			// Score Calculated Bot Risk Score.
			//
			// Example: 0.34
			Score *float32 `json:"score,omitempty"`
		} `json:"bot"`
	} `json:"scores,omitempty"`

	// Sdks Castle SDKs details
	Sdks *struct {
		Client *struct {
			// Name Example: castle-web
			Name *string `json:"name,omitempty"`

			// Version Example: 2.0.0
			Version *string `json:"version,omitempty"`
		} `json:"client,omitempty"`
		Server *struct {
			// Name Example: castle-postman
			Name *string `json:"name,omitempty"`

			// Version Example: 0.1.0
			Version *string `json:"version,omitempty"`
		} `json:"server,omitempty"`
	} `json:"sdks,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// Signals Signals triggered for this event/context
	//
	// Example: {"bot_behavior":{},"disposable_email":{},"multiple_accounts_per_device":{},"proxy_ip":{},"residential_proxy_access":{},"spoofed_device":{}}
	Signals *map[string]map[string]interface{} `json:"signals,omitempty"`
	Status  *CustomResponseStatus              `json:"status,omitempty"`

	// Type Castle supported events available for this endpoint
	Type CustomResponseType     `json:"type"`
	User *UserForMonitorAndRisk `json:"user,omitempty"`
}

CustomResponse defines model for CustomResponse.

type CustomResponseStatus

type CustomResponseStatus string

CustomResponseStatus defines model for CustomResponse.Status.

const (
	CustomResponseStatusAttempted CustomResponseStatus = "$attempted"
	CustomResponseStatusFailed    CustomResponseStatus = "$failed"
	CustomResponseStatusSucceeded CustomResponseStatus = "$succeeded"
)

Defines values for CustomResponseStatus.

func (CustomResponseStatus) Valid

func (e CustomResponseStatus) Valid() bool

Valid indicates whether the value is a known member of the CustomResponseStatus enum.

type CustomResponseType

type CustomResponseType string

CustomResponseType Castle supported events available for this endpoint

const (
	CustomResponseTypeCustom CustomResponseType = "$custom"
)

Defines values for CustomResponseType.

func (CustomResponseType) Valid

func (e CustomResponseType) Valid() bool

Valid indicates whether the value is a known member of the CustomResponseType enum.

type CustomRiskRequest

type CustomRiskRequest struct {
	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand *[]string `json:"expand,omitempty"`

	// Name Your custom name of the event.
	Name    *string  `json:"name,omitempty"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](/v1/getting-started)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool                                      `json:"skip_request_token_validation,omitempty"`
	Status                     nullable.Nullable[CustomRiskRequestStatus] `json:"status"`

	// Type Castle supported events available for this endpoint
	Type CustomRiskRequestType `json:"type"`
	User UserForMonitorAndRisk `json:"user"`
}

CustomRiskRequest defines model for CustomRiskRequest.

type CustomRiskRequestStatus

type CustomRiskRequestStatus string

CustomRiskRequestStatus defines model for CustomRiskRequest.Status.

const (
	CustomRiskRequestStatusAttempted   CustomRiskRequestStatus = "$attempted"
	CustomRiskRequestStatusFailed      CustomRiskRequestStatus = "$failed"
	CustomRiskRequestStatusLessThannil CustomRiskRequestStatus = "<nil>"
	CustomRiskRequestStatusSucceeded   CustomRiskRequestStatus = "$succeeded"
)

Defines values for CustomRiskRequestStatus.

func (CustomRiskRequestStatus) Valid

func (e CustomRiskRequestStatus) Valid() bool

Valid indicates whether the value is a known member of the CustomRiskRequestStatus enum.

type CustomRiskRequestType

type CustomRiskRequestType string

CustomRiskRequestType Castle supported events available for this endpoint

const (
	CustomRiskRequestTypeCustom CustomRiskRequestType = "$custom"
)

Defines values for CustomRiskRequestType.

func (CustomRiskRequestType) Valid

func (e CustomRiskRequestType) Valid() bool

Valid indicates whether the value is a known member of the CustomRiskRequestType enum.

type DataType

type DataType string

DataType Example: string

const (
	DataTypeArray    DataType = "array"
	DataTypeBoolean  DataType = "boolean"
	DataTypeDatetime DataType = "datetime"
	DataTypeDecimal  DataType = "decimal"
	DataTypeInteger  DataType = "integer"
	DataTypeIp       DataType = "ip"
	DataTypeMap      DataType = "map"
	DataTypeNumber   DataType = "number"
	DataTypeString   DataType = "string"
	DataTypeUuid     DataType = "uuid"
)

Defines values for DataType.

func (DataType) Valid

func (e DataType) Valid() bool

Valid indicates whether the value is a known member of the DataType enum.

type DateHistogramBucket

type DateHistogramBucket struct {
	// Field Name of the field the bucket is based on
	//
	// Example: user.id
	Field string `json:"field"`

	// Name Example: created_at_histogram
	Name    string `json:"name"`
	Options struct {
		Interval struct {
			DataType DateHistogramBucketOptionsIntervalDataType `json:"data_type"`

			// Enum Example: ["1m","2m","5m"]
			Enum     []DateHistogramBucketOptionsIntervalEnum `json:"enum"`
			Required bool                                     `json:"required"`
		} `json:"interval"`
		Max *struct {
			DataType DateHistogramBucketOptionsMaxDataType  `json:"data_type"`
			Format   *[]DateHistogramBucketOptionsMaxFormat `json:"format,omitempty"`
		} `json:"max,omitempty"`
		Min *struct {
			DataType DateHistogramBucketOptionsMinDataType  `json:"data_type"`
			Format   *[]DateHistogramBucketOptionsMinFormat `json:"format,omitempty"`
		} `json:"min,omitempty"`
		Size *struct {
			DataType DateHistogramBucketOptionsSizeDataType `json:"data_type"`
		} `json:"size,omitempty"`
	} `json:"options"`
	Type DateHistogramBucketType `json:"type"`
}

DateHistogramBucket defines model for DateHistogramBucket.

type DateHistogramBucketOptionsIntervalDataType

type DateHistogramBucketOptionsIntervalDataType string

DateHistogramBucketOptionsIntervalDataType defines model for DateHistogramBucket.Options.Interval.DataType.

const (
	DateHistogramBucketOptionsIntervalDataTypeString DateHistogramBucketOptionsIntervalDataType = "string"
)

Defines values for DateHistogramBucketOptionsIntervalDataType.

func (DateHistogramBucketOptionsIntervalDataType) Valid

Valid indicates whether the value is a known member of the DateHistogramBucketOptionsIntervalDataType enum.

type DateHistogramBucketOptionsIntervalEnum

type DateHistogramBucketOptionsIntervalEnum string

DateHistogramBucketOptionsIntervalEnum defines model for DateHistogramBucket.Options.Interval.Enum.

const (
	N108h DateHistogramBucketOptionsIntervalEnum = "108h"
	N10d  DateHistogramBucketOptionsIntervalEnum = "10d"
	N10m  DateHistogramBucketOptionsIntervalEnum = "10m"
	N12h  DateHistogramBucketOptionsIntervalEnum = "12h"
	N132h DateHistogramBucketOptionsIntervalEnum = "132h"
	N14d  DateHistogramBucketOptionsIntervalEnum = "14d"
	N15m  DateHistogramBucketOptionsIntervalEnum = "15m"
	N1d   DateHistogramBucketOptionsIntervalEnum = "1d"
	N1h   DateHistogramBucketOptionsIntervalEnum = "1h"
	N1m   DateHistogramBucketOptionsIntervalEnum = "1m"
	N20m  DateHistogramBucketOptionsIntervalEnum = "20m"
	N2d   DateHistogramBucketOptionsIntervalEnum = "2d"
	N2h   DateHistogramBucketOptionsIntervalEnum = "2h"
	N2m   DateHistogramBucketOptionsIntervalEnum = "2m"
	N30m  DateHistogramBucketOptionsIntervalEnum = "30m"
	N36h  DateHistogramBucketOptionsIntervalEnum = "36h"
	N3d   DateHistogramBucketOptionsIntervalEnum = "3d"
	N3h   DateHistogramBucketOptionsIntervalEnum = "3h"
	N3m   DateHistogramBucketOptionsIntervalEnum = "3m"
	N4d   DateHistogramBucketOptionsIntervalEnum = "4d"
	N4h   DateHistogramBucketOptionsIntervalEnum = "4h"
	N4m   DateHistogramBucketOptionsIntervalEnum = "4m"
	N5d   DateHistogramBucketOptionsIntervalEnum = "5d"
	N5m   DateHistogramBucketOptionsIntervalEnum = "5m"
	N60h  DateHistogramBucketOptionsIntervalEnum = "60h"
	N6d   DateHistogramBucketOptionsIntervalEnum = "6d"
	N6h   DateHistogramBucketOptionsIntervalEnum = "6h"
	N6m   DateHistogramBucketOptionsIntervalEnum = "6m"
	N7d   DateHistogramBucketOptionsIntervalEnum = "7d"
	N84h  DateHistogramBucketOptionsIntervalEnum = "84h"
	N8h   DateHistogramBucketOptionsIntervalEnum = "8h"
)

Defines values for DateHistogramBucketOptionsIntervalEnum.

func (DateHistogramBucketOptionsIntervalEnum) Valid

Valid indicates whether the value is a known member of the DateHistogramBucketOptionsIntervalEnum enum.

type DateHistogramBucketOptionsMaxDataType

type DateHistogramBucketOptionsMaxDataType string

DateHistogramBucketOptionsMaxDataType defines model for DateHistogramBucket.Options.Max.DataType.

const (
	DateHistogramBucketOptionsMaxDataTypeString DateHistogramBucketOptionsMaxDataType = "string"
)

Defines values for DateHistogramBucketOptionsMaxDataType.

func (DateHistogramBucketOptionsMaxDataType) Valid

Valid indicates whether the value is a known member of the DateHistogramBucketOptionsMaxDataType enum.

type DateHistogramBucketOptionsMaxFormat

type DateHistogramBucketOptionsMaxFormat string

DateHistogramBucketOptionsMaxFormat defines model for DateHistogramBucket.Options.Max.Format.

const (
	DateHistogramBucketOptionsMaxFormatDateTime DateHistogramBucketOptionsMaxFormat = "date-time"
)

Defines values for DateHistogramBucketOptionsMaxFormat.

func (DateHistogramBucketOptionsMaxFormat) Valid

Valid indicates whether the value is a known member of the DateHistogramBucketOptionsMaxFormat enum.

type DateHistogramBucketOptionsMinDataType

type DateHistogramBucketOptionsMinDataType string

DateHistogramBucketOptionsMinDataType defines model for DateHistogramBucket.Options.Min.DataType.

const (
	DateHistogramBucketOptionsMinDataTypeString DateHistogramBucketOptionsMinDataType = "string"
)

Defines values for DateHistogramBucketOptionsMinDataType.

func (DateHistogramBucketOptionsMinDataType) Valid

Valid indicates whether the value is a known member of the DateHistogramBucketOptionsMinDataType enum.

type DateHistogramBucketOptionsMinFormat

type DateHistogramBucketOptionsMinFormat string

DateHistogramBucketOptionsMinFormat defines model for DateHistogramBucket.Options.Min.Format.

const (
	DateHistogramBucketOptionsMinFormatDateTime DateHistogramBucketOptionsMinFormat = "date-time"
)

Defines values for DateHistogramBucketOptionsMinFormat.

func (DateHistogramBucketOptionsMinFormat) Valid

Valid indicates whether the value is a known member of the DateHistogramBucketOptionsMinFormat enum.

type DateHistogramBucketOptionsSizeDataType

type DateHistogramBucketOptionsSizeDataType string

DateHistogramBucketOptionsSizeDataType defines model for DateHistogramBucket.Options.Size.DataType.

const (
	DateHistogramBucketOptionsSizeDataTypeInteger DateHistogramBucketOptionsSizeDataType = "integer"
)

Defines values for DateHistogramBucketOptionsSizeDataType.

func (DateHistogramBucketOptionsSizeDataType) Valid

Valid indicates whether the value is a known member of the DateHistogramBucketOptionsSizeDataType enum.

type DateHistogramBucketType

type DateHistogramBucketType string

DateHistogramBucketType defines model for DateHistogramBucket.Type.

const (
	DateHistogramBucketTypeDateHistogram DateHistogramBucketType = "$date_histogram"
)

Defines values for DateHistogramBucketType.

func (DateHistogramBucketType) Valid

func (e DateHistogramBucketType) Valid() bool

Valid indicates whether the value is a known member of the DateHistogramBucketType enum.

type DeleteListResponse

type DeleteListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDeleteListResponse

func ParseDeleteListResponse(rsp *http.Response) (*DeleteListResponse, error)

ParseDeleteListResponse parses an HTTP response from a DeleteListWithResponse call

func (DeleteListResponse) ContentType

func (r DeleteListResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteListResponse) GetBody

func (r DeleteListResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteListResponse) Status

func (r DeleteListResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteListResponse) StatusCode

func (r DeleteListResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteUserPrivacyDeprecatedResponse

type DeleteUserPrivacyDeprecatedResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDeleteUserPrivacyDeprecatedResponse

func ParseDeleteUserPrivacyDeprecatedResponse(rsp *http.Response) (*DeleteUserPrivacyDeprecatedResponse, error)

ParseDeleteUserPrivacyDeprecatedResponse parses an HTTP response from a DeleteUserPrivacyDeprecatedWithResponse call

func (DeleteUserPrivacyDeprecatedResponse) ContentType

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteUserPrivacyDeprecatedResponse) GetBody

GetBody returns the raw response body bytes

func (DeleteUserPrivacyDeprecatedResponse) Status

Status returns HTTPResponse.Status

func (DeleteUserPrivacyDeprecatedResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type DeleteUserPrivacyJSONRequestBody

type DeleteUserPrivacyJSONRequestBody = PrivacyRequest

DeleteUserPrivacyJSONRequestBody defines body for DeleteUserPrivacy for application/json ContentType.

type DeleteUserPrivacyResponse

type DeleteUserPrivacyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDeleteUserPrivacyResponse

func ParseDeleteUserPrivacyResponse(rsp *http.Response) (*DeleteUserPrivacyResponse, error)

ParseDeleteUserPrivacyResponse parses an HTTP response from a DeleteUserPrivacyWithResponse call

func (DeleteUserPrivacyResponse) ContentType

func (r DeleteUserPrivacyResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteUserPrivacyResponse) GetBody

func (r DeleteUserPrivacyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteUserPrivacyResponse) Status

func (r DeleteUserPrivacyResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteUserPrivacyResponse) StatusCode

func (r DeleteUserPrivacyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Device

type Device struct {
	// Fingerprint Example: ohvjn8adSnetYTzZ8B7bOP
	Fingerprint nullable.Nullable[string] `json:"fingerprint"`
	Hardware    *struct {
		Brand   nullable.Nullable[string] `json:"brand"`
		Display struct {
			// Height Example: 982
			Height nullable.Nullable[int] `json:"height"`

			// Width Example: 1512
			Width nullable.Nullable[int] `json:"width"`
		} `json:"display"`
		Model struct {
			Code nullable.Nullable[string] `json:"code"`
			Name nullable.Nullable[string] `json:"name"`
		} `json:"model"`
		Name nullable.Nullable[string] `json:"name"`

		// Type Example: computer
		Type string `json:"type"`
	} `json:"hardware,omitempty"`
	Os *struct {
		// Name Example: Windows 10
		Name    string `json:"name"`
		Version struct {
			Full nullable.Nullable[string] `json:"full"`

			// Major Example: 10
			Major nullable.Nullable[string] `json:"major"`
		} `json:"version"`
	} `json:"os,omitempty"`
	Screen *struct {
		// Orientation Example: landscape
		Orientation nullable.Nullable[string] `json:"orientation,omitempty"`

		// Screen Example: 2
		Screen nullable.Nullable[int] `json:"screen,omitempty"`
	} `json:"screen,omitempty"`
	Software *struct {
		// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
		Fingerprint nullable.Nullable[string] `json:"fingerprint"`

		// Languages Example: ["en-us","en"]
		Languages []string `json:"languages"`

		// Name Example: Chrome
		Name string `json:"name"`

		// Type Example: browser
		Type    string `json:"type"`
		Version struct {
			// Full Example: 91.0.4472
			Full nullable.Nullable[string] `json:"full"`

			// Major Example: 91
			Major nullable.Nullable[string] `json:"major"`
		} `json:"version"`
	} `json:"software,omitempty"`
	Timezone *struct {
		// Name Example: America/New_York
		Name nullable.Nullable[string] `json:"name,omitempty"`

		// Offset Time offset from UTC measured in minutes
		//
		// Example: -300
		Offset nullable.Nullable[int] `json:"offset,omitempty"`
	} `json:"timezone,omitempty"`

	// UserAgent Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
	UserAgent *string `json:"user_agent,omitempty"`
}

Device defines model for Device.

type DownloadIpDatasetExportResponse

type DownloadIpDatasetExportResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
	// Headers302 the parsed response headers for an HTTP 302 response
	Headers302 *DownloadIpDatasetExportResponse302Headers
}

func ParseDownloadIpDatasetExportResponse

func ParseDownloadIpDatasetExportResponse(rsp *http.Response) (*DownloadIpDatasetExportResponse, error)

ParseDownloadIpDatasetExportResponse parses an HTTP response from a DownloadIpDatasetExportWithResponse call

func (DownloadIpDatasetExportResponse) ContentType

func (r DownloadIpDatasetExportResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DownloadIpDatasetExportResponse) GetBody

func (r DownloadIpDatasetExportResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DownloadIpDatasetExportResponse) GetJSON422

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (DownloadIpDatasetExportResponse) Status

Status returns HTTPResponse.Status

func (DownloadIpDatasetExportResponse) StatusCode

func (r DownloadIpDatasetExportResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DownloadIpDatasetExportResponse302Headers

type DownloadIpDatasetExportResponse302Headers struct {
	Location *string
}

DownloadIpDatasetExportResponse302Headers the declared response headers of an HTTP 302 response for DownloadIpDatasetExport

type Event

type Event struct {
	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`

	// Challenge Challenge object containing information about the event that triggered this challenge
	Challenge *Challenge                                       `json:"challenge,omitempty"`
	Changeset *map[string]Event_Changeset_AdditionalProperties `json:"changeset,omitempty"`

	// CreatedAt Example: 2021-09-27T16:46:38.313Z
	CreatedAt time.Time `json:"created_at"`
	Device    Device    `json:"device"`

	// Id Example: ASZoelALT5-PaVw2pAVMXg
	Id   string `json:"id"`
	Ip   IP     `json:"ip"`
	Page *struct {
		// Name Name of the page - for example the HTML page title or just a client-supplied value
		Name string `json:"name"`

		// Referrer The value of the HTTP referrer header
		Referrer *string `json:"referrer,omitempty"`

		// Url URL of the current page
		Url string `json:"url"`
	} `json:"page,omitempty"`

	// Params The params object
	Params *EventParams `json:"params,omitempty"`

	// Policy The matching policy
	Policy  Policy  `json:"policy"`
	Product Product `json:"product"`

	// Properties User defined properties
	Properties Properties `json:"properties"`

	// Risk Example: 0.396
	Risk   nullable.Nullable[float32] `json:"risk"`
	Scores *struct {
		AccountSharing  *Score `json:"account_sharing,omitempty"`
		AccountTakeover *Score `json:"account_takeover,omitempty"`
		Bot             *Score `json:"bot,omitempty"`
		MultiAccounting *Score `json:"multi_accounting,omitempty"`
		SpoofedDevice   *Score `json:"spoofed_device,omitempty"`
		SpoofedLocation *Score `json:"spoofed_location,omitempty"`
		Unified         *Score `json:"unified,omitempty"`
	} `json:"scores,omitempty"`
	Screen *struct {
		// Name The name of the current screen
		Name string `json:"name"`
	} `json:"screen,omitempty"`

	// Signals Example: ["bot_behavior","multiple_accounts_per_device"]
	Signals []EventSignals `json:"signals"`

	// Status Example: $succeeded
	Status      string       `json:"status"`
	Transaction *Transaction `json:"transaction,omitempty"`

	// Type Example: $login
	Type string `json:"type"`
	User struct {
		Address *Address `json:"address,omitempty"`

		// DevicesCount Example: 2
		DevicesCount int `json:"devices_count"`

		// Email Example: Rhea.Franecki+subaddress@example.org
		Email nullable.Nullable[string] `json:"email"`

		// Id Example: 220f785c-77a4-4532-ba23-f7e68388eebe
		Id nullable.Nullable[string] `json:"id"`

		// LastSeenAt Example: 2021-12-02T03:40:03.226Z
		LastSeenAt nullable.Nullable[time.Time] `json:"last_seen_at"`

		// Name Example: Rhea Franecki
		Name nullable.Nullable[string] `json:"name"`

		// Phone Example: +16175551212
		Phone nullable.Nullable[string] `json:"phone"`

		// RegisteredAt Example: 2010-12-02T00:30:08.276Z
		RegisteredAt nullable.Nullable[time.Time] `json:"registered_at"`

		// Risk Example: 0.396
		Risk float32 `json:"risk"`

		// Traits Known traits of the identified user
		//
		// Example: {"account_verified_at":"2024-07-25T13:22:50.834Z","organization_name":"Example Org"}
		Traits nullable.Nullable[map[string]interface{}] `json:"traits"`
	} `json:"user"`
}

Event defines model for Event.

type EventFilterOperand

type EventFilterOperand struct {
	// contains filtered or unexported fields
}

EventFilterOperand defines model for EventFilterOperand.

func (EventFilterOperand) AsArrayMatchQueryFilter

func (t EventFilterOperand) AsArrayMatchQueryFilter() (ArrayMatchQueryFilter, error)

AsArrayMatchQueryFilter returns the union data inside the EventFilterOperand as a ArrayMatchQueryFilter

func (EventFilterOperand) AsEventLogicalFilter

func (t EventFilterOperand) AsEventLogicalFilter() (EventLogicalFilter, error)

AsEventLogicalFilter returns the union data inside the EventFilterOperand as a EventLogicalFilter

func (EventFilterOperand) AsExistsQueryFilter

func (t EventFilterOperand) AsExistsQueryFilter() (ExistsQueryFilter, error)

AsExistsQueryFilter returns the union data inside the EventFilterOperand as a ExistsQueryFilter

func (EventFilterOperand) AsGeoQueryFilter

func (t EventFilterOperand) AsGeoQueryFilter() (GeoQueryFilter, error)

AsGeoQueryFilter returns the union data inside the EventFilterOperand as a GeoQueryFilter

func (EventFilterOperand) AsQueryFilter

func (t EventFilterOperand) AsQueryFilter() (QueryFilter, error)

AsQueryFilter returns the union data inside the EventFilterOperand as a QueryFilter

func (EventFilterOperand) AsRangeQueryFilter

func (t EventFilterOperand) AsRangeQueryFilter() (RangeQueryFilter, error)

AsRangeQueryFilter returns the union data inside the EventFilterOperand as a RangeQueryFilter

func (EventFilterOperand) AsRelativeRangeQueryFilter

func (t EventFilterOperand) AsRelativeRangeQueryFilter() (RelativeRangeQueryFilter, error)

AsRelativeRangeQueryFilter returns the union data inside the EventFilterOperand as a RelativeRangeQueryFilter

func (*EventFilterOperand) FromArrayMatchQueryFilter

func (t *EventFilterOperand) FromArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

FromArrayMatchQueryFilter overwrites any union data inside the EventFilterOperand as the provided ArrayMatchQueryFilter

func (*EventFilterOperand) FromEventLogicalFilter

func (t *EventFilterOperand) FromEventLogicalFilter(v EventLogicalFilter) error

FromEventLogicalFilter overwrites any union data inside the EventFilterOperand as the provided EventLogicalFilter

func (*EventFilterOperand) FromExistsQueryFilter

func (t *EventFilterOperand) FromExistsQueryFilter(v ExistsQueryFilter) error

FromExistsQueryFilter overwrites any union data inside the EventFilterOperand as the provided ExistsQueryFilter

func (*EventFilterOperand) FromGeoQueryFilter

func (t *EventFilterOperand) FromGeoQueryFilter(v GeoQueryFilter) error

FromGeoQueryFilter overwrites any union data inside the EventFilterOperand as the provided GeoQueryFilter

func (*EventFilterOperand) FromQueryFilter

func (t *EventFilterOperand) FromQueryFilter(v QueryFilter) error

FromQueryFilter overwrites any union data inside the EventFilterOperand as the provided QueryFilter

func (*EventFilterOperand) FromRangeQueryFilter

func (t *EventFilterOperand) FromRangeQueryFilter(v RangeQueryFilter) error

FromRangeQueryFilter overwrites any union data inside the EventFilterOperand as the provided RangeQueryFilter

func (*EventFilterOperand) FromRelativeRangeQueryFilter

func (t *EventFilterOperand) FromRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

FromRelativeRangeQueryFilter overwrites any union data inside the EventFilterOperand as the provided RelativeRangeQueryFilter

func (EventFilterOperand) MarshalJSON

func (t EventFilterOperand) MarshalJSON() ([]byte, error)

func (*EventFilterOperand) MergeArrayMatchQueryFilter

func (t *EventFilterOperand) MergeArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

MergeArrayMatchQueryFilter performs a merge with any union data inside the EventFilterOperand, using the provided ArrayMatchQueryFilter

func (*EventFilterOperand) MergeEventLogicalFilter

func (t *EventFilterOperand) MergeEventLogicalFilter(v EventLogicalFilter) error

MergeEventLogicalFilter performs a merge with any union data inside the EventFilterOperand, using the provided EventLogicalFilter

func (*EventFilterOperand) MergeExistsQueryFilter

func (t *EventFilterOperand) MergeExistsQueryFilter(v ExistsQueryFilter) error

MergeExistsQueryFilter performs a merge with any union data inside the EventFilterOperand, using the provided ExistsQueryFilter

func (*EventFilterOperand) MergeGeoQueryFilter

func (t *EventFilterOperand) MergeGeoQueryFilter(v GeoQueryFilter) error

MergeGeoQueryFilter performs a merge with any union data inside the EventFilterOperand, using the provided GeoQueryFilter

func (*EventFilterOperand) MergeQueryFilter

func (t *EventFilterOperand) MergeQueryFilter(v QueryFilter) error

MergeQueryFilter performs a merge with any union data inside the EventFilterOperand, using the provided QueryFilter

func (*EventFilterOperand) MergeRangeQueryFilter

func (t *EventFilterOperand) MergeRangeQueryFilter(v RangeQueryFilter) error

MergeRangeQueryFilter performs a merge with any union data inside the EventFilterOperand, using the provided RangeQueryFilter

func (*EventFilterOperand) MergeRelativeRangeQueryFilter

func (t *EventFilterOperand) MergeRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

MergeRelativeRangeQueryFilter performs a merge with any union data inside the EventFilterOperand, using the provided RelativeRangeQueryFilter

func (*EventFilterOperand) UnmarshalJSON

func (t *EventFilterOperand) UnmarshalJSON(b []byte) error

type EventFilters

type EventFilters struct {
	// contains filtered or unexported fields
}

EventFilters Either a list of filters or a filter tree (`{ "$and" | "$or": [...] }`). A tree can nest `$and` and `$or` groups, for example `(A OR B) AND (C OR D)`, which the list form cannot express.

func (EventFilters) AsEventFilters0

func (t EventFilters) AsEventFilters0() (EventFilters0, error)

AsEventFilters0 returns the union data inside the EventFilters as a EventFilters0

func (EventFilters) AsEventFilters1

func (t EventFilters) AsEventFilters1() (EventFilters1, error)

AsEventFilters1 returns the union data inside the EventFilters as a EventFilters1

func (*EventFilters) FromEventFilters0

func (t *EventFilters) FromEventFilters0(v EventFilters0) error

FromEventFilters0 overwrites any union data inside the EventFilters as the provided EventFilters0

func (*EventFilters) FromEventFilters1

func (t *EventFilters) FromEventFilters1(v EventFilters1) error

FromEventFilters1 overwrites any union data inside the EventFilters as the provided EventFilters1

func (EventFilters) MarshalJSON

func (t EventFilters) MarshalJSON() ([]byte, error)

func (*EventFilters) MergeEventFilters0

func (t *EventFilters) MergeEventFilters0(v EventFilters0) error

MergeEventFilters0 performs a merge with any union data inside the EventFilters, using the provided EventFilters0

func (*EventFilters) MergeEventFilters1

func (t *EventFilters) MergeEventFilters1(v EventFilters1) error

MergeEventFilters1 performs a merge with any union data inside the EventFilters, using the provided EventFilters1

func (*EventFilters) UnmarshalJSON

func (t *EventFilters) UnmarshalJSON(b []byte) error

type EventFilters0

type EventFilters0 = []EventFilters_0_Item

EventFilters0 defines model for EventFilters.0.

type EventFilters1

type EventFilters1 struct {
	And *[]EventFilterOperand     `json:"$and,omitempty"`
	Or  *[]EventFilters_1_Or_Item `json:"$or,omitempty"`
}

EventFilters1 A filter tree node. Set exactly one of `$and` or `$or`. Each child is a leaf filter or another node. Trees are limited to 10 levels and 200 nodes, and the `$or` filter operator is not allowed inside a tree.

Example: {"$and":[{"field":"type","op":"$eq","value":"$login"},{"$or":[{"field":"scores.bot.score","op":"$range","value":{"gt":0.9}},{"field":"ip.location.country_code","op":"$in","value":["RU","CN"]}]}]}

type EventFilters_0_Item

type EventFilters_0_Item struct {
	// contains filtered or unexported fields
}

EventFilters_0_Item defines model for EventFilters.0.Item.

func (EventFilters_0_Item) AsArrayMatchQueryFilter

func (t EventFilters_0_Item) AsArrayMatchQueryFilter() (ArrayMatchQueryFilter, error)

AsArrayMatchQueryFilter returns the union data inside the EventFilters_0_Item as a ArrayMatchQueryFilter

func (EventFilters_0_Item) AsExistsQueryFilter

func (t EventFilters_0_Item) AsExistsQueryFilter() (ExistsQueryFilter, error)

AsExistsQueryFilter returns the union data inside the EventFilters_0_Item as a ExistsQueryFilter

func (EventFilters_0_Item) AsGeoQueryFilter

func (t EventFilters_0_Item) AsGeoQueryFilter() (GeoQueryFilter, error)

AsGeoQueryFilter returns the union data inside the EventFilters_0_Item as a GeoQueryFilter

func (EventFilters_0_Item) AsOrQueryFilter

func (t EventFilters_0_Item) AsOrQueryFilter() (OrQueryFilter, error)

AsOrQueryFilter returns the union data inside the EventFilters_0_Item as a OrQueryFilter

func (EventFilters_0_Item) AsQueryFilter

func (t EventFilters_0_Item) AsQueryFilter() (QueryFilter, error)

AsQueryFilter returns the union data inside the EventFilters_0_Item as a QueryFilter

func (EventFilters_0_Item) AsRangeQueryFilter

func (t EventFilters_0_Item) AsRangeQueryFilter() (RangeQueryFilter, error)

AsRangeQueryFilter returns the union data inside the EventFilters_0_Item as a RangeQueryFilter

func (EventFilters_0_Item) AsRelativeRangeQueryFilter

func (t EventFilters_0_Item) AsRelativeRangeQueryFilter() (RelativeRangeQueryFilter, error)

AsRelativeRangeQueryFilter returns the union data inside the EventFilters_0_Item as a RelativeRangeQueryFilter

func (*EventFilters_0_Item) FromArrayMatchQueryFilter

func (t *EventFilters_0_Item) FromArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

FromArrayMatchQueryFilter overwrites any union data inside the EventFilters_0_Item as the provided ArrayMatchQueryFilter

func (*EventFilters_0_Item) FromExistsQueryFilter

func (t *EventFilters_0_Item) FromExistsQueryFilter(v ExistsQueryFilter) error

FromExistsQueryFilter overwrites any union data inside the EventFilters_0_Item as the provided ExistsQueryFilter

func (*EventFilters_0_Item) FromGeoQueryFilter

func (t *EventFilters_0_Item) FromGeoQueryFilter(v GeoQueryFilter) error

FromGeoQueryFilter overwrites any union data inside the EventFilters_0_Item as the provided GeoQueryFilter

func (*EventFilters_0_Item) FromOrQueryFilter

func (t *EventFilters_0_Item) FromOrQueryFilter(v OrQueryFilter) error

FromOrQueryFilter overwrites any union data inside the EventFilters_0_Item as the provided OrQueryFilter

func (*EventFilters_0_Item) FromQueryFilter

func (t *EventFilters_0_Item) FromQueryFilter(v QueryFilter) error

FromQueryFilter overwrites any union data inside the EventFilters_0_Item as the provided QueryFilter

func (*EventFilters_0_Item) FromRangeQueryFilter

func (t *EventFilters_0_Item) FromRangeQueryFilter(v RangeQueryFilter) error

FromRangeQueryFilter overwrites any union data inside the EventFilters_0_Item as the provided RangeQueryFilter

func (*EventFilters_0_Item) FromRelativeRangeQueryFilter

func (t *EventFilters_0_Item) FromRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

FromRelativeRangeQueryFilter overwrites any union data inside the EventFilters_0_Item as the provided RelativeRangeQueryFilter

func (EventFilters_0_Item) MarshalJSON

func (t EventFilters_0_Item) MarshalJSON() ([]byte, error)

func (*EventFilters_0_Item) MergeArrayMatchQueryFilter

func (t *EventFilters_0_Item) MergeArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

MergeArrayMatchQueryFilter performs a merge with any union data inside the EventFilters_0_Item, using the provided ArrayMatchQueryFilter

func (*EventFilters_0_Item) MergeExistsQueryFilter

func (t *EventFilters_0_Item) MergeExistsQueryFilter(v ExistsQueryFilter) error

MergeExistsQueryFilter performs a merge with any union data inside the EventFilters_0_Item, using the provided ExistsQueryFilter

func (*EventFilters_0_Item) MergeGeoQueryFilter

func (t *EventFilters_0_Item) MergeGeoQueryFilter(v GeoQueryFilter) error

MergeGeoQueryFilter performs a merge with any union data inside the EventFilters_0_Item, using the provided GeoQueryFilter

func (*EventFilters_0_Item) MergeOrQueryFilter

func (t *EventFilters_0_Item) MergeOrQueryFilter(v OrQueryFilter) error

MergeOrQueryFilter performs a merge with any union data inside the EventFilters_0_Item, using the provided OrQueryFilter

func (*EventFilters_0_Item) MergeQueryFilter

func (t *EventFilters_0_Item) MergeQueryFilter(v QueryFilter) error

MergeQueryFilter performs a merge with any union data inside the EventFilters_0_Item, using the provided QueryFilter

func (*EventFilters_0_Item) MergeRangeQueryFilter

func (t *EventFilters_0_Item) MergeRangeQueryFilter(v RangeQueryFilter) error

MergeRangeQueryFilter performs a merge with any union data inside the EventFilters_0_Item, using the provided RangeQueryFilter

func (*EventFilters_0_Item) MergeRelativeRangeQueryFilter

func (t *EventFilters_0_Item) MergeRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

MergeRelativeRangeQueryFilter performs a merge with any union data inside the EventFilters_0_Item, using the provided RelativeRangeQueryFilter

func (*EventFilters_0_Item) UnmarshalJSON

func (t *EventFilters_0_Item) UnmarshalJSON(b []byte) error

type EventFilters_1_Or_Item

type EventFilters_1_Or_Item struct {
	// contains filtered or unexported fields
}

EventFilters_1_Or_Item defines model for EventFilters.1.Or.Item.

func (EventFilters_1_Or_Item) AsArrayMatchQueryFilter

func (t EventFilters_1_Or_Item) AsArrayMatchQueryFilter() (ArrayMatchQueryFilter, error)

AsArrayMatchQueryFilter returns the union data inside the EventFilters_1_Or_Item as a ArrayMatchQueryFilter

func (EventFilters_1_Or_Item) AsEventLogicalFilter

func (t EventFilters_1_Or_Item) AsEventLogicalFilter() (EventLogicalFilter, error)

AsEventLogicalFilter returns the union data inside the EventFilters_1_Or_Item as a EventLogicalFilter

func (EventFilters_1_Or_Item) AsExistsQueryFilter

func (t EventFilters_1_Or_Item) AsExistsQueryFilter() (ExistsQueryFilter, error)

AsExistsQueryFilter returns the union data inside the EventFilters_1_Or_Item as a ExistsQueryFilter

func (EventFilters_1_Or_Item) AsGeoQueryFilter

func (t EventFilters_1_Or_Item) AsGeoQueryFilter() (GeoQueryFilter, error)

AsGeoQueryFilter returns the union data inside the EventFilters_1_Or_Item as a GeoQueryFilter

func (EventFilters_1_Or_Item) AsQueryFilter

func (t EventFilters_1_Or_Item) AsQueryFilter() (QueryFilter, error)

AsQueryFilter returns the union data inside the EventFilters_1_Or_Item as a QueryFilter

func (EventFilters_1_Or_Item) AsRangeQueryFilter

func (t EventFilters_1_Or_Item) AsRangeQueryFilter() (RangeQueryFilter, error)

AsRangeQueryFilter returns the union data inside the EventFilters_1_Or_Item as a RangeQueryFilter

func (EventFilters_1_Or_Item) AsRelativeRangeQueryFilter

func (t EventFilters_1_Or_Item) AsRelativeRangeQueryFilter() (RelativeRangeQueryFilter, error)

AsRelativeRangeQueryFilter returns the union data inside the EventFilters_1_Or_Item as a RelativeRangeQueryFilter

func (*EventFilters_1_Or_Item) FromArrayMatchQueryFilter

func (t *EventFilters_1_Or_Item) FromArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

FromArrayMatchQueryFilter overwrites any union data inside the EventFilters_1_Or_Item as the provided ArrayMatchQueryFilter

func (*EventFilters_1_Or_Item) FromEventLogicalFilter

func (t *EventFilters_1_Or_Item) FromEventLogicalFilter(v EventLogicalFilter) error

FromEventLogicalFilter overwrites any union data inside the EventFilters_1_Or_Item as the provided EventLogicalFilter

func (*EventFilters_1_Or_Item) FromExistsQueryFilter

func (t *EventFilters_1_Or_Item) FromExistsQueryFilter(v ExistsQueryFilter) error

FromExistsQueryFilter overwrites any union data inside the EventFilters_1_Or_Item as the provided ExistsQueryFilter

func (*EventFilters_1_Or_Item) FromGeoQueryFilter

func (t *EventFilters_1_Or_Item) FromGeoQueryFilter(v GeoQueryFilter) error

FromGeoQueryFilter overwrites any union data inside the EventFilters_1_Or_Item as the provided GeoQueryFilter

func (*EventFilters_1_Or_Item) FromQueryFilter

func (t *EventFilters_1_Or_Item) FromQueryFilter(v QueryFilter) error

FromQueryFilter overwrites any union data inside the EventFilters_1_Or_Item as the provided QueryFilter

func (*EventFilters_1_Or_Item) FromRangeQueryFilter

func (t *EventFilters_1_Or_Item) FromRangeQueryFilter(v RangeQueryFilter) error

FromRangeQueryFilter overwrites any union data inside the EventFilters_1_Or_Item as the provided RangeQueryFilter

func (*EventFilters_1_Or_Item) FromRelativeRangeQueryFilter

func (t *EventFilters_1_Or_Item) FromRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

FromRelativeRangeQueryFilter overwrites any union data inside the EventFilters_1_Or_Item as the provided RelativeRangeQueryFilter

func (EventFilters_1_Or_Item) MarshalJSON

func (t EventFilters_1_Or_Item) MarshalJSON() ([]byte, error)

func (*EventFilters_1_Or_Item) MergeArrayMatchQueryFilter

func (t *EventFilters_1_Or_Item) MergeArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

MergeArrayMatchQueryFilter performs a merge with any union data inside the EventFilters_1_Or_Item, using the provided ArrayMatchQueryFilter

func (*EventFilters_1_Or_Item) MergeEventLogicalFilter

func (t *EventFilters_1_Or_Item) MergeEventLogicalFilter(v EventLogicalFilter) error

MergeEventLogicalFilter performs a merge with any union data inside the EventFilters_1_Or_Item, using the provided EventLogicalFilter

func (*EventFilters_1_Or_Item) MergeExistsQueryFilter

func (t *EventFilters_1_Or_Item) MergeExistsQueryFilter(v ExistsQueryFilter) error

MergeExistsQueryFilter performs a merge with any union data inside the EventFilters_1_Or_Item, using the provided ExistsQueryFilter

func (*EventFilters_1_Or_Item) MergeGeoQueryFilter

func (t *EventFilters_1_Or_Item) MergeGeoQueryFilter(v GeoQueryFilter) error

MergeGeoQueryFilter performs a merge with any union data inside the EventFilters_1_Or_Item, using the provided GeoQueryFilter

func (*EventFilters_1_Or_Item) MergeQueryFilter

func (t *EventFilters_1_Or_Item) MergeQueryFilter(v QueryFilter) error

MergeQueryFilter performs a merge with any union data inside the EventFilters_1_Or_Item, using the provided QueryFilter

func (*EventFilters_1_Or_Item) MergeRangeQueryFilter

func (t *EventFilters_1_Or_Item) MergeRangeQueryFilter(v RangeQueryFilter) error

MergeRangeQueryFilter performs a merge with any union data inside the EventFilters_1_Or_Item, using the provided RangeQueryFilter

func (*EventFilters_1_Or_Item) MergeRelativeRangeQueryFilter

func (t *EventFilters_1_Or_Item) MergeRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

MergeRelativeRangeQueryFilter performs a merge with any union data inside the EventFilters_1_Or_Item, using the provided RelativeRangeQueryFilter

func (*EventFilters_1_Or_Item) UnmarshalJSON

func (t *EventFilters_1_Or_Item) UnmarshalJSON(b []byte) error

type EventLogicalFilter

type EventLogicalFilter struct {
	And *[]EventFilterOperand         `json:"$and,omitempty"`
	Or  *[]EventLogicalFilter_Or_Item `json:"$or,omitempty"`
}

EventLogicalFilter A filter tree node. Set exactly one of `$and` or `$or`. Each child is a leaf filter or another node. Trees are limited to 10 levels and 200 nodes, and the `$or` filter operator is not allowed inside a tree.

Example: {"$and":[{"field":"type","op":"$eq","value":"$login"},{"$or":[{"field":"scores.bot.score","op":"$range","value":{"gt":0.9}},{"field":"ip.location.country_code","op":"$in","value":["RU","CN"]}]}]}

type EventLogicalFilter_Or_Item

type EventLogicalFilter_Or_Item struct {
	// contains filtered or unexported fields
}

EventLogicalFilter_Or_Item defines model for EventLogicalFilter.$or.Item.

func (EventLogicalFilter_Or_Item) AsArrayMatchQueryFilter

func (t EventLogicalFilter_Or_Item) AsArrayMatchQueryFilter() (ArrayMatchQueryFilter, error)

AsArrayMatchQueryFilter returns the union data inside the EventLogicalFilter_Or_Item as a ArrayMatchQueryFilter

func (EventLogicalFilter_Or_Item) AsEventLogicalFilter

func (t EventLogicalFilter_Or_Item) AsEventLogicalFilter() (EventLogicalFilter, error)

AsEventLogicalFilter returns the union data inside the EventLogicalFilter_Or_Item as a EventLogicalFilter

func (EventLogicalFilter_Or_Item) AsExistsQueryFilter

func (t EventLogicalFilter_Or_Item) AsExistsQueryFilter() (ExistsQueryFilter, error)

AsExistsQueryFilter returns the union data inside the EventLogicalFilter_Or_Item as a ExistsQueryFilter

func (EventLogicalFilter_Or_Item) AsGeoQueryFilter

func (t EventLogicalFilter_Or_Item) AsGeoQueryFilter() (GeoQueryFilter, error)

AsGeoQueryFilter returns the union data inside the EventLogicalFilter_Or_Item as a GeoQueryFilter

func (EventLogicalFilter_Or_Item) AsQueryFilter

func (t EventLogicalFilter_Or_Item) AsQueryFilter() (QueryFilter, error)

AsQueryFilter returns the union data inside the EventLogicalFilter_Or_Item as a QueryFilter

func (EventLogicalFilter_Or_Item) AsRangeQueryFilter

func (t EventLogicalFilter_Or_Item) AsRangeQueryFilter() (RangeQueryFilter, error)

AsRangeQueryFilter returns the union data inside the EventLogicalFilter_Or_Item as a RangeQueryFilter

func (EventLogicalFilter_Or_Item) AsRelativeRangeQueryFilter

func (t EventLogicalFilter_Or_Item) AsRelativeRangeQueryFilter() (RelativeRangeQueryFilter, error)

AsRelativeRangeQueryFilter returns the union data inside the EventLogicalFilter_Or_Item as a RelativeRangeQueryFilter

func (*EventLogicalFilter_Or_Item) FromArrayMatchQueryFilter

func (t *EventLogicalFilter_Or_Item) FromArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

FromArrayMatchQueryFilter overwrites any union data inside the EventLogicalFilter_Or_Item as the provided ArrayMatchQueryFilter

func (*EventLogicalFilter_Or_Item) FromEventLogicalFilter

func (t *EventLogicalFilter_Or_Item) FromEventLogicalFilter(v EventLogicalFilter) error

FromEventLogicalFilter overwrites any union data inside the EventLogicalFilter_Or_Item as the provided EventLogicalFilter

func (*EventLogicalFilter_Or_Item) FromExistsQueryFilter

func (t *EventLogicalFilter_Or_Item) FromExistsQueryFilter(v ExistsQueryFilter) error

FromExistsQueryFilter overwrites any union data inside the EventLogicalFilter_Or_Item as the provided ExistsQueryFilter

func (*EventLogicalFilter_Or_Item) FromGeoQueryFilter

func (t *EventLogicalFilter_Or_Item) FromGeoQueryFilter(v GeoQueryFilter) error

FromGeoQueryFilter overwrites any union data inside the EventLogicalFilter_Or_Item as the provided GeoQueryFilter

func (*EventLogicalFilter_Or_Item) FromQueryFilter

func (t *EventLogicalFilter_Or_Item) FromQueryFilter(v QueryFilter) error

FromQueryFilter overwrites any union data inside the EventLogicalFilter_Or_Item as the provided QueryFilter

func (*EventLogicalFilter_Or_Item) FromRangeQueryFilter

func (t *EventLogicalFilter_Or_Item) FromRangeQueryFilter(v RangeQueryFilter) error

FromRangeQueryFilter overwrites any union data inside the EventLogicalFilter_Or_Item as the provided RangeQueryFilter

func (*EventLogicalFilter_Or_Item) FromRelativeRangeQueryFilter

func (t *EventLogicalFilter_Or_Item) FromRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

FromRelativeRangeQueryFilter overwrites any union data inside the EventLogicalFilter_Or_Item as the provided RelativeRangeQueryFilter

func (EventLogicalFilter_Or_Item) MarshalJSON

func (t EventLogicalFilter_Or_Item) MarshalJSON() ([]byte, error)

func (*EventLogicalFilter_Or_Item) MergeArrayMatchQueryFilter

func (t *EventLogicalFilter_Or_Item) MergeArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

MergeArrayMatchQueryFilter performs a merge with any union data inside the EventLogicalFilter_Or_Item, using the provided ArrayMatchQueryFilter

func (*EventLogicalFilter_Or_Item) MergeEventLogicalFilter

func (t *EventLogicalFilter_Or_Item) MergeEventLogicalFilter(v EventLogicalFilter) error

MergeEventLogicalFilter performs a merge with any union data inside the EventLogicalFilter_Or_Item, using the provided EventLogicalFilter

func (*EventLogicalFilter_Or_Item) MergeExistsQueryFilter

func (t *EventLogicalFilter_Or_Item) MergeExistsQueryFilter(v ExistsQueryFilter) error

MergeExistsQueryFilter performs a merge with any union data inside the EventLogicalFilter_Or_Item, using the provided ExistsQueryFilter

func (*EventLogicalFilter_Or_Item) MergeGeoQueryFilter

func (t *EventLogicalFilter_Or_Item) MergeGeoQueryFilter(v GeoQueryFilter) error

MergeGeoQueryFilter performs a merge with any union data inside the EventLogicalFilter_Or_Item, using the provided GeoQueryFilter

func (*EventLogicalFilter_Or_Item) MergeQueryFilter

func (t *EventLogicalFilter_Or_Item) MergeQueryFilter(v QueryFilter) error

MergeQueryFilter performs a merge with any union data inside the EventLogicalFilter_Or_Item, using the provided QueryFilter

func (*EventLogicalFilter_Or_Item) MergeRangeQueryFilter

func (t *EventLogicalFilter_Or_Item) MergeRangeQueryFilter(v RangeQueryFilter) error

MergeRangeQueryFilter performs a merge with any union data inside the EventLogicalFilter_Or_Item, using the provided RangeQueryFilter

func (*EventLogicalFilter_Or_Item) MergeRelativeRangeQueryFilter

func (t *EventLogicalFilter_Or_Item) MergeRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

MergeRelativeRangeQueryFilter performs a merge with any union data inside the EventLogicalFilter_Or_Item, using the provided RelativeRangeQueryFilter

func (*EventLogicalFilter_Or_Item) UnmarshalJSON

func (t *EventLogicalFilter_Or_Item) UnmarshalJSON(b []byte) error

type EventParams

type EventParams struct {
	// Email The email address sent by the user
	//
	// Example: Rhea.Franecki@example.org
	Email *string `json:"email,omitempty"`

	// Phone The phone number sent by the user
	//
	// Example: +16175551212
	Phone *string `json:"phone,omitempty"`

	// Username The username sent by the user
	//
	// Example: superhero123
	Username *string `json:"username,omitempty"`
}

EventParams The params object

type EventSignals

type EventSignals string

EventSignals defines model for Event.Signals.

const (
	AbuseIp                     EventSignals = "abuse_ip"
	BotBehavior                 EventSignals = "bot_behavior"
	CredentialStuffing          EventSignals = "credential_stuffing"
	DisposableEmailDomain       EventSignals = "disposable_email_domain"
	FraudulentEmailDomain       EventSignals = "fraudulent_email_domain"
	GeneratedEmail              EventSignals = "generated_email"
	HeadlessBrowser             EventSignals = "headless_browser"
	HighActivityAccount         EventSignals = "high_activity_account"
	HighActivityDevice          EventSignals = "high_activity_device"
	HighActivityDeviceSignature EventSignals = "high_activity_device_signature"
	HighActivityIp              EventSignals = "high_activity_ip"
	HttpClientLibrary           EventSignals = "http_client_library"
	ImpossibleTravel            EventSignals = "impossible_travel"
	InvalidDeviceData           EventSignals = "invalid_device_data"
	InvalidEmail                EventSignals = "invalid_email"
	MissingDeviceData           EventSignals = "missing_device_data"
	MissingHeaders              EventSignals = "missing_headers"
	MultipleAccountsPerDevice   EventSignals = "multiple_accounts_per_device"
	MultipleAliasesPerEmail     EventSignals = "multiple_aliases_per_email"
	NewCountry                  EventSignals = "new_country"
	NewDevice                   EventSignals = "new_device"
	NewDeviceType               EventSignals = "new_device_type"
	NewIsp                      EventSignals = "new_isp"
	NewLanguage                 EventSignals = "new_language"
	NewOs                       EventSignals = "new_os"
	NoInteractions              EventSignals = "no_interactions"
	ResidentialProxyAccess      EventSignals = "residential_proxy_access"
	SpoofedDevice               EventSignals = "spoofed_device"
	WebCrawler                  EventSignals = "web_crawler"
)

Defines values for EventSignals.

func (EventSignals) Valid

func (e EventSignals) Valid() bool

Valid indicates whether the value is a known member of the EventSignals enum.

type Event_Changeset_AdditionalProperties

type Event_Changeset_AdditionalProperties struct {
	// contains filtered or unexported fields
}

Event_Changeset_AdditionalProperties defines model for Event.changeset.AdditionalProperties.

func (Event_Changeset_AdditionalProperties) AsChangedChangesetEntry

func (t Event_Changeset_AdditionalProperties) AsChangedChangesetEntry() (ChangedChangesetEntry, error)

AsChangedChangesetEntry returns the union data inside the Event_Changeset_AdditionalProperties as a ChangedChangesetEntry

func (Event_Changeset_AdditionalProperties) AsChangesetEntry

AsChangesetEntry returns the union data inside the Event_Changeset_AdditionalProperties as a ChangesetEntry

func (*Event_Changeset_AdditionalProperties) FromChangedChangesetEntry

func (t *Event_Changeset_AdditionalProperties) FromChangedChangesetEntry(v ChangedChangesetEntry) error

FromChangedChangesetEntry overwrites any union data inside the Event_Changeset_AdditionalProperties as the provided ChangedChangesetEntry

func (*Event_Changeset_AdditionalProperties) FromChangesetEntry

FromChangesetEntry overwrites any union data inside the Event_Changeset_AdditionalProperties as the provided ChangesetEntry

func (Event_Changeset_AdditionalProperties) MarshalJSON

func (t Event_Changeset_AdditionalProperties) MarshalJSON() ([]byte, error)

func (*Event_Changeset_AdditionalProperties) MergeChangedChangesetEntry

func (t *Event_Changeset_AdditionalProperties) MergeChangedChangesetEntry(v ChangedChangesetEntry) error

MergeChangedChangesetEntry performs a merge with any union data inside the Event_Changeset_AdditionalProperties, using the provided ChangedChangesetEntry

func (*Event_Changeset_AdditionalProperties) MergeChangesetEntry

func (t *Event_Changeset_AdditionalProperties) MergeChangesetEntry(v ChangesetEntry) error

MergeChangesetEntry performs a merge with any union data inside the Event_Changeset_AdditionalProperties, using the provided ChangesetEntry

func (*Event_Changeset_AdditionalProperties) UnmarshalJSON

func (t *Event_Changeset_AdditionalProperties) UnmarshalJSON(b []byte) error

type Events

type Events struct {
	// Data The matching events. When the request sets `columns`, each event contains only those fields, nested by their dot-separated path (`user.id` is returned as `{"user": {"id": ...}}`).
	Data []Event `json:"data"`

	// TotalCount Example: 1
	TotalCount int `json:"total_count"`
}

Events defines model for Events.

type ExistsHavingQueryFilter

type ExistsHavingQueryFilter struct {
	// Field Field name. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	Field string `json:"field"`

	// Func Aggregation function to be applied on the field
	//
	// Example: $sum
	Func Func `json:"func"`

	// Op Example: $exists
	Op ExistsHavingQueryFilterOp `json:"op"`

	// Options Options specific for each aggregation function
	Options *map[string]interface{} `json:"options,omitempty"`

	// Transform Describes how to transform the column value. The transformation is applied before the `func` aggregation function.
	Transform *Transform `json:"transform,omitempty"`
}

ExistsHavingQueryFilter defines model for ExistsHavingQueryFilter.

type ExistsHavingQueryFilterOp

type ExistsHavingQueryFilterOp string

ExistsHavingQueryFilterOp Example: $exists

const (
	ExistsHavingQueryFilterOpExists  ExistsHavingQueryFilterOp = "$exists"
	ExistsHavingQueryFilterOpNexists ExistsHavingQueryFilterOp = "$nexists"
)

Defines values for ExistsHavingQueryFilterOp.

func (ExistsHavingQueryFilterOp) Valid

func (e ExistsHavingQueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the ExistsHavingQueryFilterOp enum.

type ExistsQueryFilter

type ExistsQueryFilter struct {
	// Field Field name. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	//
	// Example: name
	Field string `json:"field"`

	// Op Example: $exists
	Op ExistsQueryFilterOp `json:"op"`
}

ExistsQueryFilter defines model for ExistsQueryFilter.

type ExistsQueryFilterOp

type ExistsQueryFilterOp string

ExistsQueryFilterOp Example: $exists

const (
	ExistsQueryFilterOpExists  ExistsQueryFilterOp = "$exists"
	ExistsQueryFilterOpNexists ExistsQueryFilterOp = "$nexists"
)

Defines values for ExistsQueryFilterOp.

func (ExistsQueryFilterOp) Valid

func (e ExistsQueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the ExistsQueryFilterOp enum.

type FiatAmount

type FiatAmount struct {
	// Currency ISO Currency denomination, required when value is provided
	//
	// | Code | Description |
	// | - | - |
	// | AED | UAE Dirham |
	// | ALL | Albanian Lek |
	// | AMD | Armenian Dram |
	// | ANG | Antillian Guilder |
	// | AOA | Angolan Kwanza |
	// | ARS | Nuevo Argentine Peso |
	// | AUD | Australian Dollar |
	// | AWG | Aruban Guilder |
	// | AZN | Azerbaijani manat |
	// | BAM | Bosnia and Herzegovina Convertible Marks |
	// | BBD | Barbados Dollar |
	// | BDT | Banggladesh Taka |
	// | BGN | New Bulgarian Lev |
	// | BHD | Bahraini Dinar |
	// | BMD | Bermudian Dollar |
	// | BND | Brunei Dollar |
	// | BOB | Bolivia Boliviano |
	// | BRL | Brazilian Real |
	// | BSD | Bahamian Dollar |
	// | BWP | Botswana Pula |
	// | BYN | New Belarusian Ruble |
	// | BZD | Belize Dollar |
	// | CAD | Canadian Dollar |
	// | CHF | Swiss Franc |
	// | CLP | Chilean Peso |
	// | CNY | Yuan Renminbi |
	// | COP | Colombian Peso |
	// | CRC | Costa Rican Colon |
	// | CUP | Cuban Peso |
	// | CVE | Cape Verdi Escudo |
	// | CZK | Czech Koruna |
	// | DJF | Djibouti Franc |
	// | DKK | Danish Krone |
	// | DOP | Dominican Republic Peso |
	// | DZD | Algerian Dinar |
	// | EGP | Egyptian Pound |
	// | ETB | Ethiopian Birr |
	// | EUR | Euro |
	// | FJD | Fiji Dollar |
	// | FKP | Falkland Islands Pound |
	// | GBP | Pound Sterling |
	// | GEL | Georgian Lari |
	// | GHS | Ghanaian Cedi |
	// | GIP | Gibraltar Pound |
	// | GMD | Gambia Delasi |
	// | GNF | Guinea Franc |
	// | GTQ | Guatemala Quetzal |
	// | GYD | Guyanese Dollar |
	// | HKD | Hong Kong Dollar |
	// | HNL | Honduras Lempira |
	// | HRK | Croatia Kuna |
	// | HTG | Haitian Gourde |
	// | HUF | Hungarian Forint |
	// | IDR | Indonesian Rupiah |
	// | ILS | New Israeli Scheqel |
	// | INR | Indian Rupee |
	// | IQD | Iraqi Dinar |
	// | ISK | Iceland Krona |
	// | JMD | Jamaican Dollar |
	// | JOD | Jordanian Dinar |
	// | JPY | Japanese Yen |
	// | KES | Kenyan Shilling |
	// | KGS | Kyrgyzstan Som |
	// | KHR | Cambodia Riel |
	// | KMF | Comoro Franc |
	// | KRW | South-Korean Won |
	// | KWD | Kuwaiti Dinar |
	// | KYD | Cayman Islands Dollar |
	// | KZT | Kazakhstani Tenge |
	// | LAK | Laos Kip |
	// | LBP | Lebanese Pound |
	// | LKR | Sri Lanka Rupee |
	// | LYD | Libyan Dinar |
	// | MAD | Moroccan Dirham |
	// | MDL | Moldovia Leu |
	// | MKD | Macedonian Denar |
	// | MMK | Myanmar Kyat |
	// | MNT | Mongolia Tugrik |
	// | MOP | Macau Pataca |
	// | MRU | Mauritania Ouguiya |
	// | MUR | Mauritius Rupee |
	// | MVR | Maldives Rufiyaa |
	// | MWK | Malawi Kwacha |
	// | MXN | Mexican Peso |
	// | MYR | Malaysian Ringgit |
	// | MZN | Mozambican Metical |
	// | NAD | Namibian Dollar |
	// | NGN | Nigerian Naira |
	// | NIO | Nicaragua Cordoba Oro |
	// | NOK | Norwegian Krone |
	// | NPR | Nepalese Rupee |
	// | NZD | New Zealand Dollar |
	// | OMR | Rial Omani |
	// | PAB | Panamanian Balboa |
	// | PEN | Peruvian Nuevo Sol |
	// | PGK | New Guinea Kina |
	// | PHP | Philippine Peso |
	// | PKR | Pakistan Rupee |
	// | PLN | New Polish Zloty |
	// | PYG | Paraguay Guarani |
	// | QAR | Qatari Rial |
	// | RON | New Romanian Lei |
	// | RSD | Serbian Dinar |
	// | RUB | Russian Ruble |
	// | RWF | Rwanda Franc |
	// | SAR | Saudi Riyal |
	// | SBD | Solomon Island Dollar |
	// | SCR | Seychelles Rupee |
	// | SEK | Swedish Krone |
	// | SGD | Singapore Dollar |
	// | SHP | St. Helena Pound |
	// | SLL | Sierra Leone Leone |
	// | SOS | Somalia Shilling |
	// | SRD | Surinamese Dollar |
	// | STN | Sao Tome & Principe Dobra |
	// | SVC | El Salvador Colón |
	// | SZL | Swaziland Lilangeni |
	// | THB | Thai Baht |
	// | TND | Tunisian Dinar |
	// | TOP | Tonga Pa'anga |
	// | TRY | New Turkish Lira |
	// | TTD | Trinidad & Tobago Dollar |
	// | TWD | New Taiwan Dollar |
	// | TZS | Tanzanian Shilling |
	// | UAH | Ukraine Hryvnia |
	// | UGX | Uganda Shilling |
	// | USD | US Dollar |
	// | UYU | Peso Uruguayo |
	// | UZS | Uzbekistani Som |
	// | VEF | Venezuelan Bolívar |
	// | VND | Vietnamese New Dong |
	// | VUV | Vanuatu Vatu |
	// | WST | Samoan Tala |
	// | XAF | CFA Franc BEAC |
	// | XCD | East Caribbean Dollar |
	// | XOF | CFA Franc BCEAO |
	// | XPF | CFP Franc |
	// | YER | Yemeni Rial |
	// | ZAR | South African Rand |
	// | ZMW | Zambian Kwacha |
	//
	//
	// Example: USD
	Currency *FiatAmountCurrency `json:"currency,omitempty"`
	Type     FiatAmountType      `json:"type"`

	// Value Monetary amount of transaction with decimals
	//
	// Example: 499.99
	Value *string `json:"value,omitempty"`
}

FiatAmount defines model for FiatAmount.

type FiatAmountCurrency

type FiatAmountCurrency string

FiatAmountCurrency ISO Currency denomination, required when value is provided

| Code | Description | | - | - | | AED | UAE Dirham | | ALL | Albanian Lek | | AMD | Armenian Dram | | ANG | Antillian Guilder | | AOA | Angolan Kwanza | | ARS | Nuevo Argentine Peso | | AUD | Australian Dollar | | AWG | Aruban Guilder | | AZN | Azerbaijani manat | | BAM | Bosnia and Herzegovina Convertible Marks | | BBD | Barbados Dollar | | BDT | Banggladesh Taka | | BGN | New Bulgarian Lev | | BHD | Bahraini Dinar | | BMD | Bermudian Dollar | | BND | Brunei Dollar | | BOB | Bolivia Boliviano | | BRL | Brazilian Real | | BSD | Bahamian Dollar | | BWP | Botswana Pula | | BYN | New Belarusian Ruble | | BZD | Belize Dollar | | CAD | Canadian Dollar | | CHF | Swiss Franc | | CLP | Chilean Peso | | CNY | Yuan Renminbi | | COP | Colombian Peso | | CRC | Costa Rican Colon | | CUP | Cuban Peso | | CVE | Cape Verdi Escudo | | CZK | Czech Koruna | | DJF | Djibouti Franc | | DKK | Danish Krone | | DOP | Dominican Republic Peso | | DZD | Algerian Dinar | | EGP | Egyptian Pound | | ETB | Ethiopian Birr | | EUR | Euro | | FJD | Fiji Dollar | | FKP | Falkland Islands Pound | | GBP | Pound Sterling | | GEL | Georgian Lari | | GHS | Ghanaian Cedi | | GIP | Gibraltar Pound | | GMD | Gambia Delasi | | GNF | Guinea Franc | | GTQ | Guatemala Quetzal | | GYD | Guyanese Dollar | | HKD | Hong Kong Dollar | | HNL | Honduras Lempira | | HRK | Croatia Kuna | | HTG | Haitian Gourde | | HUF | Hungarian Forint | | IDR | Indonesian Rupiah | | ILS | New Israeli Scheqel | | INR | Indian Rupee | | IQD | Iraqi Dinar | | ISK | Iceland Krona | | JMD | Jamaican Dollar | | JOD | Jordanian Dinar | | JPY | Japanese Yen | | KES | Kenyan Shilling | | KGS | Kyrgyzstan Som | | KHR | Cambodia Riel | | KMF | Comoro Franc | | KRW | South-Korean Won | | KWD | Kuwaiti Dinar | | KYD | Cayman Islands Dollar | | KZT | Kazakhstani Tenge | | LAK | Laos Kip | | LBP | Lebanese Pound | | LKR | Sri Lanka Rupee | | LYD | Libyan Dinar | | MAD | Moroccan Dirham | | MDL | Moldovia Leu | | MKD | Macedonian Denar | | MMK | Myanmar Kyat | | MNT | Mongolia Tugrik | | MOP | Macau Pataca | | MRU | Mauritania Ouguiya | | MUR | Mauritius Rupee | | MVR | Maldives Rufiyaa | | MWK | Malawi Kwacha | | MXN | Mexican Peso | | MYR | Malaysian Ringgit | | MZN | Mozambican Metical | | NAD | Namibian Dollar | | NGN | Nigerian Naira | | NIO | Nicaragua Cordoba Oro | | NOK | Norwegian Krone | | NPR | Nepalese Rupee | | NZD | New Zealand Dollar | | OMR | Rial Omani | | PAB | Panamanian Balboa | | PEN | Peruvian Nuevo Sol | | PGK | New Guinea Kina | | PHP | Philippine Peso | | PKR | Pakistan Rupee | | PLN | New Polish Zloty | | PYG | Paraguay Guarani | | QAR | Qatari Rial | | RON | New Romanian Lei | | RSD | Serbian Dinar | | RUB | Russian Ruble | | RWF | Rwanda Franc | | SAR | Saudi Riyal | | SBD | Solomon Island Dollar | | SCR | Seychelles Rupee | | SEK | Swedish Krone | | SGD | Singapore Dollar | | SHP | St. Helena Pound | | SLL | Sierra Leone Leone | | SOS | Somalia Shilling | | SRD | Surinamese Dollar | | STN | Sao Tome & Principe Dobra | | SVC | El Salvador Colón | | SZL | Swaziland Lilangeni | | THB | Thai Baht | | TND | Tunisian Dinar | | TOP | Tonga Pa'anga | | TRY | New Turkish Lira | | TTD | Trinidad & Tobago Dollar | | TWD | New Taiwan Dollar | | TZS | Tanzanian Shilling | | UAH | Ukraine Hryvnia | | UGX | Uganda Shilling | | USD | US Dollar | | UYU | Peso Uruguayo | | UZS | Uzbekistani Som | | VEF | Venezuelan Bolívar | | VND | Vietnamese New Dong | | VUV | Vanuatu Vatu | | WST | Samoan Tala | | XAF | CFA Franc BEAC | | XCD | East Caribbean Dollar | | XOF | CFA Franc BCEAO | | XPF | CFP Franc | | YER | Yemeni Rial | | ZAR | South African Rand | | ZMW | Zambian Kwacha |

Example: USD

const (
	AED FiatAmountCurrency = "AED"
	ALL FiatAmountCurrency = "ALL"
	AMD FiatAmountCurrency = "AMD"
	ANG FiatAmountCurrency = "ANG"
	AOA FiatAmountCurrency = "AOA"
	ARS FiatAmountCurrency = "ARS"
	AUD FiatAmountCurrency = "AUD"
	AWG FiatAmountCurrency = "AWG"
	AZN FiatAmountCurrency = "AZN"
	BAM FiatAmountCurrency = "BAM"
	BBD FiatAmountCurrency = "BBD"
	BDT FiatAmountCurrency = "BDT"
	BGN FiatAmountCurrency = "BGN"
	BHD FiatAmountCurrency = "BHD"
	BMD FiatAmountCurrency = "BMD"
	BND FiatAmountCurrency = "BND"
	BOB FiatAmountCurrency = "BOB"
	BRL FiatAmountCurrency = "BRL"
	BSD FiatAmountCurrency = "BSD"
	BWP FiatAmountCurrency = "BWP"
	BYN FiatAmountCurrency = "BYN"
	BZD FiatAmountCurrency = "BZD"
	CAD FiatAmountCurrency = "CAD"
	CHF FiatAmountCurrency = "CHF"
	CLP FiatAmountCurrency = "CLP"
	CNY FiatAmountCurrency = "CNY"
	COP FiatAmountCurrency = "COP"
	CRC FiatAmountCurrency = "CRC"
	CUP FiatAmountCurrency = "CUP"
	CVE FiatAmountCurrency = "CVE"
	CZK FiatAmountCurrency = "CZK"
	DJF FiatAmountCurrency = "DJF"
	DKK FiatAmountCurrency = "DKK"
	DOP FiatAmountCurrency = "DOP"
	DZD FiatAmountCurrency = "DZD"
	EGP FiatAmountCurrency = "EGP"
	ETB FiatAmountCurrency = "ETB"
	EUR FiatAmountCurrency = "EUR"
	FJD FiatAmountCurrency = "FJD"
	FKP FiatAmountCurrency = "FKP"
	GBP FiatAmountCurrency = "GBP"
	GEL FiatAmountCurrency = "GEL"
	GHS FiatAmountCurrency = "GHS"
	GIP FiatAmountCurrency = "GIP"
	GMD FiatAmountCurrency = "GMD"
	GNF FiatAmountCurrency = "GNF"
	GTQ FiatAmountCurrency = "GTQ"
	GYD FiatAmountCurrency = "GYD"
	HKD FiatAmountCurrency = "HKD"
	HNL FiatAmountCurrency = "HNL"
	HRK FiatAmountCurrency = "HRK"
	HTG FiatAmountCurrency = "HTG"
	HUF FiatAmountCurrency = "HUF"
	IDR FiatAmountCurrency = "IDR"
	ILS FiatAmountCurrency = "ILS"
	INR FiatAmountCurrency = "INR"
	IQD FiatAmountCurrency = "IQD"
	ISK FiatAmountCurrency = "ISK"
	JMD FiatAmountCurrency = "JMD"
	JOD FiatAmountCurrency = "JOD"
	JPY FiatAmountCurrency = "JPY"
	KES FiatAmountCurrency = "KES"
	KGS FiatAmountCurrency = "KGS"
	KHR FiatAmountCurrency = "KHR"
	KMF FiatAmountCurrency = "KMF"
	KRW FiatAmountCurrency = "KRW"
	KWD FiatAmountCurrency = "KWD"
	KYD FiatAmountCurrency = "KYD"
	KZT FiatAmountCurrency = "KZT"
	LAK FiatAmountCurrency = "LAK"
	LBP FiatAmountCurrency = "LBP"
	LKR FiatAmountCurrency = "LKR"
	LYD FiatAmountCurrency = "LYD"
	MAD FiatAmountCurrency = "MAD"
	MDL FiatAmountCurrency = "MDL"
	MKD FiatAmountCurrency = "MKD"
	MMK FiatAmountCurrency = "MMK"
	MNT FiatAmountCurrency = "MNT"
	MOP FiatAmountCurrency = "MOP"
	MRU FiatAmountCurrency = "MRU"
	MUR FiatAmountCurrency = "MUR"
	MVR FiatAmountCurrency = "MVR"
	MWK FiatAmountCurrency = "MWK"
	MXN FiatAmountCurrency = "MXN"
	MYR FiatAmountCurrency = "MYR"
	MZN FiatAmountCurrency = "MZN"
	NAD FiatAmountCurrency = "NAD"
	NGN FiatAmountCurrency = "NGN"
	NIO FiatAmountCurrency = "NIO"
	NOK FiatAmountCurrency = "NOK"
	NPR FiatAmountCurrency = "NPR"
	NZD FiatAmountCurrency = "NZD"
	OMR FiatAmountCurrency = "OMR"
	PAB FiatAmountCurrency = "PAB"
	PEN FiatAmountCurrency = "PEN"
	PGK FiatAmountCurrency = "PGK"
	PHP FiatAmountCurrency = "PHP"
	PKR FiatAmountCurrency = "PKR"
	PLN FiatAmountCurrency = "PLN"
	PYG FiatAmountCurrency = "PYG"
	QAR FiatAmountCurrency = "QAR"
	RON FiatAmountCurrency = "RON"
	RSD FiatAmountCurrency = "RSD"
	RUB FiatAmountCurrency = "RUB"
	RWF FiatAmountCurrency = "RWF"
	SAR FiatAmountCurrency = "SAR"
	SBD FiatAmountCurrency = "SBD"
	SCR FiatAmountCurrency = "SCR"
	SEK FiatAmountCurrency = "SEK"
	SGD FiatAmountCurrency = "SGD"
	SHP FiatAmountCurrency = "SHP"
	SLL FiatAmountCurrency = "SLL"
	SOS FiatAmountCurrency = "SOS"
	SRD FiatAmountCurrency = "SRD"
	STN FiatAmountCurrency = "STN"
	SVC FiatAmountCurrency = "SVC"
	SZL FiatAmountCurrency = "SZL"
	THB FiatAmountCurrency = "THB"
	TND FiatAmountCurrency = "TND"
	TOP FiatAmountCurrency = "TOP"
	TRY FiatAmountCurrency = "TRY"
	TTD FiatAmountCurrency = "TTD"
	TWD FiatAmountCurrency = "TWD"
	TZS FiatAmountCurrency = "TZS"
	UAH FiatAmountCurrency = "UAH"
	UGX FiatAmountCurrency = "UGX"
	USD FiatAmountCurrency = "USD"
	UYU FiatAmountCurrency = "UYU"
	UZS FiatAmountCurrency = "UZS"
	VEF FiatAmountCurrency = "VEF"
	VND FiatAmountCurrency = "VND"
	VUV FiatAmountCurrency = "VUV"
	WST FiatAmountCurrency = "WST"
	XAF FiatAmountCurrency = "XAF"
	XCD FiatAmountCurrency = "XCD"
	XOF FiatAmountCurrency = "XOF"
	XPF FiatAmountCurrency = "XPF"
	YER FiatAmountCurrency = "YER"
	ZAR FiatAmountCurrency = "ZAR"
	ZMW FiatAmountCurrency = "ZMW"
)

Defines values for FiatAmountCurrency.

func (FiatAmountCurrency) Valid

func (e FiatAmountCurrency) Valid() bool

Valid indicates whether the value is a known member of the FiatAmountCurrency enum.

type FiatAmountType

type FiatAmountType string

FiatAmountType defines model for FiatAmount.Type.

const (
	Fiat FiatAmountType = "$fiat"
)

Defines values for FiatAmountType.

func (FiatAmountType) Valid

func (e FiatAmountType) Valid() bool

Valid indicates whether the value is a known member of the FiatAmountType enum.

type Filter

type Filter struct {
	// contains filtered or unexported fields
}

Filter defines model for Filter.

func (Filter) AsChallengeFilterRequest

func (t Filter) AsChallengeFilterRequest() (ChallengeFilterRequest, error)

AsChallengeFilterRequest returns the union data inside the Filter as a ChallengeFilterRequest

func (Filter) AsCustomFilterRequest

func (t Filter) AsCustomFilterRequest() (CustomFilterRequest, error)

AsCustomFilterRequest returns the union data inside the Filter as a CustomFilterRequest

func (Filter) AsLoginFilterRequest

func (t Filter) AsLoginFilterRequest() (LoginFilterRequest, error)

AsLoginFilterRequest returns the union data inside the Filter as a LoginFilterRequest

func (Filter) AsPasswordResetFilterRequest

func (t Filter) AsPasswordResetFilterRequest() (PasswordResetFilterRequest, error)

AsPasswordResetFilterRequest returns the union data inside the Filter as a PasswordResetFilterRequest

func (Filter) AsRegistrationFilterRequest

func (t Filter) AsRegistrationFilterRequest() (RegistrationFilterRequest, error)

AsRegistrationFilterRequest returns the union data inside the Filter as a RegistrationFilterRequest

func (Filter) AsTransactionFilterRequest

func (t Filter) AsTransactionFilterRequest() (TransactionFilterRequest, error)

AsTransactionFilterRequest returns the union data inside the Filter as a TransactionFilterRequest

func (Filter) Discriminator

func (t Filter) Discriminator() (string, error)

func (*Filter) FromChallengeFilterRequest

func (t *Filter) FromChallengeFilterRequest(v ChallengeFilterRequest) error

FromChallengeFilterRequest overwrites any union data inside the Filter as the provided ChallengeFilterRequest

func (*Filter) FromCustomFilterRequest

func (t *Filter) FromCustomFilterRequest(v CustomFilterRequest) error

FromCustomFilterRequest overwrites any union data inside the Filter as the provided CustomFilterRequest

func (*Filter) FromLoginFilterRequest

func (t *Filter) FromLoginFilterRequest(v LoginFilterRequest) error

FromLoginFilterRequest overwrites any union data inside the Filter as the provided LoginFilterRequest

func (*Filter) FromPasswordResetFilterRequest

func (t *Filter) FromPasswordResetFilterRequest(v PasswordResetFilterRequest) error

FromPasswordResetFilterRequest overwrites any union data inside the Filter as the provided PasswordResetFilterRequest

func (*Filter) FromRegistrationFilterRequest

func (t *Filter) FromRegistrationFilterRequest(v RegistrationFilterRequest) error

FromRegistrationFilterRequest overwrites any union data inside the Filter as the provided RegistrationFilterRequest

func (*Filter) FromTransactionFilterRequest

func (t *Filter) FromTransactionFilterRequest(v TransactionFilterRequest) error

FromTransactionFilterRequest overwrites any union data inside the Filter as the provided TransactionFilterRequest

func (Filter) MarshalJSON

func (t Filter) MarshalJSON() ([]byte, error)

func (*Filter) MergeChallengeFilterRequest

func (t *Filter) MergeChallengeFilterRequest(v ChallengeFilterRequest) error

MergeChallengeFilterRequest performs a merge with any union data inside the Filter, using the provided ChallengeFilterRequest

func (*Filter) MergeCustomFilterRequest

func (t *Filter) MergeCustomFilterRequest(v CustomFilterRequest) error

MergeCustomFilterRequest performs a merge with any union data inside the Filter, using the provided CustomFilterRequest

func (*Filter) MergeLoginFilterRequest

func (t *Filter) MergeLoginFilterRequest(v LoginFilterRequest) error

MergeLoginFilterRequest performs a merge with any union data inside the Filter, using the provided LoginFilterRequest

func (*Filter) MergePasswordResetFilterRequest

func (t *Filter) MergePasswordResetFilterRequest(v PasswordResetFilterRequest) error

MergePasswordResetFilterRequest performs a merge with any union data inside the Filter, using the provided PasswordResetFilterRequest

func (*Filter) MergeRegistrationFilterRequest

func (t *Filter) MergeRegistrationFilterRequest(v RegistrationFilterRequest) error

MergeRegistrationFilterRequest performs a merge with any union data inside the Filter, using the provided RegistrationFilterRequest

func (*Filter) MergeTransactionFilterRequest

func (t *Filter) MergeTransactionFilterRequest(v TransactionFilterRequest) error

MergeTransactionFilterRequest performs a merge with any union data inside the Filter, using the provided TransactionFilterRequest

func (*Filter) UnmarshalJSON

func (t *Filter) UnmarshalJSON(b []byte) error

func (Filter) ValueByDiscriminator

func (t Filter) ValueByDiscriminator() (interface{}, error)

type FilterAndRiskResponse

type FilterAndRiskResponse struct {
	// contains filtered or unexported fields
}

FilterAndRiskResponse defines model for FilterAndRiskResponse.

func (FilterAndRiskResponse) AsChallengeResponse

func (t FilterAndRiskResponse) AsChallengeResponse() (ChallengeResponse, error)

AsChallengeResponse returns the union data inside the FilterAndRiskResponse as a ChallengeResponse

func (FilterAndRiskResponse) AsCustomResponse

func (t FilterAndRiskResponse) AsCustomResponse() (CustomResponse, error)

AsCustomResponse returns the union data inside the FilterAndRiskResponse as a CustomResponse

func (FilterAndRiskResponse) AsLoginResponse

func (t FilterAndRiskResponse) AsLoginResponse() (LoginResponse, error)

AsLoginResponse returns the union data inside the FilterAndRiskResponse as a LoginResponse

func (FilterAndRiskResponse) AsLogoutResponse

func (t FilterAndRiskResponse) AsLogoutResponse() (LogoutResponse, error)

AsLogoutResponse returns the union data inside the FilterAndRiskResponse as a LogoutResponse

func (FilterAndRiskResponse) AsProfileResetResponse

func (t FilterAndRiskResponse) AsProfileResetResponse() (ProfileResetResponse, error)

AsProfileResetResponse returns the union data inside the FilterAndRiskResponse as a ProfileResetResponse

func (FilterAndRiskResponse) AsProfileUpdateResponse

func (t FilterAndRiskResponse) AsProfileUpdateResponse() (ProfileUpdateResponse, error)

AsProfileUpdateResponse returns the union data inside the FilterAndRiskResponse as a ProfileUpdateResponse

func (FilterAndRiskResponse) AsRegistrationResponse

func (t FilterAndRiskResponse) AsRegistrationResponse() (RegistrationResponse, error)

AsRegistrationResponse returns the union data inside the FilterAndRiskResponse as a RegistrationResponse

func (FilterAndRiskResponse) AsTransactionResponse

func (t FilterAndRiskResponse) AsTransactionResponse() (TransactionResponse, error)

AsTransactionResponse returns the union data inside the FilterAndRiskResponse as a TransactionResponse

func (FilterAndRiskResponse) Discriminator

func (t FilterAndRiskResponse) Discriminator() (string, error)

func (*FilterAndRiskResponse) FromChallengeResponse

func (t *FilterAndRiskResponse) FromChallengeResponse(v ChallengeResponse) error

FromChallengeResponse overwrites any union data inside the FilterAndRiskResponse as the provided ChallengeResponse

func (*FilterAndRiskResponse) FromCustomResponse

func (t *FilterAndRiskResponse) FromCustomResponse(v CustomResponse) error

FromCustomResponse overwrites any union data inside the FilterAndRiskResponse as the provided CustomResponse

func (*FilterAndRiskResponse) FromLoginResponse

func (t *FilterAndRiskResponse) FromLoginResponse(v LoginResponse) error

FromLoginResponse overwrites any union data inside the FilterAndRiskResponse as the provided LoginResponse

func (*FilterAndRiskResponse) FromLogoutResponse

func (t *FilterAndRiskResponse) FromLogoutResponse(v LogoutResponse) error

FromLogoutResponse overwrites any union data inside the FilterAndRiskResponse as the provided LogoutResponse

func (*FilterAndRiskResponse) FromProfileResetResponse

func (t *FilterAndRiskResponse) FromProfileResetResponse(v ProfileResetResponse) error

FromProfileResetResponse overwrites any union data inside the FilterAndRiskResponse as the provided ProfileResetResponse

func (*FilterAndRiskResponse) FromProfileUpdateResponse

func (t *FilterAndRiskResponse) FromProfileUpdateResponse(v ProfileUpdateResponse) error

FromProfileUpdateResponse overwrites any union data inside the FilterAndRiskResponse as the provided ProfileUpdateResponse

func (*FilterAndRiskResponse) FromRegistrationResponse

func (t *FilterAndRiskResponse) FromRegistrationResponse(v RegistrationResponse) error

FromRegistrationResponse overwrites any union data inside the FilterAndRiskResponse as the provided RegistrationResponse

func (*FilterAndRiskResponse) FromTransactionResponse

func (t *FilterAndRiskResponse) FromTransactionResponse(v TransactionResponse) error

FromTransactionResponse overwrites any union data inside the FilterAndRiskResponse as the provided TransactionResponse

func (FilterAndRiskResponse) MarshalJSON

func (t FilterAndRiskResponse) MarshalJSON() ([]byte, error)

func (*FilterAndRiskResponse) MergeChallengeResponse

func (t *FilterAndRiskResponse) MergeChallengeResponse(v ChallengeResponse) error

MergeChallengeResponse performs a merge with any union data inside the FilterAndRiskResponse, using the provided ChallengeResponse

func (*FilterAndRiskResponse) MergeCustomResponse

func (t *FilterAndRiskResponse) MergeCustomResponse(v CustomResponse) error

MergeCustomResponse performs a merge with any union data inside the FilterAndRiskResponse, using the provided CustomResponse

func (*FilterAndRiskResponse) MergeLoginResponse

func (t *FilterAndRiskResponse) MergeLoginResponse(v LoginResponse) error

MergeLoginResponse performs a merge with any union data inside the FilterAndRiskResponse, using the provided LoginResponse

func (*FilterAndRiskResponse) MergeLogoutResponse

func (t *FilterAndRiskResponse) MergeLogoutResponse(v LogoutResponse) error

MergeLogoutResponse performs a merge with any union data inside the FilterAndRiskResponse, using the provided LogoutResponse

func (*FilterAndRiskResponse) MergeProfileResetResponse

func (t *FilterAndRiskResponse) MergeProfileResetResponse(v ProfileResetResponse) error

MergeProfileResetResponse performs a merge with any union data inside the FilterAndRiskResponse, using the provided ProfileResetResponse

func (*FilterAndRiskResponse) MergeProfileUpdateResponse

func (t *FilterAndRiskResponse) MergeProfileUpdateResponse(v ProfileUpdateResponse) error

MergeProfileUpdateResponse performs a merge with any union data inside the FilterAndRiskResponse, using the provided ProfileUpdateResponse

func (*FilterAndRiskResponse) MergeRegistrationResponse

func (t *FilterAndRiskResponse) MergeRegistrationResponse(v RegistrationResponse) error

MergeRegistrationResponse performs a merge with any union data inside the FilterAndRiskResponse, using the provided RegistrationResponse

func (*FilterAndRiskResponse) MergeTransactionResponse

func (t *FilterAndRiskResponse) MergeTransactionResponse(v TransactionResponse) error

MergeTransactionResponse performs a merge with any union data inside the FilterAndRiskResponse, using the provided TransactionResponse

func (*FilterAndRiskResponse) UnmarshalJSON

func (t *FilterAndRiskResponse) UnmarshalJSON(b []byte) error

func (FilterAndRiskResponse) ValueByDiscriminator

func (t FilterAndRiskResponse) ValueByDiscriminator() (interface{}, error)

type FilterJSONRequestBody

type FilterJSONRequestBody = Filter

FilterJSONRequestBody defines body for Filter for application/json ContentType.

type FilterRequest

type FilterRequest struct {
	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand *[]string `json:"expand,omitempty"`

	// MatchingUserId User id related connected with the request
	//
	// Example: 123
	MatchingUserId *string `json:"matching_user_id,omitempty"`
	Params         *struct {
		// Email The email address sent by the user
		//
		// Example: Rhea.Franecki@example.org
		Email *string `json:"email,omitempty"`

		// Phone The phone number sent by the user
		//
		// Example: +16175551212
		Phone *string `json:"phone,omitempty"`

		// Username The username sent by the user
		//
		// Example: superhero123
		Username *string `json:"username,omitempty"`
	} `json:"params,omitempty"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](https://docs.castle.io/docs/quickstart)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool `json:"skip_request_token_validation,omitempty"`
	User                       *struct {
		// Email The identified user's email address
		//
		// Example: Rhea.Franecki@example.org
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Email *string `json:"email,omitempty"`

		// Phone The identified user's phone number
		//
		// Example: +16175551212
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Phone *string `json:"phone,omitempty"`
	} `json:"user,omitempty"`
}

FilterRequest defines model for FilterRequest.

type FilterResponse

type FilterResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *FilterAndRiskResponse
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
}

func ParseFilterResponse

func ParseFilterResponse(rsp *http.Response) (*FilterResponse, error)

ParseFilterResponse parses an HTTP response from a FilterWithResponse call

func (FilterResponse) ContentType

func (r FilterResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (FilterResponse) GetBody

func (r FilterResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (FilterResponse) GetJSON201

func (r FilterResponse) GetJSON201() *FilterAndRiskResponse

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (FilterResponse) GetJSON422

func (r FilterResponse) GetJSON422() *UnprocessableEntity

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (FilterResponse) Status

func (r FilterResponse) Status() string

Status returns HTTPResponse.Status

func (FilterResponse) StatusCode

func (r FilterResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type FormulaRequest

type FormulaRequest struct {
	// Name Formula name
	Name string `json:"name"`

	// Value Formula to calculate value
	Value string `json:"value"`
}

FormulaRequest defines model for FormulaRequest.

type Func

type Func string

Func Aggregation function to be applied on the field

Example: $sum

const (
	FuncAvg           Func = "$avg"
	FuncCount         Func = "$count"
	FuncCountUnique   Func = "$count_unique"
	FuncDateHistogram Func = "$date_histogram"
	FuncLast          Func = "$last"
	FuncMax           Func = "$max"
	FuncMin           Func = "$min"
	FuncSum           Func = "$sum"
	FuncTopK          Func = "$top_k"
)

Defines values for Func.

func (Func) Valid

func (e Func) Valid() bool

Valid indicates whether the value is a known member of the Func enum.

type GeoDistanceFilter

type GeoDistanceFilter struct {
	Coordinates Coordinates `json:"coordinates"`

	// Distance Distance in radius from center point
	Distance float32 `json:"distance"`

	// Units Units to filter geolocation by
	Units GeoDistanceFilterUnits `json:"units"`
}

GeoDistanceFilter defines model for GeoDistanceFilter.

type GeoDistanceFilterUnits

type GeoDistanceFilterUnits string

GeoDistanceFilterUnits Units to filter geolocation by

Defines values for GeoDistanceFilterUnits.

func (GeoDistanceFilterUnits) Valid

func (e GeoDistanceFilterUnits) Valid() bool

Valid indicates whether the value is a known member of the GeoDistanceFilterUnits enum.

type GeoHavingQueryFilter

type GeoHavingQueryFilter struct {
	// Field Field name. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	Field string `json:"field"`

	// Func Aggregation function to be applied on the field
	//
	// Example: $sum
	Func Func `json:"func"`

	// Op Example: $geo
	Op GeoHavingQueryFilterOp `json:"op"`

	// Options Options specific for each aggregation function
	Options *map[string]interface{} `json:"options,omitempty"`

	// Transform Describes how to transform the column value. The transformation is applied before the `func` aggregation function.
	Transform *Transform                 `json:"transform,omitempty"`
	Value     GeoHavingQueryFilter_Value `json:"value"`
}

GeoHavingQueryFilter defines model for GeoHavingQueryFilter.

type GeoHavingQueryFilterOp

type GeoHavingQueryFilterOp string

GeoHavingQueryFilterOp Example: $geo

const (
	GeoHavingQueryFilterOpGeo GeoHavingQueryFilterOp = "$geo"
)

Defines values for GeoHavingQueryFilterOp.

func (GeoHavingQueryFilterOp) Valid

func (e GeoHavingQueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the GeoHavingQueryFilterOp enum.

type GeoHavingQueryFilter_Value

type GeoHavingQueryFilter_Value struct {
	// contains filtered or unexported fields
}

GeoHavingQueryFilter_Value defines model for GeoHavingQueryFilter.Value.

func (GeoHavingQueryFilter_Value) AsBoundingBoxFilter

func (t GeoHavingQueryFilter_Value) AsBoundingBoxFilter() (BoundingBoxFilter, error)

AsBoundingBoxFilter returns the union data inside the GeoHavingQueryFilter_Value as a BoundingBoxFilter

func (GeoHavingQueryFilter_Value) AsGeoDistanceFilter

func (t GeoHavingQueryFilter_Value) AsGeoDistanceFilter() (GeoDistanceFilter, error)

AsGeoDistanceFilter returns the union data inside the GeoHavingQueryFilter_Value as a GeoDistanceFilter

func (*GeoHavingQueryFilter_Value) FromBoundingBoxFilter

func (t *GeoHavingQueryFilter_Value) FromBoundingBoxFilter(v BoundingBoxFilter) error

FromBoundingBoxFilter overwrites any union data inside the GeoHavingQueryFilter_Value as the provided BoundingBoxFilter

func (*GeoHavingQueryFilter_Value) FromGeoDistanceFilter

func (t *GeoHavingQueryFilter_Value) FromGeoDistanceFilter(v GeoDistanceFilter) error

FromGeoDistanceFilter overwrites any union data inside the GeoHavingQueryFilter_Value as the provided GeoDistanceFilter

func (GeoHavingQueryFilter_Value) MarshalJSON

func (t GeoHavingQueryFilter_Value) MarshalJSON() ([]byte, error)

func (*GeoHavingQueryFilter_Value) MergeBoundingBoxFilter

func (t *GeoHavingQueryFilter_Value) MergeBoundingBoxFilter(v BoundingBoxFilter) error

MergeBoundingBoxFilter performs a merge with any union data inside the GeoHavingQueryFilter_Value, using the provided BoundingBoxFilter

func (*GeoHavingQueryFilter_Value) MergeGeoDistanceFilter

func (t *GeoHavingQueryFilter_Value) MergeGeoDistanceFilter(v GeoDistanceFilter) error

MergeGeoDistanceFilter performs a merge with any union data inside the GeoHavingQueryFilter_Value, using the provided GeoDistanceFilter

func (*GeoHavingQueryFilter_Value) UnmarshalJSON

func (t *GeoHavingQueryFilter_Value) UnmarshalJSON(b []byte) error

type GeoQueryFilter

type GeoQueryFilter struct {
	// Field field name to filter on
	//
	// Example: name
	Field string `json:"field"`

	// Op Example: $geo
	Op    GeoQueryFilterOp     `json:"op"`
	Value GeoQueryFilter_Value `json:"value"`
}

GeoQueryFilter defines model for GeoQueryFilter.

type GeoQueryFilterOp

type GeoQueryFilterOp string

GeoQueryFilterOp Example: $geo

const (
	GeoQueryFilterOpGeo GeoQueryFilterOp = "$geo"
)

Defines values for GeoQueryFilterOp.

func (GeoQueryFilterOp) Valid

func (e GeoQueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the GeoQueryFilterOp enum.

type GeoQueryFilter_Value

type GeoQueryFilter_Value struct {
	// contains filtered or unexported fields
}

GeoQueryFilter_Value defines model for GeoQueryFilter.Value.

func (GeoQueryFilter_Value) AsBoundingBoxFilter

func (t GeoQueryFilter_Value) AsBoundingBoxFilter() (BoundingBoxFilter, error)

AsBoundingBoxFilter returns the union data inside the GeoQueryFilter_Value as a BoundingBoxFilter

func (GeoQueryFilter_Value) AsGeoDistanceFilter

func (t GeoQueryFilter_Value) AsGeoDistanceFilter() (GeoDistanceFilter, error)

AsGeoDistanceFilter returns the union data inside the GeoQueryFilter_Value as a GeoDistanceFilter

func (*GeoQueryFilter_Value) FromBoundingBoxFilter

func (t *GeoQueryFilter_Value) FromBoundingBoxFilter(v BoundingBoxFilter) error

FromBoundingBoxFilter overwrites any union data inside the GeoQueryFilter_Value as the provided BoundingBoxFilter

func (*GeoQueryFilter_Value) FromGeoDistanceFilter

func (t *GeoQueryFilter_Value) FromGeoDistanceFilter(v GeoDistanceFilter) error

FromGeoDistanceFilter overwrites any union data inside the GeoQueryFilter_Value as the provided GeoDistanceFilter

func (GeoQueryFilter_Value) MarshalJSON

func (t GeoQueryFilter_Value) MarshalJSON() ([]byte, error)

func (*GeoQueryFilter_Value) MergeBoundingBoxFilter

func (t *GeoQueryFilter_Value) MergeBoundingBoxFilter(v BoundingBoxFilter) error

MergeBoundingBoxFilter performs a merge with any union data inside the GeoQueryFilter_Value, using the provided BoundingBoxFilter

func (*GeoQueryFilter_Value) MergeGeoDistanceFilter

func (t *GeoQueryFilter_Value) MergeGeoDistanceFilter(v GeoDistanceFilter) error

MergeGeoDistanceFilter performs a merge with any union data inside the GeoQueryFilter_Value, using the provided GeoDistanceFilter

func (*GeoQueryFilter_Value) UnmarshalJSON

func (t *GeoQueryFilter_Value) UnmarshalJSON(b []byte) error

type GetEventSchemaResponse

type GetEventSchemaResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *SearchSchema
}

func ParseGetEventSchemaResponse

func ParseGetEventSchemaResponse(rsp *http.Response) (*GetEventSchemaResponse, error)

ParseGetEventSchemaResponse parses an HTTP response from a GetEventSchemaWithResponse call

func (GetEventSchemaResponse) ContentType

func (r GetEventSchemaResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetEventSchemaResponse) GetBody

func (r GetEventSchemaResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetEventSchemaResponse) GetJSON200

func (r GetEventSchemaResponse) GetJSON200() *SearchSchema

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetEventSchemaResponse) Status

func (r GetEventSchemaResponse) Status() string

Status returns HTTPResponse.Status

func (GetEventSchemaResponse) StatusCode

func (r GetEventSchemaResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetLatestIpDatasetExportMetadataResponse

type GetLatestIpDatasetExportMetadataResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetLatestIpDatasetExportMetadataResponse200Headers
}

func ParseGetLatestIpDatasetExportMetadataResponse

func ParseGetLatestIpDatasetExportMetadataResponse(rsp *http.Response) (*GetLatestIpDatasetExportMetadataResponse, error)

ParseGetLatestIpDatasetExportMetadataResponse parses an HTTP response from a GetLatestIpDatasetExportMetadataWithResponse call

func (GetLatestIpDatasetExportMetadataResponse) ContentType

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetLatestIpDatasetExportMetadataResponse) GetBody

GetBody returns the raw response body bytes

func (GetLatestIpDatasetExportMetadataResponse) GetJSON422

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (GetLatestIpDatasetExportMetadataResponse) Status

Status returns HTTPResponse.Status

func (GetLatestIpDatasetExportMetadataResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetLatestIpDatasetExportMetadataResponse200Headers

type GetLatestIpDatasetExportMetadataResponse200Headers struct {
	LastModified         *string
	XSnapshotByteSize    *int
	XSnapshotChecksum    *string
	XSnapshotExpiresAt   *time.Time
	XSnapshotGeneratedAt *time.Time
	XSnapshotRowCount    *int
}

GetLatestIpDatasetExportMetadataResponse200Headers the declared response headers of an HTTP 200 response for GetLatestIpDatasetExportMetadata

type GetListItemResponse

type GetListItemResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ListItem
}

func ParseGetListItemResponse

func ParseGetListItemResponse(rsp *http.Response) (*GetListItemResponse, error)

ParseGetListItemResponse parses an HTTP response from a GetListItemWithResponse call

func (GetListItemResponse) ContentType

func (r GetListItemResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetListItemResponse) GetBody

func (r GetListItemResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetListItemResponse) GetJSON200

func (r GetListItemResponse) GetJSON200() *ListItem

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetListItemResponse) Status

func (r GetListItemResponse) Status() string

Status returns HTTPResponse.Status

func (GetListItemResponse) StatusCode

func (r GetListItemResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetListParams

type GetListParams struct {
	// IncludeSize Whether to include the size in the response
	IncludeSize *bool `form:"include_size,omitempty" json:"include_size,omitempty"`
}

GetListParams defines parameters for GetList.

type GetListResponse

type GetListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *struct {
		// ArchivedAt Timestamp of when the List was archived. If this value is `null`, it means the list is active.
		//
		// Example: 2021-09-27T16:46:38.313Z
		ArchivedAt nullable.Nullable[time.Time] `json:"archived_at,omitempty"`

		// Color Color assigned to the List. These colors can be used to represent different sentiments, such as red for blocked records or green for trusted.
		//
		// Example: $red
		Color ListColor `json:"color"`

		// CreatedAt Example: 2021-09-27T16:46:38.313Z
		CreatedAt *time.Time `json:"created_at,omitempty"`

		// DefaultItemArchivationTime Default time, in seconds, after which Items in this List automatically gets archived after they are created. It is possible to override this value when creating the individual List Items
		//
		// Example: 2592000
		DefaultItemArchivationTime nullable.Nullable[int] `json:"default_item_archivation_time,omitempty"`

		// Description Description of the List
		//
		// Example: We block these IPs from withdrawing funds. Please be careful.
		Description nullable.Nullable[string] `json:"description,omitempty"`

		// Id Example: 2ee938c8-24c2-4c26-9d25-19511dd75029
		Id string `json:"id"`

		// Managed Indicates whether this List is managed by Castle. Managed lists are read-only and maintained by Castle.
		//
		// Example: false
		Managed *bool `json:"managed,omitempty"`

		// Name Name of the List
		//
		// Example: Malicious IPs
		Name string `json:"name"`

		// PrimaryField Event field for which the List Item value will be matched against, such as `user.id` or `device.fingerprint`.
		//
		// Example: device.fingerprint
		PrimaryField ListPrimaryField `json:"primary_field"`

		// SecondaryField A secondary event field for which the List Item value will be matched against. Warning: make sure you input a correct field name
		//
		// Example: ip.value
		SecondaryField nullable.Nullable[ListSecondaryField] `json:"secondary_field,omitempty"`

		// Size List size capped at 100,000.
		//
		// Example: 1024
		Size nullable.Nullable[int] `json:"size,omitempty"`
	}
}

func ParseGetListResponse

func ParseGetListResponse(rsp *http.Response) (*GetListResponse, error)

ParseGetListResponse parses an HTTP response from a GetListWithResponse call

func (GetListResponse) ContentType

func (r GetListResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetListResponse) GetBody

func (r GetListResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetListResponse) GetJSON200

func (r GetListResponse) GetJSON200() *struct {
	// ArchivedAt Timestamp of when the List was archived. If this value is `null`, it means the list is active.
	//
	// Example: 2021-09-27T16:46:38.313Z
	ArchivedAt nullable.Nullable[time.Time] `json:"archived_at,omitempty"`

	// Color Color assigned to the List. These colors can be used to represent different sentiments, such as red for blocked records or green for trusted.
	//
	// Example: $red
	Color ListColor `json:"color"`

	// CreatedAt Example: 2021-09-27T16:46:38.313Z
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// DefaultItemArchivationTime Default time, in seconds, after which Items in this List automatically gets archived after they are created. It is possible to override this value when creating the individual List Items
	//
	// Example: 2592000
	DefaultItemArchivationTime nullable.Nullable[int] `json:"default_item_archivation_time,omitempty"`

	// Description Description of the List
	//
	// Example: We block these IPs from withdrawing funds. Please be careful.
	Description nullable.Nullable[string] `json:"description,omitempty"`

	// Id Example: 2ee938c8-24c2-4c26-9d25-19511dd75029
	Id string `json:"id"`

	// Managed Indicates whether this List is managed by Castle. Managed lists are read-only and maintained by Castle.
	//
	// Example: false
	Managed *bool `json:"managed,omitempty"`

	// Name Name of the List
	//
	// Example: Malicious IPs
	Name string `json:"name"`

	// PrimaryField Event field for which the List Item value will be matched against, such as `user.id` or `device.fingerprint`.
	//
	// Example: device.fingerprint
	PrimaryField ListPrimaryField `json:"primary_field"`

	// SecondaryField A secondary event field for which the List Item value will be matched against. Warning: make sure you input a correct field name
	//
	// Example: ip.value
	SecondaryField nullable.Nullable[ListSecondaryField] `json:"secondary_field,omitempty"`

	// Size List size capped at 100,000.
	//
	// Example: 1024
	Size nullable.Nullable[int] `json:"size,omitempty"`
}

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetListResponse) Status

func (r GetListResponse) Status() string

Status returns HTTPResponse.Status

func (GetListResponse) StatusCode

func (r GetListResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetListsResponse

type GetListsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ListList
}

func ParseGetListsResponse

func ParseGetListsResponse(rsp *http.Response) (*GetListsResponse, error)

ParseGetListsResponse parses an HTTP response from a GetListsWithResponse call

func (GetListsResponse) ContentType

func (r GetListsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetListsResponse) GetBody

func (r GetListsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetListsResponse) GetJSON200

func (r GetListsResponse) GetJSON200() *ListList

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetListsResponse) Status

func (r GetListsResponse) Status() string

Status returns HTTPResponse.Status

func (GetListsResponse) StatusCode

func (r GetListsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUserPrivacyDeprecatedResponse

type GetUserPrivacyDeprecatedResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseGetUserPrivacyDeprecatedResponse

func ParseGetUserPrivacyDeprecatedResponse(rsp *http.Response) (*GetUserPrivacyDeprecatedResponse, error)

ParseGetUserPrivacyDeprecatedResponse parses an HTTP response from a GetUserPrivacyDeprecatedWithResponse call

func (GetUserPrivacyDeprecatedResponse) ContentType

func (r GetUserPrivacyDeprecatedResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetUserPrivacyDeprecatedResponse) GetBody

func (r GetUserPrivacyDeprecatedResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetUserPrivacyDeprecatedResponse) Status

Status returns HTTPResponse.Status

func (GetUserPrivacyDeprecatedResponse) StatusCode

func (r GetUserPrivacyDeprecatedResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUserPrivacyJSONRequestBody

type GetUserPrivacyJSONRequestBody = PrivacyRequest

GetUserPrivacyJSONRequestBody defines body for GetUserPrivacy for application/json ContentType.

type GetUserPrivacyResponse

type GetUserPrivacyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseGetUserPrivacyResponse

func ParseGetUserPrivacyResponse(rsp *http.Response) (*GetUserPrivacyResponse, error)

ParseGetUserPrivacyResponse parses an HTTP response from a GetUserPrivacyWithResponse call

func (GetUserPrivacyResponse) ContentType

func (r GetUserPrivacyResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetUserPrivacyResponse) GetBody

func (r GetUserPrivacyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetUserPrivacyResponse) Status

func (r GetUserPrivacyResponse) Status() string

Status returns HTTPResponse.Status

func (GetUserPrivacyResponse) StatusCode

func (r GetUserPrivacyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GroupBy

type GroupBy struct {
	// Fields the field names to group by. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	Fields []GroupingField `json:"fields"`

	// Filters The filters to apply to the grouping level. This let's you have separate filters on the grouping level compared to the top-level query. For example, you can query events in the last 24 hours with risk score > 90, group by user id and then compute aggregate columns with a 30-day time-range.
	Filters *EventFilters `json:"filters,omitempty"`
}

GroupBy defines model for GroupBy.

type GroupEventsJSONRequestBody

type GroupEventsJSONRequestBody = GroupQuery

GroupEventsJSONRequestBody defines body for GroupEvents for application/json ContentType.

type GroupEventsResponse

type GroupEventsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *struct {
		// Data Example: [{"Max Risk":0.111,"email":"test@test.com","user.id":"castle_user"},{"Max Risk":0.411,"email":"test1@test.com","user.id":"castle_user1"},{"Max Risk":0.611,"email":"test2@test.com","user.id":"castle_user2"},{"Max Risk":0.931,"email":"test3@test.com","user.id":"castle_user3"},{"Max Risk":0.913,"email":"test4@test.com","user.id":"castle_user4"}]
		Data []map[string]interface{} `json:"data"`

		// TotalCount Example: 1
		TotalCount int `json:"total_count"`
	}
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
}

func ParseGroupEventsResponse

func ParseGroupEventsResponse(rsp *http.Response) (*GroupEventsResponse, error)

ParseGroupEventsResponse parses an HTTP response from a GroupEventsWithResponse call

func (GroupEventsResponse) ContentType

func (r GroupEventsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GroupEventsResponse) GetBody

func (r GroupEventsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GroupEventsResponse) GetJSON200

func (r GroupEventsResponse) GetJSON200() *struct {
	// Data Example: [{"Max Risk":0.111,"email":"test@test.com","user.id":"castle_user"},{"Max Risk":0.411,"email":"test1@test.com","user.id":"castle_user1"},{"Max Risk":0.611,"email":"test2@test.com","user.id":"castle_user2"},{"Max Risk":0.931,"email":"test3@test.com","user.id":"castle_user3"},{"Max Risk":0.913,"email":"test4@test.com","user.id":"castle_user4"}]
	Data []map[string]interface{} `json:"data"`

	// TotalCount Example: 1
	TotalCount int `json:"total_count"`
}

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GroupEventsResponse) GetJSON422

func (r GroupEventsResponse) GetJSON422() *UnprocessableEntity

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (GroupEventsResponse) Status

func (r GroupEventsResponse) Status() string

Status returns HTTPResponse.Status

func (GroupEventsResponse) StatusCode

func (r GroupEventsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GroupQuery

type GroupQuery struct {
	// Aggregations EXPERIMENTAL! Array of aggregations to include in the response.
	// For each aggregation, you can reference its name in the `columns`, `sort`, and `having` fields.
	Aggregations *[]AggregationRequest `json:"aggregations,omitempty"`

	// Columns Array of columns to return. Each column references a field and an aggregation function. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	Columns []Column `json:"columns"`

	// Filters Either a list of filters or a filter tree (`{ "$and" | "$or": [...] }`). A tree can nest `$and` and `$or`
	// groups, for example `(A OR B) AND (C OR D)`, which the list form cannot express.
	Filters EventFilters `json:"filters"`

	// Formulas EXPERIMENTAL! Array of formulas to include in the response.
	// For each formula, you can reference its name in the `columns`, `sort`, and `having` fields.
	Formulas *[]FormulaRequest `json:"formulas,omitempty"`
	GroupBy  GroupBy           `json:"group_by"`

	// Having field should contain the "name" value from your columns
	Having *[]GroupQuery_Having_Item `json:"having,omitempty"`
	Page   *int                      `json:"page,omitempty"`

	// QueryType The type of query to perform.
	//
	// - `$count` returns the number of records matching the query (`total_count` will be present and `data` will be empty)
	// - `$records` returns the records matching the query (`total_count` will be 0)
	// - `$records_with_count` returns the number of records matching the query and the records matching the query
	QueryType   *GroupQueryQueryType    `json:"query_type,omitempty"`
	ResultsSize *int                    `json:"results_size,omitempty"`
	Sort        *UnnamedColumnWithOrder `json:"sort,omitempty"`
}

GroupQuery defines model for GroupQuery.

type GroupQueryParams

type GroupQueryParams struct {
	// Aggregations EXPERIMENTAL! Array of aggregations to include in the response.
	// For each aggregation, you can reference its name in the `columns`, `sort`, and `having` fields.
	Aggregations *[]AggregationRequest `json:"aggregations,omitempty"`

	// Columns Array of columns to return. Each column references a field and an aggregation function. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	Columns []Column `json:"columns"`

	// Filters Either a list of filters or a filter tree (`{ "$and" | "$or": [...] }`). A tree can nest `$and` and `$or`
	// groups, for example `(A OR B) AND (C OR D)`, which the list form cannot express.
	Filters EventFilters `json:"filters"`

	// Formulas EXPERIMENTAL! Array of formulas to include in the response.
	// For each formula, you can reference its name in the `columns`, `sort`, and `having` fields.
	Formulas *[]FormulaRequest `json:"formulas,omitempty"`
	GroupBy  GroupBy           `json:"group_by"`

	// Having field should contain the "name" value from your columns
	Having *[]GroupQueryParams_Having_Item `json:"having,omitempty"`
	Page   *int                            `json:"page,omitempty"`

	// QueryType The type of query to perform.
	//
	// - `$count` returns the number of records matching the query (`total_count` will be present and `data` will be empty)
	// - `$records` returns the records matching the query (`total_count` will be 0)
	// - `$records_with_count` returns the number of records matching the query and the records matching the query
	QueryType *GroupQueryParamsQueryType `json:"query_type,omitempty"`
	Sort      *UnnamedColumnWithOrder    `json:"sort,omitempty"`
}

GroupQueryParams defines model for GroupQueryParams.

type GroupQueryParamsQueryType

type GroupQueryParamsQueryType string

GroupQueryParamsQueryType The type of query to perform.

- `$count` returns the number of records matching the query (`total_count` will be present and `data` will be empty) - `$records` returns the records matching the query (`total_count` will be 0) - `$records_with_count` returns the number of records matching the query and the records matching the query

const (
	GroupQueryParamsQueryTypeCount            GroupQueryParamsQueryType = "$count"
	GroupQueryParamsQueryTypeRecords          GroupQueryParamsQueryType = "$records"
	GroupQueryParamsQueryTypeRecordsWithCount GroupQueryParamsQueryType = "$records_with_count"
)

Defines values for GroupQueryParamsQueryType.

func (GroupQueryParamsQueryType) Valid

func (e GroupQueryParamsQueryType) Valid() bool

Valid indicates whether the value is a known member of the GroupQueryParamsQueryType enum.

type GroupQueryParams_Having_Item

type GroupQueryParams_Having_Item struct {
	// contains filtered or unexported fields
}

GroupQueryParams_Having_Item defines model for GroupQueryParams.having.Item.

func (GroupQueryParams_Having_Item) AsExistsHavingQueryFilter

func (t GroupQueryParams_Having_Item) AsExistsHavingQueryFilter() (ExistsHavingQueryFilter, error)

AsExistsHavingQueryFilter returns the union data inside the GroupQueryParams_Having_Item as a ExistsHavingQueryFilter

func (GroupQueryParams_Having_Item) AsGeoHavingQueryFilter

func (t GroupQueryParams_Having_Item) AsGeoHavingQueryFilter() (GeoHavingQueryFilter, error)

AsGeoHavingQueryFilter returns the union data inside the GroupQueryParams_Having_Item as a GeoHavingQueryFilter

func (GroupQueryParams_Having_Item) AsHavingQueryFilter

func (t GroupQueryParams_Having_Item) AsHavingQueryFilter() (HavingQueryFilter, error)

AsHavingQueryFilter returns the union data inside the GroupQueryParams_Having_Item as a HavingQueryFilter

func (GroupQueryParams_Having_Item) AsOrHavingQueryFilter

func (t GroupQueryParams_Having_Item) AsOrHavingQueryFilter() (OrHavingQueryFilter, error)

AsOrHavingQueryFilter returns the union data inside the GroupQueryParams_Having_Item as a OrHavingQueryFilter

func (GroupQueryParams_Having_Item) AsRangeHavingQueryFilter

func (t GroupQueryParams_Having_Item) AsRangeHavingQueryFilter() (RangeHavingQueryFilter, error)

AsRangeHavingQueryFilter returns the union data inside the GroupQueryParams_Having_Item as a RangeHavingQueryFilter

func (*GroupQueryParams_Having_Item) FromExistsHavingQueryFilter

func (t *GroupQueryParams_Having_Item) FromExistsHavingQueryFilter(v ExistsHavingQueryFilter) error

FromExistsHavingQueryFilter overwrites any union data inside the GroupQueryParams_Having_Item as the provided ExistsHavingQueryFilter

func (*GroupQueryParams_Having_Item) FromGeoHavingQueryFilter

func (t *GroupQueryParams_Having_Item) FromGeoHavingQueryFilter(v GeoHavingQueryFilter) error

FromGeoHavingQueryFilter overwrites any union data inside the GroupQueryParams_Having_Item as the provided GeoHavingQueryFilter

func (*GroupQueryParams_Having_Item) FromHavingQueryFilter

func (t *GroupQueryParams_Having_Item) FromHavingQueryFilter(v HavingQueryFilter) error

FromHavingQueryFilter overwrites any union data inside the GroupQueryParams_Having_Item as the provided HavingQueryFilter

func (*GroupQueryParams_Having_Item) FromOrHavingQueryFilter

func (t *GroupQueryParams_Having_Item) FromOrHavingQueryFilter(v OrHavingQueryFilter) error

FromOrHavingQueryFilter overwrites any union data inside the GroupQueryParams_Having_Item as the provided OrHavingQueryFilter

func (*GroupQueryParams_Having_Item) FromRangeHavingQueryFilter

func (t *GroupQueryParams_Having_Item) FromRangeHavingQueryFilter(v RangeHavingQueryFilter) error

FromRangeHavingQueryFilter overwrites any union data inside the GroupQueryParams_Having_Item as the provided RangeHavingQueryFilter

func (GroupQueryParams_Having_Item) MarshalJSON

func (t GroupQueryParams_Having_Item) MarshalJSON() ([]byte, error)

func (*GroupQueryParams_Having_Item) MergeExistsHavingQueryFilter

func (t *GroupQueryParams_Having_Item) MergeExistsHavingQueryFilter(v ExistsHavingQueryFilter) error

MergeExistsHavingQueryFilter performs a merge with any union data inside the GroupQueryParams_Having_Item, using the provided ExistsHavingQueryFilter

func (*GroupQueryParams_Having_Item) MergeGeoHavingQueryFilter

func (t *GroupQueryParams_Having_Item) MergeGeoHavingQueryFilter(v GeoHavingQueryFilter) error

MergeGeoHavingQueryFilter performs a merge with any union data inside the GroupQueryParams_Having_Item, using the provided GeoHavingQueryFilter

func (*GroupQueryParams_Having_Item) MergeHavingQueryFilter

func (t *GroupQueryParams_Having_Item) MergeHavingQueryFilter(v HavingQueryFilter) error

MergeHavingQueryFilter performs a merge with any union data inside the GroupQueryParams_Having_Item, using the provided HavingQueryFilter

func (*GroupQueryParams_Having_Item) MergeOrHavingQueryFilter

func (t *GroupQueryParams_Having_Item) MergeOrHavingQueryFilter(v OrHavingQueryFilter) error

MergeOrHavingQueryFilter performs a merge with any union data inside the GroupQueryParams_Having_Item, using the provided OrHavingQueryFilter

func (*GroupQueryParams_Having_Item) MergeRangeHavingQueryFilter

func (t *GroupQueryParams_Having_Item) MergeRangeHavingQueryFilter(v RangeHavingQueryFilter) error

MergeRangeHavingQueryFilter performs a merge with any union data inside the GroupQueryParams_Having_Item, using the provided RangeHavingQueryFilter

func (*GroupQueryParams_Having_Item) UnmarshalJSON

func (t *GroupQueryParams_Having_Item) UnmarshalJSON(b []byte) error

type GroupQueryQueryType

type GroupQueryQueryType string

GroupQueryQueryType The type of query to perform.

- `$count` returns the number of records matching the query (`total_count` will be present and `data` will be empty) - `$records` returns the records matching the query (`total_count` will be 0) - `$records_with_count` returns the number of records matching the query and the records matching the query

const (
	GroupQueryQueryTypeCount            GroupQueryQueryType = "$count"
	GroupQueryQueryTypeRecords          GroupQueryQueryType = "$records"
	GroupQueryQueryTypeRecordsWithCount GroupQueryQueryType = "$records_with_count"
)

Defines values for GroupQueryQueryType.

func (GroupQueryQueryType) Valid

func (e GroupQueryQueryType) Valid() bool

Valid indicates whether the value is a known member of the GroupQueryQueryType enum.

type GroupQuery_Having_Item

type GroupQuery_Having_Item struct {
	// contains filtered or unexported fields
}

GroupQuery_Having_Item defines model for GroupQuery.having.Item.

func (GroupQuery_Having_Item) AsExistsHavingQueryFilter

func (t GroupQuery_Having_Item) AsExistsHavingQueryFilter() (ExistsHavingQueryFilter, error)

AsExistsHavingQueryFilter returns the union data inside the GroupQuery_Having_Item as a ExistsHavingQueryFilter

func (GroupQuery_Having_Item) AsGeoHavingQueryFilter

func (t GroupQuery_Having_Item) AsGeoHavingQueryFilter() (GeoHavingQueryFilter, error)

AsGeoHavingQueryFilter returns the union data inside the GroupQuery_Having_Item as a GeoHavingQueryFilter

func (GroupQuery_Having_Item) AsHavingQueryFilter

func (t GroupQuery_Having_Item) AsHavingQueryFilter() (HavingQueryFilter, error)

AsHavingQueryFilter returns the union data inside the GroupQuery_Having_Item as a HavingQueryFilter

func (GroupQuery_Having_Item) AsOrHavingQueryFilter

func (t GroupQuery_Having_Item) AsOrHavingQueryFilter() (OrHavingQueryFilter, error)

AsOrHavingQueryFilter returns the union data inside the GroupQuery_Having_Item as a OrHavingQueryFilter

func (GroupQuery_Having_Item) AsRangeHavingQueryFilter

func (t GroupQuery_Having_Item) AsRangeHavingQueryFilter() (RangeHavingQueryFilter, error)

AsRangeHavingQueryFilter returns the union data inside the GroupQuery_Having_Item as a RangeHavingQueryFilter

func (*GroupQuery_Having_Item) FromExistsHavingQueryFilter

func (t *GroupQuery_Having_Item) FromExistsHavingQueryFilter(v ExistsHavingQueryFilter) error

FromExistsHavingQueryFilter overwrites any union data inside the GroupQuery_Having_Item as the provided ExistsHavingQueryFilter

func (*GroupQuery_Having_Item) FromGeoHavingQueryFilter

func (t *GroupQuery_Having_Item) FromGeoHavingQueryFilter(v GeoHavingQueryFilter) error

FromGeoHavingQueryFilter overwrites any union data inside the GroupQuery_Having_Item as the provided GeoHavingQueryFilter

func (*GroupQuery_Having_Item) FromHavingQueryFilter

func (t *GroupQuery_Having_Item) FromHavingQueryFilter(v HavingQueryFilter) error

FromHavingQueryFilter overwrites any union data inside the GroupQuery_Having_Item as the provided HavingQueryFilter

func (*GroupQuery_Having_Item) FromOrHavingQueryFilter

func (t *GroupQuery_Having_Item) FromOrHavingQueryFilter(v OrHavingQueryFilter) error

FromOrHavingQueryFilter overwrites any union data inside the GroupQuery_Having_Item as the provided OrHavingQueryFilter

func (*GroupQuery_Having_Item) FromRangeHavingQueryFilter

func (t *GroupQuery_Having_Item) FromRangeHavingQueryFilter(v RangeHavingQueryFilter) error

FromRangeHavingQueryFilter overwrites any union data inside the GroupQuery_Having_Item as the provided RangeHavingQueryFilter

func (GroupQuery_Having_Item) MarshalJSON

func (t GroupQuery_Having_Item) MarshalJSON() ([]byte, error)

func (*GroupQuery_Having_Item) MergeExistsHavingQueryFilter

func (t *GroupQuery_Having_Item) MergeExistsHavingQueryFilter(v ExistsHavingQueryFilter) error

MergeExistsHavingQueryFilter performs a merge with any union data inside the GroupQuery_Having_Item, using the provided ExistsHavingQueryFilter

func (*GroupQuery_Having_Item) MergeGeoHavingQueryFilter

func (t *GroupQuery_Having_Item) MergeGeoHavingQueryFilter(v GeoHavingQueryFilter) error

MergeGeoHavingQueryFilter performs a merge with any union data inside the GroupQuery_Having_Item, using the provided GeoHavingQueryFilter

func (*GroupQuery_Having_Item) MergeHavingQueryFilter

func (t *GroupQuery_Having_Item) MergeHavingQueryFilter(v HavingQueryFilter) error

MergeHavingQueryFilter performs a merge with any union data inside the GroupQuery_Having_Item, using the provided HavingQueryFilter

func (*GroupQuery_Having_Item) MergeOrHavingQueryFilter

func (t *GroupQuery_Having_Item) MergeOrHavingQueryFilter(v OrHavingQueryFilter) error

MergeOrHavingQueryFilter performs a merge with any union data inside the GroupQuery_Having_Item, using the provided OrHavingQueryFilter

func (*GroupQuery_Having_Item) MergeRangeHavingQueryFilter

func (t *GroupQuery_Having_Item) MergeRangeHavingQueryFilter(v RangeHavingQueryFilter) error

MergeRangeHavingQueryFilter performs a merge with any union data inside the GroupQuery_Having_Item, using the provided RangeHavingQueryFilter

func (*GroupQuery_Having_Item) UnmarshalJSON

func (t *GroupQuery_Having_Item) UnmarshalJSON(b []byte) error

type GroupingField

type GroupingField struct {
	// Field Field name. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	Field string `json:"field"`

	// Transform Describes how to transform the column value. The transformation is applied before the `func` aggregation function.
	Transform *Transform `json:"transform,omitempty"`
}

GroupingField defines model for GroupingField.

type HavingQueryFilter

type HavingQueryFilter struct {
	// Field Field name. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	Field string `json:"field"`

	// Func Aggregation function to be applied on the field
	//
	// Example: $sum
	Func Func `json:"func"`

	// Op Example: $eq
	Op HavingQueryFilterOp `json:"op"`

	// Options Options specific for each aggregation function
	Options *map[string]interface{} `json:"options,omitempty"`

	// Transform Describes how to transform the column value. The transformation is applied before the `func` aggregation function.
	Transform *Transform `json:"transform,omitempty"`

	// Value Can be string, bool, numeric, object, or an array of string/numeric values
	Value HavingQueryFilter_Value `json:"value"`
}

HavingQueryFilter defines model for HavingQueryFilter.

type HavingQueryFilterOp

type HavingQueryFilterOp string

HavingQueryFilterOp Example: $eq

const (
	HavingQueryFilterOpContains    HavingQueryFilterOp = "$contains"
	HavingQueryFilterOpEndsWith    HavingQueryFilterOp = "$ends_with"
	HavingQueryFilterOpEq          HavingQueryFilterOp = "$eq"
	HavingQueryFilterOpIn          HavingQueryFilterOp = "$in"
	HavingQueryFilterOpIpRange     HavingQueryFilterOp = "$ip_range"
	HavingQueryFilterOpLike        HavingQueryFilterOp = "$like"
	HavingQueryFilterOpMatches     HavingQueryFilterOp = "$matches"
	HavingQueryFilterOpNcontains   HavingQueryFilterOp = "$ncontains"
	HavingQueryFilterOpNendsWith   HavingQueryFilterOp = "$nends_with"
	HavingQueryFilterOpNeq         HavingQueryFilterOp = "$neq"
	HavingQueryFilterOpNin         HavingQueryFilterOp = "$nin"
	HavingQueryFilterOpNipRange    HavingQueryFilterOp = "$nip_range"
	HavingQueryFilterOpNlike       HavingQueryFilterOp = "$nlike"
	HavingQueryFilterOpNmatches    HavingQueryFilterOp = "$nmatches"
	HavingQueryFilterOpNstartsWith HavingQueryFilterOp = "$nstarts_with"
	HavingQueryFilterOpStartsWith  HavingQueryFilterOp = "$starts_with"
)

Defines values for HavingQueryFilterOp.

func (HavingQueryFilterOp) Valid

func (e HavingQueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the HavingQueryFilterOp enum.

type HavingQueryFilterValue0

type HavingQueryFilterValue0 = string

HavingQueryFilterValue0 Example: Rhea

type HavingQueryFilterValue1

type HavingQueryFilterValue1 = float32

HavingQueryFilterValue1 Example: 2

type HavingQueryFilterValue2

type HavingQueryFilterValue2 = bool

HavingQueryFilterValue2 Example: true

type HavingQueryFilterValue3

type HavingQueryFilterValue3 = []HavingQueryFilter_Value_3_Item

HavingQueryFilterValue3 Example: ["Rhea"]

type HavingQueryFilterValue4

type HavingQueryFilterValue4 struct {
	// Reference A field to compare a value against. Consult the [Events Schema API](/#operation/getEventSchema) for the list of referenceable fields.
	Reference string `json:"reference"`
}

HavingQueryFilterValue4 Example: {"reference":"user_email"}

type HavingQueryFilterValue30

type HavingQueryFilterValue30 = string

HavingQueryFilterValue30 defines model for HavingQueryFilter.Value.3.0.

type HavingQueryFilterValue31

type HavingQueryFilterValue31 = float32

HavingQueryFilterValue31 defines model for HavingQueryFilter.Value.3.1.

type HavingQueryFilter_Value

type HavingQueryFilter_Value struct {
	// contains filtered or unexported fields
}

HavingQueryFilter_Value Can be string, bool, numeric, object, or an array of string/numeric values

func (HavingQueryFilter_Value) AsHavingQueryFilterValue0

func (t HavingQueryFilter_Value) AsHavingQueryFilterValue0() (HavingQueryFilterValue0, error)

AsHavingQueryFilterValue0 returns the union data inside the HavingQueryFilter_Value as a HavingQueryFilterValue0

func (HavingQueryFilter_Value) AsHavingQueryFilterValue1

func (t HavingQueryFilter_Value) AsHavingQueryFilterValue1() (HavingQueryFilterValue1, error)

AsHavingQueryFilterValue1 returns the union data inside the HavingQueryFilter_Value as a HavingQueryFilterValue1

func (HavingQueryFilter_Value) AsHavingQueryFilterValue2

func (t HavingQueryFilter_Value) AsHavingQueryFilterValue2() (HavingQueryFilterValue2, error)

AsHavingQueryFilterValue2 returns the union data inside the HavingQueryFilter_Value as a HavingQueryFilterValue2

func (HavingQueryFilter_Value) AsHavingQueryFilterValue3

func (t HavingQueryFilter_Value) AsHavingQueryFilterValue3() (HavingQueryFilterValue3, error)

AsHavingQueryFilterValue3 returns the union data inside the HavingQueryFilter_Value as a HavingQueryFilterValue3

func (HavingQueryFilter_Value) AsHavingQueryFilterValue4

func (t HavingQueryFilter_Value) AsHavingQueryFilterValue4() (HavingQueryFilterValue4, error)

AsHavingQueryFilterValue4 returns the union data inside the HavingQueryFilter_Value as a HavingQueryFilterValue4

func (*HavingQueryFilter_Value) FromHavingQueryFilterValue0

func (t *HavingQueryFilter_Value) FromHavingQueryFilterValue0(v HavingQueryFilterValue0) error

FromHavingQueryFilterValue0 overwrites any union data inside the HavingQueryFilter_Value as the provided HavingQueryFilterValue0

func (*HavingQueryFilter_Value) FromHavingQueryFilterValue1

func (t *HavingQueryFilter_Value) FromHavingQueryFilterValue1(v HavingQueryFilterValue1) error

FromHavingQueryFilterValue1 overwrites any union data inside the HavingQueryFilter_Value as the provided HavingQueryFilterValue1

func (*HavingQueryFilter_Value) FromHavingQueryFilterValue2

func (t *HavingQueryFilter_Value) FromHavingQueryFilterValue2(v HavingQueryFilterValue2) error

FromHavingQueryFilterValue2 overwrites any union data inside the HavingQueryFilter_Value as the provided HavingQueryFilterValue2

func (*HavingQueryFilter_Value) FromHavingQueryFilterValue3

func (t *HavingQueryFilter_Value) FromHavingQueryFilterValue3(v HavingQueryFilterValue3) error

FromHavingQueryFilterValue3 overwrites any union data inside the HavingQueryFilter_Value as the provided HavingQueryFilterValue3

func (*HavingQueryFilter_Value) FromHavingQueryFilterValue4

func (t *HavingQueryFilter_Value) FromHavingQueryFilterValue4(v HavingQueryFilterValue4) error

FromHavingQueryFilterValue4 overwrites any union data inside the HavingQueryFilter_Value as the provided HavingQueryFilterValue4

func (HavingQueryFilter_Value) MarshalJSON

func (t HavingQueryFilter_Value) MarshalJSON() ([]byte, error)

func (*HavingQueryFilter_Value) MergeHavingQueryFilterValue0

func (t *HavingQueryFilter_Value) MergeHavingQueryFilterValue0(v HavingQueryFilterValue0) error

MergeHavingQueryFilterValue0 performs a merge with any union data inside the HavingQueryFilter_Value, using the provided HavingQueryFilterValue0

func (*HavingQueryFilter_Value) MergeHavingQueryFilterValue1

func (t *HavingQueryFilter_Value) MergeHavingQueryFilterValue1(v HavingQueryFilterValue1) error

MergeHavingQueryFilterValue1 performs a merge with any union data inside the HavingQueryFilter_Value, using the provided HavingQueryFilterValue1

func (*HavingQueryFilter_Value) MergeHavingQueryFilterValue2

func (t *HavingQueryFilter_Value) MergeHavingQueryFilterValue2(v HavingQueryFilterValue2) error

MergeHavingQueryFilterValue2 performs a merge with any union data inside the HavingQueryFilter_Value, using the provided HavingQueryFilterValue2

func (*HavingQueryFilter_Value) MergeHavingQueryFilterValue3

func (t *HavingQueryFilter_Value) MergeHavingQueryFilterValue3(v HavingQueryFilterValue3) error

MergeHavingQueryFilterValue3 performs a merge with any union data inside the HavingQueryFilter_Value, using the provided HavingQueryFilterValue3

func (*HavingQueryFilter_Value) MergeHavingQueryFilterValue4

func (t *HavingQueryFilter_Value) MergeHavingQueryFilterValue4(v HavingQueryFilterValue4) error

MergeHavingQueryFilterValue4 performs a merge with any union data inside the HavingQueryFilter_Value, using the provided HavingQueryFilterValue4

func (*HavingQueryFilter_Value) UnmarshalJSON

func (t *HavingQueryFilter_Value) UnmarshalJSON(b []byte) error

type HavingQueryFilter_Value_3_Item

type HavingQueryFilter_Value_3_Item struct {
	// contains filtered or unexported fields
}

HavingQueryFilter_Value_3_Item defines model for HavingQueryFilter.Value.3.Item.

func (HavingQueryFilter_Value_3_Item) AsHavingQueryFilterValue30

func (t HavingQueryFilter_Value_3_Item) AsHavingQueryFilterValue30() (HavingQueryFilterValue30, error)

AsHavingQueryFilterValue30 returns the union data inside the HavingQueryFilter_Value_3_Item as a HavingQueryFilterValue30

func (HavingQueryFilter_Value_3_Item) AsHavingQueryFilterValue31

func (t HavingQueryFilter_Value_3_Item) AsHavingQueryFilterValue31() (HavingQueryFilterValue31, error)

AsHavingQueryFilterValue31 returns the union data inside the HavingQueryFilter_Value_3_Item as a HavingQueryFilterValue31

func (*HavingQueryFilter_Value_3_Item) FromHavingQueryFilterValue30

func (t *HavingQueryFilter_Value_3_Item) FromHavingQueryFilterValue30(v HavingQueryFilterValue30) error

FromHavingQueryFilterValue30 overwrites any union data inside the HavingQueryFilter_Value_3_Item as the provided HavingQueryFilterValue30

func (*HavingQueryFilter_Value_3_Item) FromHavingQueryFilterValue31

func (t *HavingQueryFilter_Value_3_Item) FromHavingQueryFilterValue31(v HavingQueryFilterValue31) error

FromHavingQueryFilterValue31 overwrites any union data inside the HavingQueryFilter_Value_3_Item as the provided HavingQueryFilterValue31

func (HavingQueryFilter_Value_3_Item) MarshalJSON

func (t HavingQueryFilter_Value_3_Item) MarshalJSON() ([]byte, error)

func (*HavingQueryFilter_Value_3_Item) MergeHavingQueryFilterValue30

func (t *HavingQueryFilter_Value_3_Item) MergeHavingQueryFilterValue30(v HavingQueryFilterValue30) error

MergeHavingQueryFilterValue30 performs a merge with any union data inside the HavingQueryFilter_Value_3_Item, using the provided HavingQueryFilterValue30

func (*HavingQueryFilter_Value_3_Item) MergeHavingQueryFilterValue31

func (t *HavingQueryFilter_Value_3_Item) MergeHavingQueryFilterValue31(v HavingQueryFilterValue31) error

MergeHavingQueryFilterValue31 performs a merge with any union data inside the HavingQueryFilter_Value_3_Item, using the provided HavingQueryFilterValue31

func (*HavingQueryFilter_Value_3_Item) UnmarshalJSON

func (t *HavingQueryFilter_Value_3_Item) UnmarshalJSON(b []byte) error

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type IP

type IP struct {
	// Address Example: 34.200.81.5
	Address string `json:"address"`

	// Asn Example: 14618
	Asn int `json:"asn"`

	// Connection Connection type of the IP address, one of `residential`, `mobile`, `corporate`, `datacenter` or `unknown`. Empty or null when unknown.
	//
	// Example: datacenter
	Connection nullable.Nullable[string] `json:"connection,omitempty"`
	Isp        struct {
		// Name Example: verizon fios
		Name nullable.Nullable[string] `json:"name,omitempty"`

		// Organization Example: verizon fios
		Organization nullable.Nullable[string] `json:"organization,omitempty"`
	} `json:"isp"`
	Location struct {
		// City Example: Ashburn
		City nullable.Nullable[string] `json:"city"`

		// ContinentCode Example: NA
		ContinentCode nullable.Nullable[string] `json:"continent_code"`

		// CountryCode Example: US
		CountryCode nullable.Nullable[string] `json:"country_code"`

		// Latitude Example: 52.3583
		Latitude nullable.Nullable[float32] `json:"latitude"`

		// Longitude Example: 4.8488
		Longitude nullable.Nullable[float32] `json:"longitude"`

		// PostalCode Example: 20149
		PostalCode nullable.Nullable[string] `json:"postal_code"`

		// RegionCode Example: VA
		RegionCode nullable.Nullable[string] `json:"region_code"`
	} `json:"location"`
	Privacy *struct {
		// Anonymous Example: false
		Anonymous *bool `json:"anonymous,omitempty"`

		// Datacenter Example: false
		Datacenter *bool `json:"datacenter,omitempty"`

		// Proxy Reflects datacenter-based proxy detection. For residential proxies, use the `residential_proxy_access` signal or query `ip.tunnels`.
		//
		// Example: false
		Proxy *bool `json:"proxy,omitempty"`

		// Tor Example: false
		Tor *bool `json:"tor,omitempty"`
	} `json:"privacy,omitempty"`

	// Type Example: ipv4
	Type string `json:"type"`
}

IP defines model for IP.

type IPIntelligenceRecord

type IPIntelligenceRecord struct {
	// Address The queried IP address (IPv4 or IPv6).
	//
	// Example: 203.0.113.42
	Address string `json:"address"`

	// Asn Autonomous system number this IP is announced from. `null` when the
	// announcement is not resolvable.
	//
	//
	// Example: 64500
	Asn nullable.Nullable[int] `json:"asn"`

	// Location Coarse geolocation of the IP.
	Location struct {
		// ContinentCode Two-letter continent code.
		//
		// Example: EU
		ContinentCode nullable.Nullable[string] `json:"continent_code,omitempty"`

		// CountryCode ISO 3166-1 alpha-2 country code.
		//
		// Example: DE
		CountryCode nullable.Nullable[string] `json:"country_code,omitempty"`
	} `json:"location"`

	// Tunnels Tunnel observations for this IP, filtered to entries with a known
	// operator. Empty when Castle has no tunnel data for the IP.
	Tunnels []struct {
		// LastSeenAt Most recent observation of this IP under this tunnel, in ISO 8601.
		//
		// Example: 2026-07-01T14:23:00Z
		LastSeenAt time.Time `json:"last_seen_at"`

		// Operator Operator name (e.g. `NordVPN`, `Zscaler`).
		//
		// Example: NordVPN
		Operator string `json:"operator"`

		// ProxyType Proxy network type. Present when `type` is `proxy`; otherwise `null`.
		ProxyType nullable.Nullable[IPIntelligenceRecordTunnelsProxyType] `json:"proxy_type,omitempty"`

		// Tier Operator tier.
		//
		// Example: commercial
		Tier nullable.Nullable[IPIntelligenceRecordTunnelsTier] `json:"tier,omitempty"`

		// Type Tunnel classification.
		//
		// Example: vpn
		Type IPIntelligenceRecordTunnelsType `json:"type"`
	} `json:"tunnels"`

	// Type Address family of the queried IP.
	//
	// Example: ipv4
	Type IPIntelligenceRecordType `json:"type"`
}

IPIntelligenceRecord IP intelligence record: address metadata plus the list of tunnel observations Castle has recorded for it.

Example: {"address":"203.0.113.42","asn":64500,"location":{"continent_code":"EU","country_code":"DE"},"tunnels":[{"last_seen_at":"2026-07-01T14:23:00Z","operator":"NordVPN","proxy_type":null,"tier":"commercial","type":"vpn"}],"type":"ipv4"}

type IPIntelligenceRecordTunnelsProxyType

type IPIntelligenceRecordTunnelsProxyType string

IPIntelligenceRecordTunnelsProxyType Proxy network type. Present when `type` is `proxy`; otherwise `null`.

const (
	Datacenter  IPIntelligenceRecordTunnelsProxyType = "datacenter"
	Isp         IPIntelligenceRecordTunnelsProxyType = "isp"
	Residential IPIntelligenceRecordTunnelsProxyType = "residential"
)

Defines values for IPIntelligenceRecordTunnelsProxyType.

func (IPIntelligenceRecordTunnelsProxyType) Valid

Valid indicates whether the value is a known member of the IPIntelligenceRecordTunnelsProxyType enum.

type IPIntelligenceRecordTunnelsTier

type IPIntelligenceRecordTunnelsTier string

IPIntelligenceRecordTunnelsTier Operator tier.

Example: commercial

const (
	Commercial IPIntelligenceRecordTunnelsTier = "commercial"
	Enterprise IPIntelligenceRecordTunnelsTier = "enterprise"
	Free       IPIntelligenceRecordTunnelsTier = "free"
)

Defines values for IPIntelligenceRecordTunnelsTier.

func (IPIntelligenceRecordTunnelsTier) Valid

Valid indicates whether the value is a known member of the IPIntelligenceRecordTunnelsTier enum.

type IPIntelligenceRecordTunnelsType

type IPIntelligenceRecordTunnelsType string

IPIntelligenceRecordTunnelsType Tunnel classification.

Example: vpn

Defines values for IPIntelligenceRecordTunnelsType.

func (IPIntelligenceRecordTunnelsType) Valid

Valid indicates whether the value is a known member of the IPIntelligenceRecordTunnelsType enum.

type IPIntelligenceRecordType

type IPIntelligenceRecordType string

IPIntelligenceRecordType Address family of the queried IP.

Example: ipv4

const (
	Ipv4 IPIntelligenceRecordType = "ipv4"
	Ipv6 IPIntelligenceRecordType = "ipv6"
)

Defines values for IPIntelligenceRecordType.

func (IPIntelligenceRecordType) Valid

func (e IPIntelligenceRecordType) Valid() bool

Valid indicates whether the value is a known member of the IPIntelligenceRecordType enum.

type IpsLookupBatchJSONBody

type IpsLookupBatchJSONBody struct {
	// Ips 1-1000 IP addresses to look up. Duplicates and unparseable entries are silently dropped before processing.
	//
	// Example: ["203.0.113.42","198.51.100.7"]
	Ips []string `json:"ips"`
}

IpsLookupBatchJSONBody defines parameters for IpsLookupBatch.

type IpsLookupBatchJSONRequestBody

type IpsLookupBatchJSONRequestBody IpsLookupBatchJSONBody

IpsLookupBatchJSONRequestBody defines body for IpsLookupBatch for application/json ContentType.

type IpsLookupBatchResponse

type IpsLookupBatchResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *struct {
		// Meta Counters describing how a batch was processed. `total` is the raw count
		// the caller submitted; `valid` is the count after dedup and IP-address
		// validation. `results.length == meta.valid`. When `valid < total`, some
		// inputs were duplicates or not parseable.
		Meta struct {
			// Total Number of IPs submitted before de-duplication and validation.
			//
			// Example: 100
			Total int `json:"total"`

			// Valid Number of unique, valid IPs processed.
			//
			// Example: 97
			Valid int `json:"valid"`
		} `json:"meta"`

		// Results One entry per valid, unique input IP.
		Results []IPIntelligenceRecord `json:"results"`
	}
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
}

func ParseIpsLookupBatchResponse

func ParseIpsLookupBatchResponse(rsp *http.Response) (*IpsLookupBatchResponse, error)

ParseIpsLookupBatchResponse parses an HTTP response from a IpsLookupBatchWithResponse call

func (IpsLookupBatchResponse) ContentType

func (r IpsLookupBatchResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (IpsLookupBatchResponse) GetBody

func (r IpsLookupBatchResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (IpsLookupBatchResponse) GetJSON200

func (r IpsLookupBatchResponse) GetJSON200() *struct {
	// Meta Counters describing how a batch was processed. `total` is the raw count
	// the caller submitted; `valid` is the count after dedup and IP-address
	// validation. `results.length == meta.valid`. When `valid < total`, some
	// inputs were duplicates or not parseable.
	Meta struct {
		// Total Number of IPs submitted before de-duplication and validation.
		//
		// Example: 100
		Total int `json:"total"`

		// Valid Number of unique, valid IPs processed.
		//
		// Example: 97
		Valid int `json:"valid"`
	} `json:"meta"`

	// Results One entry per valid, unique input IP.
	Results []IPIntelligenceRecord `json:"results"`
}

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (IpsLookupBatchResponse) GetJSON422

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (IpsLookupBatchResponse) Status

func (r IpsLookupBatchResponse) Status() string

Status returns HTTPResponse.Status

func (IpsLookupBatchResponse) StatusCode

func (r IpsLookupBatchResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type IpsLookupSingleResponse

type IpsLookupSingleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *IPIntelligenceRecord
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
}

func ParseIpsLookupSingleResponse

func ParseIpsLookupSingleResponse(rsp *http.Response) (*IpsLookupSingleResponse, error)

ParseIpsLookupSingleResponse parses an HTTP response from a IpsLookupSingleWithResponse call

func (IpsLookupSingleResponse) ContentType

func (r IpsLookupSingleResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (IpsLookupSingleResponse) GetBody

func (r IpsLookupSingleResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (IpsLookupSingleResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (IpsLookupSingleResponse) GetJSON422

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (IpsLookupSingleResponse) Status

func (r IpsLookupSingleResponse) Status() string

Status returns HTTPResponse.Status

func (IpsLookupSingleResponse) StatusCode

func (r IpsLookupSingleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type List

type List struct {
	// ArchivedAt Timestamp of when the List was archived. If this value is `null`, it means the list is active.
	//
	// Example: 2021-09-27T16:46:38.313Z
	ArchivedAt nullable.Nullable[time.Time] `json:"archived_at,omitempty"`

	// Color Color assigned to the List. These colors can be used to represent different sentiments, such as red for blocked records or green for trusted.
	//
	// Example: $red
	Color ListColor `json:"color"`

	// CreatedAt Example: 2021-09-27T16:46:38.313Z
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// DefaultItemArchivationTime Default time, in seconds, after which Items in this List automatically gets archived after they are created. It is possible to override this value when creating the individual List Items
	//
	// Example: 2592000
	DefaultItemArchivationTime nullable.Nullable[int] `json:"default_item_archivation_time,omitempty"`

	// Description Description of the List
	//
	// Example: We block these IPs from withdrawing funds. Please be careful.
	Description nullable.Nullable[string] `json:"description,omitempty"`

	// Id Example: 2ee938c8-24c2-4c26-9d25-19511dd75029
	Id string `json:"id"`

	// Managed Indicates whether this List is managed by Castle. Managed lists are read-only and maintained by Castle.
	//
	// Example: false
	Managed *bool `json:"managed,omitempty"`

	// Name Name of the List
	//
	// Example: Malicious IPs
	Name string `json:"name"`

	// PrimaryField Event field for which the List Item value will be matched against, such as `user.id` or `device.fingerprint`.
	//
	// Example: device.fingerprint
	PrimaryField ListPrimaryField `json:"primary_field"`

	// SecondaryField A secondary event field for which the List Item value will be matched against. Warning: make sure you input a correct field name
	//
	// Example: ip.value
	SecondaryField nullable.Nullable[ListSecondaryField] `json:"secondary_field,omitempty"`
}

List defines model for List.

type ListColor

type ListColor string

ListColor Color assigned to the List. These colors can be used to represent different sentiments, such as red for blocked records or green for trusted.

Example: $red

const (
	Black  ListColor = "$black"
	Blue   ListColor = "$blue"
	Gray   ListColor = "$gray"
	Green  ListColor = "$green"
	Orange ListColor = "$orange"
	Purple ListColor = "$purple"
	Red    ListColor = "$red"
	Yellow ListColor = "$yellow"
)

Defines values for ListColor.

func (ListColor) Valid

func (e ListColor) Valid() bool

Valid indicates whether the value is a known member of the ListColor enum.

type ListFilterOperand

type ListFilterOperand struct {
	// contains filtered or unexported fields
}

ListFilterOperand defines model for ListFilterOperand.

func (ListFilterOperand) AsListLogicalFilter

func (t ListFilterOperand) AsListLogicalFilter() (ListLogicalFilter, error)

AsListLogicalFilter returns the union data inside the ListFilterOperand as a ListLogicalFilter

func (ListFilterOperand) AsListQueryFilter

func (t ListFilterOperand) AsListQueryFilter() (ListQueryFilter, error)

AsListQueryFilter returns the union data inside the ListFilterOperand as a ListQueryFilter

func (*ListFilterOperand) FromListLogicalFilter

func (t *ListFilterOperand) FromListLogicalFilter(v ListLogicalFilter) error

FromListLogicalFilter overwrites any union data inside the ListFilterOperand as the provided ListLogicalFilter

func (*ListFilterOperand) FromListQueryFilter

func (t *ListFilterOperand) FromListQueryFilter(v ListQueryFilter) error

FromListQueryFilter overwrites any union data inside the ListFilterOperand as the provided ListQueryFilter

func (ListFilterOperand) MarshalJSON

func (t ListFilterOperand) MarshalJSON() ([]byte, error)

func (*ListFilterOperand) MergeListLogicalFilter

func (t *ListFilterOperand) MergeListLogicalFilter(v ListLogicalFilter) error

MergeListLogicalFilter performs a merge with any union data inside the ListFilterOperand, using the provided ListLogicalFilter

func (*ListFilterOperand) MergeListQueryFilter

func (t *ListFilterOperand) MergeListQueryFilter(v ListQueryFilter) error

MergeListQueryFilter performs a merge with any union data inside the ListFilterOperand, using the provided ListQueryFilter

func (*ListFilterOperand) UnmarshalJSON

func (t *ListFilterOperand) UnmarshalJSON(b []byte) error

type ListItem

type ListItem struct {
	Archived *bool `json:"archived,omitempty"`

	// Author Indicates who or how the list item was created. Typically, this refers to the user that created the item from within the Castle Dashboard, or the policy ID if it was automatically created via automation.
	Author *ListItemAuthor `json:"author,omitempty"`

	// AutoArchivesAt Time after which a the List Item will be automatically archived and no longer matched against each event. A value of `null` means auto archivation is disabled and the record will stay active in the list forever.
	//
	// Example: 2021-09-27T16:46:38.313Z
	AutoArchivesAt nullable.Nullable[time.Time] `json:"auto_archives_at,omitempty"`

	// Comment An arbitrary string that can be used to eg. explain why this List Item was created. Often useful to display to other users.
	//
	// Example: Fradulent user found through manual inspection
	Comment *string `json:"comment,omitempty"`

	// CreatedAt Example: 2021-09-27T16:46:38.313Z
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Id Example: 2ee938c8-24c2-4c26-9d25-19511dd75029
	Id string `json:"id"`

	// ListId ID of the List to which this List Item belongs to
	//
	// Example: 2ee938c8-24c2-4c26-9d25-19511dd75029
	ListId string `json:"list_id"`

	// PrimaryValue Value of the `primary_field` as described by the List definition. For example, if `primary_field` is configured to be the Event `user.id`, the `primary_value` on the List Item referes to the actual User ID value.
	//
	// Example: A04t7AcfSA69cBTTusx0RQ
	PrimaryValue string `json:"primary_value"`

	// SecondaryValue Optional secondary value. If this value is set, it means that for a List Item to match an Event, both the `primary_value` and `secondary_value` must match.
	//
	// Example: 2ee938c8-24c2-4c26-9d25-19511dd75029
	SecondaryValue nullable.Nullable[string] `json:"secondary_value,omitempty"`
}

ListItem defines model for ListItem.

type ListItemAuthor

type ListItemAuthor struct {
	Identifier string     `json:"identifier"`
	Type       AuthorType `json:"type"`
}

ListItemAuthor Indicates who or how the list item was created. Typically, this refers to the user that created the item from within the Castle Dashboard, or the policy ID if it was automatically created via automation.

type ListItemCount

type ListItemCount struct {
	// Filters Additional filters to query list items by fields and archival status. Accepts a list of filters or a filter tree
	// (`{ "$and" | "$or": [...] }`).
	Filters *ListItemFilters `json:"filters,omitempty"`
}

ListItemCount List Item Count

type ListItemFilterCondition

type ListItemFilterCondition struct {
	// Field Example: archived
	Field ListItemFilterConditionField `json:"field"`

	// Op Example: $eq
	Op ListItemFilterConditionOp `json:"op"`

	// Value Example: true
	Value bool `json:"value"`
}

ListItemFilterCondition defines model for ListItemFilterCondition.

type ListItemFilterConditionField

type ListItemFilterConditionField string

ListItemFilterConditionField Example: archived

const (
	ListItemFilterConditionFieldArchived ListItemFilterConditionField = "archived"
)

Defines values for ListItemFilterConditionField.

func (ListItemFilterConditionField) Valid

Valid indicates whether the value is a known member of the ListItemFilterConditionField enum.

type ListItemFilterConditionOp

type ListItemFilterConditionOp string

ListItemFilterConditionOp Example: $eq

const (
	ListItemFilterConditionOpEq ListItemFilterConditionOp = "$eq"
)

Defines values for ListItemFilterConditionOp.

func (ListItemFilterConditionOp) Valid

func (e ListItemFilterConditionOp) Valid() bool

Valid indicates whether the value is a known member of the ListItemFilterConditionOp enum.

type ListItemFilterOperand

type ListItemFilterOperand struct {
	// contains filtered or unexported fields
}

ListItemFilterOperand defines model for ListItemFilterOperand.

func (ListItemFilterOperand) AsListItemLogicalFilter

func (t ListItemFilterOperand) AsListItemLogicalFilter() (ListItemLogicalFilter, error)

AsListItemLogicalFilter returns the union data inside the ListItemFilterOperand as a ListItemLogicalFilter

func (ListItemFilterOperand) AsListItemQueryFilter

func (t ListItemFilterOperand) AsListItemQueryFilter() (ListItemQueryFilter, error)

AsListItemQueryFilter returns the union data inside the ListItemFilterOperand as a ListItemQueryFilter

func (*ListItemFilterOperand) FromListItemLogicalFilter

func (t *ListItemFilterOperand) FromListItemLogicalFilter(v ListItemLogicalFilter) error

FromListItemLogicalFilter overwrites any union data inside the ListItemFilterOperand as the provided ListItemLogicalFilter

func (*ListItemFilterOperand) FromListItemQueryFilter

func (t *ListItemFilterOperand) FromListItemQueryFilter(v ListItemQueryFilter) error

FromListItemQueryFilter overwrites any union data inside the ListItemFilterOperand as the provided ListItemQueryFilter

func (ListItemFilterOperand) MarshalJSON

func (t ListItemFilterOperand) MarshalJSON() ([]byte, error)

func (*ListItemFilterOperand) MergeListItemLogicalFilter

func (t *ListItemFilterOperand) MergeListItemLogicalFilter(v ListItemLogicalFilter) error

MergeListItemLogicalFilter performs a merge with any union data inside the ListItemFilterOperand, using the provided ListItemLogicalFilter

func (*ListItemFilterOperand) MergeListItemQueryFilter

func (t *ListItemFilterOperand) MergeListItemQueryFilter(v ListItemQueryFilter) error

MergeListItemQueryFilter performs a merge with any union data inside the ListItemFilterOperand, using the provided ListItemQueryFilter

func (*ListItemFilterOperand) UnmarshalJSON

func (t *ListItemFilterOperand) UnmarshalJSON(b []byte) error

type ListItemFilters

type ListItemFilters struct {
	// contains filtered or unexported fields
}

ListItemFilters Additional filters to query list items by fields and archival status. Accepts a list of filters or a filter tree (`{ "$and" | "$or": [...] }`).

func (ListItemFilters) AsListItemFilters0

func (t ListItemFilters) AsListItemFilters0() (ListItemFilters0, error)

AsListItemFilters0 returns the union data inside the ListItemFilters as a ListItemFilters0

func (ListItemFilters) AsListItemFilters1

func (t ListItemFilters) AsListItemFilters1() (ListItemFilters1, error)

AsListItemFilters1 returns the union data inside the ListItemFilters as a ListItemFilters1

func (*ListItemFilters) FromListItemFilters0

func (t *ListItemFilters) FromListItemFilters0(v ListItemFilters0) error

FromListItemFilters0 overwrites any union data inside the ListItemFilters as the provided ListItemFilters0

func (*ListItemFilters) FromListItemFilters1

func (t *ListItemFilters) FromListItemFilters1(v ListItemFilters1) error

FromListItemFilters1 overwrites any union data inside the ListItemFilters as the provided ListItemFilters1

func (ListItemFilters) MarshalJSON

func (t ListItemFilters) MarshalJSON() ([]byte, error)

func (*ListItemFilters) MergeListItemFilters0

func (t *ListItemFilters) MergeListItemFilters0(v ListItemFilters0) error

MergeListItemFilters0 performs a merge with any union data inside the ListItemFilters, using the provided ListItemFilters0

func (*ListItemFilters) MergeListItemFilters1

func (t *ListItemFilters) MergeListItemFilters1(v ListItemFilters1) error

MergeListItemFilters1 performs a merge with any union data inside the ListItemFilters, using the provided ListItemFilters1

func (*ListItemFilters) UnmarshalJSON

func (t *ListItemFilters) UnmarshalJSON(b []byte) error

type ListItemFilters0

type ListItemFilters0 = []ListItemFilters_0_Item

ListItemFilters0 Example: [{"field":"primary_value","op":"$eq","value":"Uc80JFKRRvm"},{"field":"archived","op":"$eq","value":false},{"op":"$or","value":[{"field":"secondary_value","op":"$eq","value":"1"}]},{"op":"$or","value":[{"field":"secondary_value","op":"$eq","value":"2"}]}]

type ListItemFilters1

type ListItemFilters1 struct {
	And *[]ListItemFilterOperand     `json:"$and,omitempty"`
	Or  *[]ListItemFilters_1_Or_Item `json:"$or,omitempty"`
}

ListItemFilters1 A list item filter tree node. Set exactly one of `$and` or `$or`. Each child is a leaf filter or another node. Trees are limited to 10 levels and 200 nodes, and the `$or` filter operator is not allowed inside a tree.

Example: {"$and":[{"field":"archived","op":"$eq","value":false},{"$or":[{"field":"secondary_value","op":"$eq","value":"1"},{"field":"secondary_value","op":"$eq","value":"2"}]}]}

type ListItemFilters_0_Item

type ListItemFilters_0_Item struct {
	// contains filtered or unexported fields
}

ListItemFilters_0_Item defines model for ListItemFilters.0.Item.

func (ListItemFilters_0_Item) AsListItemOrQueryFilter

func (t ListItemFilters_0_Item) AsListItemOrQueryFilter() (ListItemOrQueryFilter, error)

AsListItemOrQueryFilter returns the union data inside the ListItemFilters_0_Item as a ListItemOrQueryFilter

func (ListItemFilters_0_Item) AsListItemQueryFilter

func (t ListItemFilters_0_Item) AsListItemQueryFilter() (ListItemQueryFilter, error)

AsListItemQueryFilter returns the union data inside the ListItemFilters_0_Item as a ListItemQueryFilter

func (ListItemFilters_0_Item) Discriminator

func (t ListItemFilters_0_Item) Discriminator() (string, error)

func (*ListItemFilters_0_Item) FromListItemOrQueryFilter

func (t *ListItemFilters_0_Item) FromListItemOrQueryFilter(v ListItemOrQueryFilter) error

FromListItemOrQueryFilter overwrites any union data inside the ListItemFilters_0_Item as the provided ListItemOrQueryFilter

func (*ListItemFilters_0_Item) FromListItemQueryFilter

func (t *ListItemFilters_0_Item) FromListItemQueryFilter(v ListItemQueryFilter) error

FromListItemQueryFilter overwrites any union data inside the ListItemFilters_0_Item as the provided ListItemQueryFilter

func (ListItemFilters_0_Item) MarshalJSON

func (t ListItemFilters_0_Item) MarshalJSON() ([]byte, error)

func (*ListItemFilters_0_Item) MergeListItemOrQueryFilter

func (t *ListItemFilters_0_Item) MergeListItemOrQueryFilter(v ListItemOrQueryFilter) error

MergeListItemOrQueryFilter performs a merge with any union data inside the ListItemFilters_0_Item, using the provided ListItemOrQueryFilter

func (*ListItemFilters_0_Item) MergeListItemQueryFilter

func (t *ListItemFilters_0_Item) MergeListItemQueryFilter(v ListItemQueryFilter) error

MergeListItemQueryFilter performs a merge with any union data inside the ListItemFilters_0_Item, using the provided ListItemQueryFilter

func (*ListItemFilters_0_Item) UnmarshalJSON

func (t *ListItemFilters_0_Item) UnmarshalJSON(b []byte) error

func (ListItemFilters_0_Item) ValueByDiscriminator

func (t ListItemFilters_0_Item) ValueByDiscriminator() (interface{}, error)

type ListItemFilters_1_Or_Item

type ListItemFilters_1_Or_Item struct {
	// contains filtered or unexported fields
}

ListItemFilters_1_Or_Item defines model for ListItemFilters.1.Or.Item.

func (ListItemFilters_1_Or_Item) AsListItemLogicalFilter

func (t ListItemFilters_1_Or_Item) AsListItemLogicalFilter() (ListItemLogicalFilter, error)

AsListItemLogicalFilter returns the union data inside the ListItemFilters_1_Or_Item as a ListItemLogicalFilter

func (ListItemFilters_1_Or_Item) AsListItemQueryFilter

func (t ListItemFilters_1_Or_Item) AsListItemQueryFilter() (ListItemQueryFilter, error)

AsListItemQueryFilter returns the union data inside the ListItemFilters_1_Or_Item as a ListItemQueryFilter

func (*ListItemFilters_1_Or_Item) FromListItemLogicalFilter

func (t *ListItemFilters_1_Or_Item) FromListItemLogicalFilter(v ListItemLogicalFilter) error

FromListItemLogicalFilter overwrites any union data inside the ListItemFilters_1_Or_Item as the provided ListItemLogicalFilter

func (*ListItemFilters_1_Or_Item) FromListItemQueryFilter

func (t *ListItemFilters_1_Or_Item) FromListItemQueryFilter(v ListItemQueryFilter) error

FromListItemQueryFilter overwrites any union data inside the ListItemFilters_1_Or_Item as the provided ListItemQueryFilter

func (ListItemFilters_1_Or_Item) MarshalJSON

func (t ListItemFilters_1_Or_Item) MarshalJSON() ([]byte, error)

func (*ListItemFilters_1_Or_Item) MergeListItemLogicalFilter

func (t *ListItemFilters_1_Or_Item) MergeListItemLogicalFilter(v ListItemLogicalFilter) error

MergeListItemLogicalFilter performs a merge with any union data inside the ListItemFilters_1_Or_Item, using the provided ListItemLogicalFilter

func (*ListItemFilters_1_Or_Item) MergeListItemQueryFilter

func (t *ListItemFilters_1_Or_Item) MergeListItemQueryFilter(v ListItemQueryFilter) error

MergeListItemQueryFilter performs a merge with any union data inside the ListItemFilters_1_Or_Item, using the provided ListItemQueryFilter

func (*ListItemFilters_1_Or_Item) UnmarshalJSON

func (t *ListItemFilters_1_Or_Item) UnmarshalJSON(b []byte) error

type ListItemList

type ListItemList struct {
	Data []ListItem `json:"data"`
}

ListItemList defines model for ListItemList.

type ListItemListCount

type ListItemListCount struct {
	// TotalCount A number of list items matching the query capped at 100,000.
	//
	// Example: 1
	TotalCount int `json:"total_count"`
}

ListItemListCount defines model for ListItemListCount.

type ListItemLogicalFilter

type ListItemLogicalFilter struct {
	And *[]ListItemFilterOperand         `json:"$and,omitempty"`
	Or  *[]ListItemLogicalFilter_Or_Item `json:"$or,omitempty"`
}

ListItemLogicalFilter A list item filter tree node. Set exactly one of `$and` or `$or`. Each child is a leaf filter or another node. Trees are limited to 10 levels and 200 nodes, and the `$or` filter operator is not allowed inside a tree.

Example: {"$and":[{"field":"archived","op":"$eq","value":false},{"$or":[{"field":"secondary_value","op":"$eq","value":"1"},{"field":"secondary_value","op":"$eq","value":"2"}]}]}

type ListItemLogicalFilter_Or_Item

type ListItemLogicalFilter_Or_Item struct {
	// contains filtered or unexported fields
}

ListItemLogicalFilter_Or_Item defines model for ListItemLogicalFilter.$or.Item.

func (ListItemLogicalFilter_Or_Item) AsListItemLogicalFilter

func (t ListItemLogicalFilter_Or_Item) AsListItemLogicalFilter() (ListItemLogicalFilter, error)

AsListItemLogicalFilter returns the union data inside the ListItemLogicalFilter_Or_Item as a ListItemLogicalFilter

func (ListItemLogicalFilter_Or_Item) AsListItemQueryFilter

func (t ListItemLogicalFilter_Or_Item) AsListItemQueryFilter() (ListItemQueryFilter, error)

AsListItemQueryFilter returns the union data inside the ListItemLogicalFilter_Or_Item as a ListItemQueryFilter

func (*ListItemLogicalFilter_Or_Item) FromListItemLogicalFilter

func (t *ListItemLogicalFilter_Or_Item) FromListItemLogicalFilter(v ListItemLogicalFilter) error

FromListItemLogicalFilter overwrites any union data inside the ListItemLogicalFilter_Or_Item as the provided ListItemLogicalFilter

func (*ListItemLogicalFilter_Or_Item) FromListItemQueryFilter

func (t *ListItemLogicalFilter_Or_Item) FromListItemQueryFilter(v ListItemQueryFilter) error

FromListItemQueryFilter overwrites any union data inside the ListItemLogicalFilter_Or_Item as the provided ListItemQueryFilter

func (ListItemLogicalFilter_Or_Item) MarshalJSON

func (t ListItemLogicalFilter_Or_Item) MarshalJSON() ([]byte, error)

func (*ListItemLogicalFilter_Or_Item) MergeListItemLogicalFilter

func (t *ListItemLogicalFilter_Or_Item) MergeListItemLogicalFilter(v ListItemLogicalFilter) error

MergeListItemLogicalFilter performs a merge with any union data inside the ListItemLogicalFilter_Or_Item, using the provided ListItemLogicalFilter

func (*ListItemLogicalFilter_Or_Item) MergeListItemQueryFilter

func (t *ListItemLogicalFilter_Or_Item) MergeListItemQueryFilter(v ListItemQueryFilter) error

MergeListItemQueryFilter performs a merge with any union data inside the ListItemLogicalFilter_Or_Item, using the provided ListItemQueryFilter

func (*ListItemLogicalFilter_Or_Item) UnmarshalJSON

func (t *ListItemLogicalFilter_Or_Item) UnmarshalJSON(b []byte) error

type ListItemOrQueryFilter

type ListItemOrQueryFilter struct {
	// Op Example: $or
	Op    ListItemOrQueryFilterOp `json:"op"`
	Value []ListItemQueryFilter   `json:"value"`
}

ListItemOrQueryFilter defines model for ListItemOrQueryFilter.

type ListItemOrQueryFilterOp

type ListItemOrQueryFilterOp string

ListItemOrQueryFilterOp Example: $or

const (
	ListItemOrQueryFilterOpOr ListItemOrQueryFilterOp = "$or"
)

Defines values for ListItemOrQueryFilterOp.

func (ListItemOrQueryFilterOp) Valid

func (e ListItemOrQueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the ListItemOrQueryFilterOp enum.

type ListItemQuery

type ListItemQuery struct {
	// Page Page number
	//
	// Example: 1
	Page *int `json:"page,omitempty"`

	// ResultsSize How many records to show per page
	//
	// Example: 50
	ResultsSize *int `json:"results_size,omitempty"`
	// contains filtered or unexported fields
}

ListItemQuery defines model for ListItemQuery.

func (ListItemQuery) AsListItemQueryWithSort

func (t ListItemQuery) AsListItemQueryWithSort() (ListItemQueryWithSort, error)

AsListItemQueryWithSort returns the union data inside the ListItemQuery as a ListItemQueryWithSort

func (ListItemQuery) AsListItemQueryWithoutSort

func (t ListItemQuery) AsListItemQueryWithoutSort() (ListItemQueryWithoutSort, error)

AsListItemQueryWithoutSort returns the union data inside the ListItemQuery as a ListItemQueryWithoutSort

func (*ListItemQuery) FromListItemQueryWithSort

func (t *ListItemQuery) FromListItemQueryWithSort(v ListItemQueryWithSort) error

FromListItemQueryWithSort overwrites any union data inside the ListItemQuery as the provided ListItemQueryWithSort

func (*ListItemQuery) FromListItemQueryWithoutSort

func (t *ListItemQuery) FromListItemQueryWithoutSort(v ListItemQueryWithoutSort) error

FromListItemQueryWithoutSort overwrites any union data inside the ListItemQuery as the provided ListItemQueryWithoutSort

func (ListItemQuery) MarshalJSON

func (t ListItemQuery) MarshalJSON() ([]byte, error)

func (*ListItemQuery) MergeListItemQueryWithSort

func (t *ListItemQuery) MergeListItemQueryWithSort(v ListItemQueryWithSort) error

MergeListItemQueryWithSort performs a merge with any union data inside the ListItemQuery, using the provided ListItemQueryWithSort

func (*ListItemQuery) MergeListItemQueryWithoutSort

func (t *ListItemQuery) MergeListItemQueryWithoutSort(v ListItemQueryWithoutSort) error

MergeListItemQueryWithoutSort performs a merge with any union data inside the ListItemQuery, using the provided ListItemQueryWithoutSort

func (*ListItemQuery) UnmarshalJSON

func (t *ListItemQuery) UnmarshalJSON(b []byte) error

type ListItemQueryFilter

type ListItemQueryFilter struct {
	// Field List Item field name
	//
	// Example: primary_value
	Field ListItemQueryFilterField `json:"field"`

	// Op Example: $eq
	Op ListItemQueryFilterOp `json:"op"`

	// Value Can be string or bool
	//
	// Example: effb8e3c-084c-4d3e-b7ee-f8741b79c8d2
	Value ListItemQueryFilter_Value `json:"value"`
}

ListItemQueryFilter defines model for ListItemQueryFilter.

type ListItemQueryFilterField

type ListItemQueryFilterField string

ListItemQueryFilterField List Item field name

Example: primary_value

const (
	ListItemQueryFilterFieldArchived       ListItemQueryFilterField = "archived"
	ListItemQueryFilterFieldPrimaryValue   ListItemQueryFilterField = "primary_value"
	ListItemQueryFilterFieldSecondaryValue ListItemQueryFilterField = "secondary_value"
)

Defines values for ListItemQueryFilterField.

func (ListItemQueryFilterField) Valid

func (e ListItemQueryFilterField) Valid() bool

Valid indicates whether the value is a known member of the ListItemQueryFilterField enum.

type ListItemQueryFilterOp

type ListItemQueryFilterOp string

ListItemQueryFilterOp Example: $eq

const (
	ListItemQueryFilterOpEq ListItemQueryFilterOp = "$eq"
)

Defines values for ListItemQueryFilterOp.

func (ListItemQueryFilterOp) Valid

func (e ListItemQueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the ListItemQueryFilterOp enum.

type ListItemQueryFilterValue0

type ListItemQueryFilterValue0 = string

ListItemQueryFilterValue0 defines model for ListItemQueryFilter.Value.0.

type ListItemQueryFilterValue1

type ListItemQueryFilterValue1 = bool

ListItemQueryFilterValue1 defines model for ListItemQueryFilter.Value.1.

type ListItemQueryFilter_Value

type ListItemQueryFilter_Value struct {
	// contains filtered or unexported fields
}

ListItemQueryFilter_Value Can be string or bool

Example: effb8e3c-084c-4d3e-b7ee-f8741b79c8d2

func (ListItemQueryFilter_Value) AsListItemQueryFilterValue0

func (t ListItemQueryFilter_Value) AsListItemQueryFilterValue0() (ListItemQueryFilterValue0, error)

AsListItemQueryFilterValue0 returns the union data inside the ListItemQueryFilter_Value as a ListItemQueryFilterValue0

func (ListItemQueryFilter_Value) AsListItemQueryFilterValue1

func (t ListItemQueryFilter_Value) AsListItemQueryFilterValue1() (ListItemQueryFilterValue1, error)

AsListItemQueryFilterValue1 returns the union data inside the ListItemQueryFilter_Value as a ListItemQueryFilterValue1

func (*ListItemQueryFilter_Value) FromListItemQueryFilterValue0

func (t *ListItemQueryFilter_Value) FromListItemQueryFilterValue0(v ListItemQueryFilterValue0) error

FromListItemQueryFilterValue0 overwrites any union data inside the ListItemQueryFilter_Value as the provided ListItemQueryFilterValue0

func (*ListItemQueryFilter_Value) FromListItemQueryFilterValue1

func (t *ListItemQueryFilter_Value) FromListItemQueryFilterValue1(v ListItemQueryFilterValue1) error

FromListItemQueryFilterValue1 overwrites any union data inside the ListItemQueryFilter_Value as the provided ListItemQueryFilterValue1

func (ListItemQueryFilter_Value) MarshalJSON

func (t ListItemQueryFilter_Value) MarshalJSON() ([]byte, error)

func (*ListItemQueryFilter_Value) MergeListItemQueryFilterValue0

func (t *ListItemQueryFilter_Value) MergeListItemQueryFilterValue0(v ListItemQueryFilterValue0) error

MergeListItemQueryFilterValue0 performs a merge with any union data inside the ListItemQueryFilter_Value, using the provided ListItemQueryFilterValue0

func (*ListItemQueryFilter_Value) MergeListItemQueryFilterValue1

func (t *ListItemQueryFilter_Value) MergeListItemQueryFilterValue1(v ListItemQueryFilterValue1) error

MergeListItemQueryFilterValue1 performs a merge with any union data inside the ListItemQueryFilter_Value, using the provided ListItemQueryFilterValue1

func (*ListItemQueryFilter_Value) UnmarshalJSON

func (t *ListItemQueryFilter_Value) UnmarshalJSON(b []byte) error

type ListItemQueryWithSort

type ListItemQueryWithSort struct {
	// Filters A sorted query accepts only one `archived` filter, either as a list or as a filter tree with a single leaf.
	Filters *ListItemQueryWithSort_Filters `json:"filters,omitempty"`

	// Sort List Item sort order, based on creation timestamp
	Sort *struct {
		// Field created_at is the only allowed field for sorting List Items
		//
		// Example: created_at
		Field ListItemQueryWithSortSortField `json:"field"`

		// Order Example: asc
		Order ListItemQueryWithSortSortOrder `json:"order"`
	} `json:"sort,omitempty"`
}

ListItemQueryWithSort defines model for ListItemQueryWithSort.

type ListItemQueryWithSortFilters0

type ListItemQueryWithSortFilters0 = []ListItemFilterCondition

ListItemQueryWithSortFilters0 Example: [{"field":"archived","op":"$eq","value":true}]

type ListItemQueryWithSortFilters1

type ListItemQueryWithSortFilters1 struct {
	And *[]ListItemFilterCondition `json:"$and,omitempty"`
	Or  *[]ListItemFilterCondition `json:"$or,omitempty"`
}

ListItemQueryWithSortFilters1 Example: {"$and":[{"field":"archived","op":"$eq","value":true}]}

type ListItemQueryWithSortSortField

type ListItemQueryWithSortSortField string

ListItemQueryWithSortSortField created_at is the only allowed field for sorting List Items

Example: created_at

const (
	ListItemQueryWithSortSortFieldCreatedAt ListItemQueryWithSortSortField = "created_at"
)

Defines values for ListItemQueryWithSortSortField.

func (ListItemQueryWithSortSortField) Valid

Valid indicates whether the value is a known member of the ListItemQueryWithSortSortField enum.

type ListItemQueryWithSortSortOrder

type ListItemQueryWithSortSortOrder string

ListItemQueryWithSortSortOrder Example: asc

const (
	ListItemQueryWithSortSortOrderAsc  ListItemQueryWithSortSortOrder = "asc"
	ListItemQueryWithSortSortOrderDesc ListItemQueryWithSortSortOrder = "desc"
)

Defines values for ListItemQueryWithSortSortOrder.

func (ListItemQueryWithSortSortOrder) Valid

Valid indicates whether the value is a known member of the ListItemQueryWithSortSortOrder enum.

type ListItemQueryWithSort_Filters

type ListItemQueryWithSort_Filters struct {
	// contains filtered or unexported fields
}

ListItemQueryWithSort_Filters A sorted query accepts only one `archived` filter, either as a list or as a filter tree with a single leaf.

func (ListItemQueryWithSort_Filters) AsListItemQueryWithSortFilters0

func (t ListItemQueryWithSort_Filters) AsListItemQueryWithSortFilters0() (ListItemQueryWithSortFilters0, error)

AsListItemQueryWithSortFilters0 returns the union data inside the ListItemQueryWithSort_Filters as a ListItemQueryWithSortFilters0

func (ListItemQueryWithSort_Filters) AsListItemQueryWithSortFilters1

func (t ListItemQueryWithSort_Filters) AsListItemQueryWithSortFilters1() (ListItemQueryWithSortFilters1, error)

AsListItemQueryWithSortFilters1 returns the union data inside the ListItemQueryWithSort_Filters as a ListItemQueryWithSortFilters1

func (*ListItemQueryWithSort_Filters) FromListItemQueryWithSortFilters0

func (t *ListItemQueryWithSort_Filters) FromListItemQueryWithSortFilters0(v ListItemQueryWithSortFilters0) error

FromListItemQueryWithSortFilters0 overwrites any union data inside the ListItemQueryWithSort_Filters as the provided ListItemQueryWithSortFilters0

func (*ListItemQueryWithSort_Filters) FromListItemQueryWithSortFilters1

func (t *ListItemQueryWithSort_Filters) FromListItemQueryWithSortFilters1(v ListItemQueryWithSortFilters1) error

FromListItemQueryWithSortFilters1 overwrites any union data inside the ListItemQueryWithSort_Filters as the provided ListItemQueryWithSortFilters1

func (ListItemQueryWithSort_Filters) MarshalJSON

func (t ListItemQueryWithSort_Filters) MarshalJSON() ([]byte, error)

func (*ListItemQueryWithSort_Filters) MergeListItemQueryWithSortFilters0

func (t *ListItemQueryWithSort_Filters) MergeListItemQueryWithSortFilters0(v ListItemQueryWithSortFilters0) error

MergeListItemQueryWithSortFilters0 performs a merge with any union data inside the ListItemQueryWithSort_Filters, using the provided ListItemQueryWithSortFilters0

func (*ListItemQueryWithSort_Filters) MergeListItemQueryWithSortFilters1

func (t *ListItemQueryWithSort_Filters) MergeListItemQueryWithSortFilters1(v ListItemQueryWithSortFilters1) error

MergeListItemQueryWithSortFilters1 performs a merge with any union data inside the ListItemQueryWithSort_Filters, using the provided ListItemQueryWithSortFilters1

func (*ListItemQueryWithSort_Filters) UnmarshalJSON

func (t *ListItemQueryWithSort_Filters) UnmarshalJSON(b []byte) error

type ListItemQueryWithoutSort

type ListItemQueryWithoutSort struct {
	// Filters Additional filters to query list items by fields and archival status. Accepts a list of filters or a filter tree
	// (`{ "$and" | "$or": [...] }`).
	Filters *ListItemFilters `json:"filters,omitempty"`
}

ListItemQueryWithoutSort defines model for ListItemQueryWithoutSort.

type ListItemRequest

type ListItemRequest struct {
	// Author Indicates who or how the list item was created. Typically, this refers to the user that created the item from within the Castle Dashboard, or the policy ID if it was automatically created via automation.
	Author ListItemAuthor `json:"author"`

	// AutoArchivesAt Time after which a the List Item will be automatically archived and no longer matched against each event. A value of `null` means auto archivation is disabled and the record will stay active in the list forever.
	//
	// Example: 2021-09-27T16:46:38.313Z
	AutoArchivesAt nullable.Nullable[time.Time] `json:"auto_archives_at,omitempty"`

	// Comment An arbitrary string that can be used to eg. explain why this List Item was created. Often useful to display to other users.
	//
	// Example: Fradulent user found through manual inspection
	Comment *string `json:"comment,omitempty"`

	// Mode Describes a strategy to use when a List Item with the same `(primary, secondary)` values is already in the List. Available strategies:
	//   - `$error` - return a 422 HTTP error
	//   - `$replace` - archive the existing List Item and create a new one
	//   - `$update` - if the author matches the existing List Item, update it. Otherwise, throw an HTTP 422 error.
	//   - `$update_or_replace` - if the author matches the existing List Item, update it. Otherwise, archive the existing List Item and create a new one.
	Mode *ListItemRequestMode `json:"mode,omitempty"`

	// PrimaryValue Value of the `primary_field` as described by the List definition. For example, if `primary_field` is configured to be the Event `user.id`, the `primary_value` on the List Item referes to the actual User ID value.
	//
	// Example: A04t7AcfSA69cBTTusx0RQ
	PrimaryValue string `json:"primary_value"`

	// SecondaryValue Optional secondary value. If this value is set, it means that for a List Item to match an Event, both the `primary_value` and `secondary_value` must match.
	//
	// Example: 2ee938c8-24c2-4c26-9d25-19511dd75029
	SecondaryValue nullable.Nullable[string] `json:"secondary_value,omitempty"`
}

ListItemRequest defines model for ListItemRequest.

type ListItemRequestMode

type ListItemRequestMode string

ListItemRequestMode Describes a strategy to use when a List Item with the same `(primary, secondary)` values is already in the List. Available strategies:

  • `$error` - return a 422 HTTP error
  • `$replace` - archive the existing List Item and create a new one
  • `$update` - if the author matches the existing List Item, update it. Otherwise, throw an HTTP 422 error.
  • `$update_or_replace` - if the author matches the existing List Item, update it. Otherwise, archive the existing List Item and create a new one.
const (
	Error           ListItemRequestMode = "$error"
	Replace         ListItemRequestMode = "$replace"
	Update          ListItemRequestMode = "$update"
	UpdateOrReplace ListItemRequestMode = "$update_or_replace"
)

Defines values for ListItemRequestMode.

func (ListItemRequestMode) Valid

func (e ListItemRequestMode) Valid() bool

Valid indicates whether the value is a known member of the ListItemRequestMode enum.

type ListItemsBatchRequest

type ListItemsBatchRequest struct {
	Items *[]ListItemRequest `json:"items,omitempty"`
}

ListItemsBatchRequest defines model for ListItemsBatchRequest.

type ListItemsBatchResponse

type ListItemsBatchResponse struct {
	// Created Number of items created
	Created *int `json:"created,omitempty"`

	// Errored Total number of items that errored
	Errored *int `json:"errored,omitempty"`

	// Replaced Total number of items replaced
	Replaced *int `json:"replaced,omitempty"`

	// TotalProcessed Total number of items processed without any errors
	TotalProcessed int `json:"total_processed"`

	// TotalReceived Total number of items received
	TotalReceived int `json:"total_received"`

	// Updated Number of items updated
	Updated *int `json:"updated,omitempty"`
}

ListItemsBatchResponse Example: {"created":100,"errored":5,"replaced":10,"total_processed":130,"total_received":135,"updated":20}

type ListList

type ListList = []List

ListList List of Lists

type ListLogicalFilter

type ListLogicalFilter struct {
	And *[]ListFilterOperand         `json:"$and,omitempty"`
	Or  *[]ListLogicalFilter_Or_Item `json:"$or,omitempty"`
}

ListLogicalFilter A list filter tree node. Set exactly one of `$and` or `$or`. Each child is a leaf filter or another node. Trees are limited to 10 levels and 200 nodes, and the `$or` filter operator is not allowed inside a tree.

Example: {"$and":[{"field":"archived","op":"$eq","value":false},{"$or":[{"field":"primary_field","op":"$eq","value":"user.id"},{"field":"primary_field","op":"$eq","value":"user.email"}]}]}

type ListLogicalFilter_Or_Item

type ListLogicalFilter_Or_Item struct {
	// contains filtered or unexported fields
}

ListLogicalFilter_Or_Item defines model for ListLogicalFilter.$or.Item.

func (ListLogicalFilter_Or_Item) AsListLogicalFilter

func (t ListLogicalFilter_Or_Item) AsListLogicalFilter() (ListLogicalFilter, error)

AsListLogicalFilter returns the union data inside the ListLogicalFilter_Or_Item as a ListLogicalFilter

func (ListLogicalFilter_Or_Item) AsListQueryFilter

func (t ListLogicalFilter_Or_Item) AsListQueryFilter() (ListQueryFilter, error)

AsListQueryFilter returns the union data inside the ListLogicalFilter_Or_Item as a ListQueryFilter

func (*ListLogicalFilter_Or_Item) FromListLogicalFilter

func (t *ListLogicalFilter_Or_Item) FromListLogicalFilter(v ListLogicalFilter) error

FromListLogicalFilter overwrites any union data inside the ListLogicalFilter_Or_Item as the provided ListLogicalFilter

func (*ListLogicalFilter_Or_Item) FromListQueryFilter

func (t *ListLogicalFilter_Or_Item) FromListQueryFilter(v ListQueryFilter) error

FromListQueryFilter overwrites any union data inside the ListLogicalFilter_Or_Item as the provided ListQueryFilter

func (ListLogicalFilter_Or_Item) MarshalJSON

func (t ListLogicalFilter_Or_Item) MarshalJSON() ([]byte, error)

func (*ListLogicalFilter_Or_Item) MergeListLogicalFilter

func (t *ListLogicalFilter_Or_Item) MergeListLogicalFilter(v ListLogicalFilter) error

MergeListLogicalFilter performs a merge with any union data inside the ListLogicalFilter_Or_Item, using the provided ListLogicalFilter

func (*ListLogicalFilter_Or_Item) MergeListQueryFilter

func (t *ListLogicalFilter_Or_Item) MergeListQueryFilter(v ListQueryFilter) error

MergeListQueryFilter performs a merge with any union data inside the ListLogicalFilter_Or_Item, using the provided ListQueryFilter

func (*ListLogicalFilter_Or_Item) UnmarshalJSON

func (t *ListLogicalFilter_Or_Item) UnmarshalJSON(b []byte) error

type ListOrQueryFilter

type ListOrQueryFilter struct {
	// Op Example: $or
	Op    ListOrQueryFilterOp `json:"op"`
	Value []ListQueryFilter   `json:"value"`
}

ListOrQueryFilter defines model for ListOrQueryFilter.

type ListOrQueryFilterOp

type ListOrQueryFilterOp string

ListOrQueryFilterOp Example: $or

const (
	ListOrQueryFilterOpOr ListOrQueryFilterOp = "$or"
)

Defines values for ListOrQueryFilterOp.

func (ListOrQueryFilterOp) Valid

func (e ListOrQueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the ListOrQueryFilterOp enum.

type ListPrimaryField

type ListPrimaryField = string

ListPrimaryField Event field for which the List Item value will be matched against, such as `user.id` or `device.fingerprint`.

Example: device.fingerprint

type ListQuery

type ListQuery struct {
	// Filters Additional filters to query lists by fields and archival status. Accepts a list of filters or a filter tree
	// (`{ "$and" | "$or": [...] }`).
	Filters *ListQuery_Filters `json:"filters,omitempty"`

	// IncludeSizeLabel Whether to include the size label in the response
	//
	// Example: true
	IncludeSizeLabel *bool `json:"include_size_label,omitempty"`

	// Page Page number
	//
	// Example: 2
	Page *int `json:"page,omitempty"`

	// ResultsSize How many records to show per page
	//
	// Example: 50
	ResultsSize *int `json:"results_size,omitempty"`

	// Sort List sort order, based on creation timestamp
	Sort *struct {
		// Field "created_at" is the only allowed field for sorting Lists
		//
		// Example: created_at
		Field ListQuerySortField `json:"field"`

		// Order Example: asc
		Order ListQuerySortOrder `json:"order"`
	} `json:"sort,omitempty"`
}

ListQuery List Query

type ListQueryFilter

type ListQueryFilter struct {
	// Field List field name
	//
	// Example: primary_field
	Field ListQueryFilterField `json:"field"`

	// Op Example: $eq
	Op ListQueryFilterOp `json:"op"`

	// Value Can be string or bool
	//
	// Example: effb8e3c-084c-4d3e-b7ee-f8741b79c8d2
	Value ListQueryFilter_Value `json:"value"`
}

ListQueryFilter defines model for ListQueryFilter.

type ListQueryFilterField

type ListQueryFilterField string

ListQueryFilterField List field name

Example: primary_field

const (
	ListQueryFilterFieldArchived       ListQueryFilterField = "archived"
	ListQueryFilterFieldPrimaryField   ListQueryFilterField = "primary_field"
	ListQueryFilterFieldSecondaryField ListQueryFilterField = "secondary_field"
)

Defines values for ListQueryFilterField.

func (ListQueryFilterField) Valid

func (e ListQueryFilterField) Valid() bool

Valid indicates whether the value is a known member of the ListQueryFilterField enum.

type ListQueryFilterOp

type ListQueryFilterOp string

ListQueryFilterOp Example: $eq

const (
	ListQueryFilterOpEq ListQueryFilterOp = "$eq"
)

Defines values for ListQueryFilterOp.

func (ListQueryFilterOp) Valid

func (e ListQueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the ListQueryFilterOp enum.

type ListQueryFilterValue0

type ListQueryFilterValue0 = string

ListQueryFilterValue0 defines model for ListQueryFilter.Value.0.

type ListQueryFilterValue1

type ListQueryFilterValue1 = bool

ListQueryFilterValue1 defines model for ListQueryFilter.Value.1.

type ListQueryFilter_Value

type ListQueryFilter_Value struct {
	// contains filtered or unexported fields
}

ListQueryFilter_Value Can be string or bool

Example: effb8e3c-084c-4d3e-b7ee-f8741b79c8d2

func (ListQueryFilter_Value) AsListQueryFilterValue0

func (t ListQueryFilter_Value) AsListQueryFilterValue0() (ListQueryFilterValue0, error)

AsListQueryFilterValue0 returns the union data inside the ListQueryFilter_Value as a ListQueryFilterValue0

func (ListQueryFilter_Value) AsListQueryFilterValue1

func (t ListQueryFilter_Value) AsListQueryFilterValue1() (ListQueryFilterValue1, error)

AsListQueryFilterValue1 returns the union data inside the ListQueryFilter_Value as a ListQueryFilterValue1

func (*ListQueryFilter_Value) FromListQueryFilterValue0

func (t *ListQueryFilter_Value) FromListQueryFilterValue0(v ListQueryFilterValue0) error

FromListQueryFilterValue0 overwrites any union data inside the ListQueryFilter_Value as the provided ListQueryFilterValue0

func (*ListQueryFilter_Value) FromListQueryFilterValue1

func (t *ListQueryFilter_Value) FromListQueryFilterValue1(v ListQueryFilterValue1) error

FromListQueryFilterValue1 overwrites any union data inside the ListQueryFilter_Value as the provided ListQueryFilterValue1

func (ListQueryFilter_Value) MarshalJSON

func (t ListQueryFilter_Value) MarshalJSON() ([]byte, error)

func (*ListQueryFilter_Value) MergeListQueryFilterValue0

func (t *ListQueryFilter_Value) MergeListQueryFilterValue0(v ListQueryFilterValue0) error

MergeListQueryFilterValue0 performs a merge with any union data inside the ListQueryFilter_Value, using the provided ListQueryFilterValue0

func (*ListQueryFilter_Value) MergeListQueryFilterValue1

func (t *ListQueryFilter_Value) MergeListQueryFilterValue1(v ListQueryFilterValue1) error

MergeListQueryFilterValue1 performs a merge with any union data inside the ListQueryFilter_Value, using the provided ListQueryFilterValue1

func (*ListQueryFilter_Value) UnmarshalJSON

func (t *ListQueryFilter_Value) UnmarshalJSON(b []byte) error

type ListQueryFilters0

type ListQueryFilters0 = []ListQuery_Filters_0_Item

ListQueryFilters0 Example: [{"field":"primary_field","op":"$eq","value":"device.fingerprint"},{"field":"archived","op":"$eq","value":false},{"op":"$or","value":[{"field":"secondary_field","op":"$eq","value":"user.id"}]},{"op":"$or","value":[{"field":"secondary_field","op":"$eq","value":"user.email"}]}]

type ListQueryResponse

type ListQueryResponse = []struct {
	// ArchivedAt Timestamp of when the List was archived. If this value is `null`, it means the list is active.
	//
	// Example: 2021-09-27T16:46:38.313Z
	ArchivedAt nullable.Nullable[time.Time] `json:"archived_at,omitempty"`

	// Color Color assigned to the List. These colors can be used to represent different sentiments, such as red for blocked records or green for trusted.
	//
	// Example: $red
	Color ListColor `json:"color"`

	// CreatedAt Example: 2021-09-27T16:46:38.313Z
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// DefaultItemArchivationTime Default time, in seconds, after which Items in this List automatically gets archived after they are created. It is possible to override this value when creating the individual List Items
	//
	// Example: 2592000
	DefaultItemArchivationTime nullable.Nullable[int] `json:"default_item_archivation_time,omitempty"`

	// Description Description of the List
	//
	// Example: We block these IPs from withdrawing funds. Please be careful.
	Description nullable.Nullable[string] `json:"description,omitempty"`

	// Id Example: 2ee938c8-24c2-4c26-9d25-19511dd75029
	Id string `json:"id"`

	// Managed Indicates whether this List is managed by Castle. Managed lists are read-only and maintained by Castle.
	//
	// Example: false
	Managed *bool `json:"managed,omitempty"`

	// Name Name of the List
	//
	// Example: Malicious IPs
	Name string `json:"name"`

	// PrimaryField Event field for which the List Item value will be matched against, such as `user.id` or `device.fingerprint`.
	//
	// Example: device.fingerprint
	PrimaryField ListPrimaryField `json:"primary_field"`

	// SecondaryField A secondary event field for which the List Item value will be matched against. Warning: make sure you input a correct field name
	//
	// Example: ip.value
	SecondaryField nullable.Nullable[ListSecondaryField] `json:"secondary_field,omitempty"`

	// SizeLabel The size label of the list. This is only returned if `include_size_label` is set to `true` in the request.
	//
	// Example: 9852
	SizeLabel *string `json:"size_label,omitempty"`
}

ListQueryResponse List Query Response

type ListQuerySortField

type ListQuerySortField string

ListQuerySortField "created_at" is the only allowed field for sorting Lists

Example: created_at

const (
	ListQuerySortFieldCreatedAt ListQuerySortField = "created_at"
)

Defines values for ListQuerySortField.

func (ListQuerySortField) Valid

func (e ListQuerySortField) Valid() bool

Valid indicates whether the value is a known member of the ListQuerySortField enum.

type ListQuerySortOrder

type ListQuerySortOrder string

ListQuerySortOrder Example: asc

const (
	ListQuerySortOrderAsc  ListQuerySortOrder = "asc"
	ListQuerySortOrderDesc ListQuerySortOrder = "desc"
)

Defines values for ListQuerySortOrder.

func (ListQuerySortOrder) Valid

func (e ListQuerySortOrder) Valid() bool

Valid indicates whether the value is a known member of the ListQuerySortOrder enum.

type ListQuery_Filters

type ListQuery_Filters struct {
	// contains filtered or unexported fields
}

ListQuery_Filters Additional filters to query lists by fields and archival status. Accepts a list of filters or a filter tree (`{ "$and" | "$or": [...] }`).

func (ListQuery_Filters) AsListLogicalFilter

func (t ListQuery_Filters) AsListLogicalFilter() (ListLogicalFilter, error)

AsListLogicalFilter returns the union data inside the ListQuery_Filters as a ListLogicalFilter

func (ListQuery_Filters) AsListQueryFilters0

func (t ListQuery_Filters) AsListQueryFilters0() (ListQueryFilters0, error)

AsListQueryFilters0 returns the union data inside the ListQuery_Filters as a ListQueryFilters0

func (*ListQuery_Filters) FromListLogicalFilter

func (t *ListQuery_Filters) FromListLogicalFilter(v ListLogicalFilter) error

FromListLogicalFilter overwrites any union data inside the ListQuery_Filters as the provided ListLogicalFilter

func (*ListQuery_Filters) FromListQueryFilters0

func (t *ListQuery_Filters) FromListQueryFilters0(v ListQueryFilters0) error

FromListQueryFilters0 overwrites any union data inside the ListQuery_Filters as the provided ListQueryFilters0

func (ListQuery_Filters) MarshalJSON

func (t ListQuery_Filters) MarshalJSON() ([]byte, error)

func (*ListQuery_Filters) MergeListLogicalFilter

func (t *ListQuery_Filters) MergeListLogicalFilter(v ListLogicalFilter) error

MergeListLogicalFilter performs a merge with any union data inside the ListQuery_Filters, using the provided ListLogicalFilter

func (*ListQuery_Filters) MergeListQueryFilters0

func (t *ListQuery_Filters) MergeListQueryFilters0(v ListQueryFilters0) error

MergeListQueryFilters0 performs a merge with any union data inside the ListQuery_Filters, using the provided ListQueryFilters0

func (*ListQuery_Filters) UnmarshalJSON

func (t *ListQuery_Filters) UnmarshalJSON(b []byte) error

type ListQuery_Filters_0_Item

type ListQuery_Filters_0_Item struct {
	// contains filtered or unexported fields
}

ListQuery_Filters_0_Item defines model for ListQuery.Filters.0.Item.

func (ListQuery_Filters_0_Item) AsListOrQueryFilter

func (t ListQuery_Filters_0_Item) AsListOrQueryFilter() (ListOrQueryFilter, error)

AsListOrQueryFilter returns the union data inside the ListQuery_Filters_0_Item as a ListOrQueryFilter

func (ListQuery_Filters_0_Item) AsListQueryFilter

func (t ListQuery_Filters_0_Item) AsListQueryFilter() (ListQueryFilter, error)

AsListQueryFilter returns the union data inside the ListQuery_Filters_0_Item as a ListQueryFilter

func (ListQuery_Filters_0_Item) Discriminator

func (t ListQuery_Filters_0_Item) Discriminator() (string, error)

func (*ListQuery_Filters_0_Item) FromListOrQueryFilter

func (t *ListQuery_Filters_0_Item) FromListOrQueryFilter(v ListOrQueryFilter) error

FromListOrQueryFilter overwrites any union data inside the ListQuery_Filters_0_Item as the provided ListOrQueryFilter

func (*ListQuery_Filters_0_Item) FromListQueryFilter

func (t *ListQuery_Filters_0_Item) FromListQueryFilter(v ListQueryFilter) error

FromListQueryFilter overwrites any union data inside the ListQuery_Filters_0_Item as the provided ListQueryFilter

func (ListQuery_Filters_0_Item) MarshalJSON

func (t ListQuery_Filters_0_Item) MarshalJSON() ([]byte, error)

func (*ListQuery_Filters_0_Item) MergeListOrQueryFilter

func (t *ListQuery_Filters_0_Item) MergeListOrQueryFilter(v ListOrQueryFilter) error

MergeListOrQueryFilter performs a merge with any union data inside the ListQuery_Filters_0_Item, using the provided ListOrQueryFilter

func (*ListQuery_Filters_0_Item) MergeListQueryFilter

func (t *ListQuery_Filters_0_Item) MergeListQueryFilter(v ListQueryFilter) error

MergeListQueryFilter performs a merge with any union data inside the ListQuery_Filters_0_Item, using the provided ListQueryFilter

func (*ListQuery_Filters_0_Item) UnmarshalJSON

func (t *ListQuery_Filters_0_Item) UnmarshalJSON(b []byte) error

func (ListQuery_Filters_0_Item) ValueByDiscriminator

func (t ListQuery_Filters_0_Item) ValueByDiscriminator() (interface{}, error)

type ListRequest

type ListRequest struct {
	// Color Color assigned to the List. These colors can be used to represent different sentiments, such as red for blocked records or green for trusted.
	//
	// Example: $red
	Color ListColor `json:"color"`

	// DefaultItemArchivationTime Default time, in seconds, after which Items in this List automatically gets archived after they are created. It is possible to override this value when creating the individual List Items
	//
	// Example: 2592000
	DefaultItemArchivationTime nullable.Nullable[int] `json:"default_item_archivation_time,omitempty"`

	// Description Description of the List
	//
	// Example: We block these IPs from withdrawing funds. Please be careful.
	Description nullable.Nullable[string] `json:"description,omitempty"`

	// Name Name of the List
	//
	// Example: Malicious IPs
	Name string `json:"name"`

	// PrimaryField Event field for which the List Item value will be matched against, such as `user.id` or `device.fingerprint`.
	//
	// Example: device.fingerprint
	PrimaryField ListPrimaryField `json:"primary_field"`

	// SecondaryField A secondary event field for which the List Item value will be matched against. Warning: make sure you input a correct field name
	//
	// Example: ip.value
	SecondaryField nullable.Nullable[ListSecondaryField] `json:"secondary_field,omitempty"`
}

ListRequest defines model for ListRequest.

type ListSecondaryField

type ListSecondaryField = string

ListSecondaryField A secondary event field for which the List Item value will be matched against. Warning: make sure you input a correct field name

Example: ip.value

type LoginFilterRequest

type LoginFilterRequest struct {
	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`

	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand *[]string `json:"expand,omitempty"`

	// MatchingUserId User id related connected with the request
	//
	// Example: 123
	MatchingUserId *string `json:"matching_user_id,omitempty"`
	Params         *struct {
		// Email The email address sent by the user
		//
		// Example: Rhea.Franecki@example.org
		Email *string `json:"email,omitempty"`

		// Phone The phone number sent by the user
		//
		// Example: +16175551212
		Phone *string `json:"phone,omitempty"`

		// Username The username sent by the user
		//
		// Example: superhero123
		Username *string `json:"username,omitempty"`
	} `json:"params,omitempty"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](https://docs.castle.io/docs/quickstart)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool                     `json:"skip_request_token_validation,omitempty"`
	Status                     *LoginFilterRequestStatus `json:"status,omitempty"`

	// Type Castle supported events available for this endpoint
	Type LoginFilterRequestType `json:"type"`
	User *struct {
		// Email The identified user's email address
		//
		// Example: Rhea.Franecki@example.org
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Email *string `json:"email,omitempty"`

		// Phone The identified user's phone number
		//
		// Example: +16175551212
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Phone *string `json:"phone,omitempty"`
	} `json:"user,omitempty"`
}

LoginFilterRequest defines model for LoginFilterRequest.

type LoginFilterRequestStatus

type LoginFilterRequestStatus string

LoginFilterRequestStatus defines model for LoginFilterRequest.Status.

const (
	LoginFilterRequestStatusAttempted LoginFilterRequestStatus = "$attempted"
	LoginFilterRequestStatusFailed    LoginFilterRequestStatus = "$failed"
)

Defines values for LoginFilterRequestStatus.

func (LoginFilterRequestStatus) Valid

func (e LoginFilterRequestStatus) Valid() bool

Valid indicates whether the value is a known member of the LoginFilterRequestStatus enum.

type LoginFilterRequestType

type LoginFilterRequestType string

LoginFilterRequestType Castle supported events available for this endpoint

const (
	LoginFilterRequestTypeLogin LoginFilterRequestType = "$login"
)

Defines values for LoginFilterRequestType.

func (LoginFilterRequestType) Valid

func (e LoginFilterRequestType) Valid() bool

Valid indicates whether the value is a known member of the LoginFilterRequestType enum.

type LoginResponse

type LoginResponse struct {
	// Agent AI agent identified for this event/context. Omitted when no agent is identified
	Agent *Agent `json:"agent,omitempty"`

	// Authenticated Authenticated or Anonymous visitor
	//
	// Example: true
	Authenticated *bool `json:"authenticated,omitempty"`

	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`
	Behavior             *struct {
		// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
		Fingerprint nullable.Nullable[string] `json:"fingerprint,omitempty"`
	} `json:"behavior,omitempty"`

	// CreatedAt Event timestamp
	//
	// Example: 2021-09-27T16:46:38.313Z
	CreatedAt *time.Time `json:"created_at,omitempty"`
	Device    struct {
		// Fingerprint Example: ohvjn8adSnetYTzZ8B7bOP
		Fingerprint nullable.Nullable[string] `json:"fingerprint"`
		Hardware    *struct {
			Brand   nullable.Nullable[string] `json:"brand"`
			Display struct {
				// Height Example: 982
				Height nullable.Nullable[int] `json:"height"`

				// Width Example: 1512
				Width nullable.Nullable[int] `json:"width"`
			} `json:"display"`
			Model struct {
				Code nullable.Nullable[string] `json:"code"`
				Name nullable.Nullable[string] `json:"name"`
			} `json:"model"`
			Name nullable.Nullable[string] `json:"name"`

			// Type Example: computer
			Type string `json:"type"`
		} `json:"hardware,omitempty"`
		Os *struct {
			// Name Example: Windows 10
			Name    string `json:"name"`
			Version struct {
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 10
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"os,omitempty"`
		Screen *struct {
			// Orientation Example: landscape
			Orientation nullable.Nullable[string] `json:"orientation,omitempty"`

			// Screen Example: 2
			Screen nullable.Nullable[int] `json:"screen,omitempty"`
		} `json:"screen,omitempty"`
		Software *struct {
			// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
			Fingerprint nullable.Nullable[string] `json:"fingerprint"`

			// Languages Example: ["en-us","en"]
			Languages []string `json:"languages"`

			// Name Example: Chrome
			Name string `json:"name"`

			// Type Example: browser
			Type    string `json:"type"`
			Version struct {
				// Full Example: 91.0.4472
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 91
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"software,omitempty"`
		Timezone *struct {
			// Name Example: America/New_York
			Name nullable.Nullable[string] `json:"name,omitempty"`

			// Offset Time offset from UTC measured in minutes
			//
			// Example: -300
			Offset nullable.Nullable[int] `json:"offset,omitempty"`
		} `json:"timezone,omitempty"`

		// Token Device token generated or found
		//
		// Example: eyJhbGciOiJIUzI1NiJ9.eyJ0b2tlbiI6IjEzc2x6RzNHQ0RzeFJCejdJWF9SUDJkV1Y0RFgiLCJxdWFsaWZpZXIiOiJBUUlEQ2pFME5EZzFPREF3T1RZIiwiYW5vbnltb3VzIjpmYWxzZSwidmVyc2lvbiI6MC4zfQ.y3vOt-W1IpOi7Oyn1jll1uDw1YL-JPZtNMTU-PyaYhQ
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Token *string `json:"token,omitempty"`

		// UserAgent Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
		UserAgent *string `json:"user_agent,omitempty"`
	} `json:"device"`

	// Email User Email Object
	Email *struct {
		// Disposable Example: false
		Disposable *bool `json:"disposable,omitempty"`

		// Domain Example: gmail.com
		Domain        *string `json:"domain,omitempty"`
		DomainDetails *struct {
			// CreatedAt Example: 2021-09-27T16:46:38.313Z
			CreatedAt   *time.Time `json:"created_at,omitempty"`
			DmarcRecord *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"dmarc_record,omitempty"`

			// ExpiresAt Example: 2021-09-27T16:46:38.313Z
			ExpiresAt *time.Time `json:"expires_at,omitempty"`
			MxRecords *struct {
				// NullMx Example: false
				NullMx nullable.Nullable[bool] `json:"null_mx,omitempty"`
			} `json:"mx_records,omitempty"`

			// Nameservers Example: ["ns1.hosting.com","ns2.hosting.com","ns3.hosting.com"]
			Nameservers *[]string `json:"nameservers,omitempty"`
			Registrar   *string   `json:"registrar,omitempty"`
			SpfRecord   *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"spf_record,omitempty"`

			// UpdatedAt Example: 2021-09-27T16:46:38.313Z
			UpdatedAt *time.Time `json:"updated_at,omitempty"`
		} `json:"domain_details,omitempty"`

		// Normalized Example: user.email@example.com
		Normalized *string `json:"normalized,omitempty"`

		// Unreachable Example: false
		Unreachable *bool `json:"unreachable,omitempty"`
	} `json:"email,omitempty"`

	// Endpoint Castle Request Endpoint
	//
	// Example: /v1/risk
	Endpoint *string `json:"endpoint,omitempty"`

	// Id Castle Event ID
	//
	// Example: ASZoelALT5-PaVw2pAVMXg
	Id *string `json:"id,omitempty"`
	Ip *IP     `json:"ip,omitempty"`

	// Metrics Metrics triggered for this event/context
	//
	// Example: {"1":{},"2":{},"3":{},"4":{},"5":{}}
	Metrics *map[string]map[string]interface{} `json:"metrics,omitempty"`

	// Name Event Full Name
	//
	// Example: Login Succeeded
	Name *string `json:"name,omitempty"`

	// Params The params object
	Params *EventParams `json:"params,omitempty"`

	// Policy The matching policy
	Policy  Policy   `json:"policy"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties
	Properties *Properties `json:"properties,omitempty"`

	// Risk Deprecated Risk Score - use `scores` instead. Calculated only when `request_token` and `context` are provided.
	//
	// Example: 0.65
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Risk *float32 `json:"risk,omitempty"`

	// Scores Castle Scores breakdown. Calculated only when `request_token` and `context` are provided.
	Scores *struct {
		AccountAbuse struct {
			// Score Calculated Account Abuse Risk Score.
			//
			// Example: 0.65
			Score *float32 `json:"score,omitempty"`
		} `json:"account_abuse"`
		AccountTakeover struct {
			// Score Calculated Account Takeover Risk Score.
			//
			// Example: 0.77
			Score *float32 `json:"score,omitempty"`
		} `json:"account_takeover"`
		Bot struct {
			// Score Calculated Bot Risk Score.
			//
			// Example: 0.34
			Score *float32 `json:"score,omitempty"`
		} `json:"bot"`
	} `json:"scores,omitempty"`

	// Sdks Castle SDKs details
	Sdks *struct {
		Client *struct {
			// Name Example: castle-web
			Name *string `json:"name,omitempty"`

			// Version Example: 2.0.0
			Version *string `json:"version,omitempty"`
		} `json:"client,omitempty"`
		Server *struct {
			// Name Example: castle-postman
			Name *string `json:"name,omitempty"`

			// Version Example: 0.1.0
			Version *string `json:"version,omitempty"`
		} `json:"server,omitempty"`
	} `json:"sdks,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// Signals Signals triggered for this event/context
	//
	// Example: {"bot_behavior":{},"disposable_email":{},"multiple_accounts_per_device":{},"proxy_ip":{},"residential_proxy_access":{},"spoofed_device":{}}
	Signals *map[string]map[string]interface{} `json:"signals,omitempty"`
	Status  *LoginResponseStatus               `json:"status,omitempty"`

	// Type Castle supported events available for this endpoint
	Type LoginResponseType      `json:"type"`
	User *UserForMonitorAndRisk `json:"user,omitempty"`
}

LoginResponse defines model for LoginResponse.

type LoginResponseStatus

type LoginResponseStatus string

LoginResponseStatus defines model for LoginResponse.Status.

const (
	LoginResponseStatusAttempted LoginResponseStatus = "$attempted"
	LoginResponseStatusFailed    LoginResponseStatus = "$failed"
	LoginResponseStatusSucceeded LoginResponseStatus = "$succeeded"
)

Defines values for LoginResponseStatus.

func (LoginResponseStatus) Valid

func (e LoginResponseStatus) Valid() bool

Valid indicates whether the value is a known member of the LoginResponseStatus enum.

type LoginResponseType

type LoginResponseType string

LoginResponseType Castle supported events available for this endpoint

const (
	LoginResponseTypeLogin LoginResponseType = "$login"
)

Defines values for LoginResponseType.

func (LoginResponseType) Valid

func (e LoginResponseType) Valid() bool

Valid indicates whether the value is a known member of the LoginResponseType enum.

type LoginRiskRequest

type LoginRiskRequest struct {
	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`

	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand  *[]string `json:"expand,omitempty"`
	Product *Product  `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](/v1/getting-started)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool                  `json:"skip_request_token_validation,omitempty"`
	Status                     LoginRiskRequestStatus `json:"status"`

	// Type Castle supported events available for this endpoint
	Type LoginRiskRequestType  `json:"type"`
	User UserForMonitorAndRisk `json:"user"`
}

LoginRiskRequest defines model for LoginRiskRequest.

type LoginRiskRequestStatus

type LoginRiskRequestStatus string

LoginRiskRequestStatus defines model for LoginRiskRequest.Status.

const (
	LoginRiskRequestStatusSucceeded LoginRiskRequestStatus = "$succeeded"
)

Defines values for LoginRiskRequestStatus.

func (LoginRiskRequestStatus) Valid

func (e LoginRiskRequestStatus) Valid() bool

Valid indicates whether the value is a known member of the LoginRiskRequestStatus enum.

type LoginRiskRequestType

type LoginRiskRequestType string

LoginRiskRequestType Castle supported events available for this endpoint

const (
	LoginRiskRequestTypeLogin LoginRiskRequestType = "$login"
)

Defines values for LoginRiskRequestType.

func (LoginRiskRequestType) Valid

func (e LoginRiskRequestType) Valid() bool

Valid indicates whether the value is a known member of the LoginRiskRequestType enum.

type LogoutResponse

type LogoutResponse struct {
	// Agent AI agent identified for this event/context. Omitted when no agent is identified
	Agent *Agent `json:"agent,omitempty"`

	// Authenticated Authenticated or Anonymous visitor
	//
	// Example: true
	Authenticated *bool `json:"authenticated,omitempty"`

	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`
	Behavior             *struct {
		// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
		Fingerprint nullable.Nullable[string] `json:"fingerprint,omitempty"`
	} `json:"behavior,omitempty"`

	// CreatedAt Event timestamp
	//
	// Example: 2021-09-27T16:46:38.313Z
	CreatedAt *time.Time `json:"created_at,omitempty"`
	Device    struct {
		// Fingerprint Example: ohvjn8adSnetYTzZ8B7bOP
		Fingerprint nullable.Nullable[string] `json:"fingerprint"`
		Hardware    *struct {
			Brand   nullable.Nullable[string] `json:"brand"`
			Display struct {
				// Height Example: 982
				Height nullable.Nullable[int] `json:"height"`

				// Width Example: 1512
				Width nullable.Nullable[int] `json:"width"`
			} `json:"display"`
			Model struct {
				Code nullable.Nullable[string] `json:"code"`
				Name nullable.Nullable[string] `json:"name"`
			} `json:"model"`
			Name nullable.Nullable[string] `json:"name"`

			// Type Example: computer
			Type string `json:"type"`
		} `json:"hardware,omitempty"`
		Os *struct {
			// Name Example: Windows 10
			Name    string `json:"name"`
			Version struct {
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 10
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"os,omitempty"`
		Screen *struct {
			// Orientation Example: landscape
			Orientation nullable.Nullable[string] `json:"orientation,omitempty"`

			// Screen Example: 2
			Screen nullable.Nullable[int] `json:"screen,omitempty"`
		} `json:"screen,omitempty"`
		Software *struct {
			// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
			Fingerprint nullable.Nullable[string] `json:"fingerprint"`

			// Languages Example: ["en-us","en"]
			Languages []string `json:"languages"`

			// Name Example: Chrome
			Name string `json:"name"`

			// Type Example: browser
			Type    string `json:"type"`
			Version struct {
				// Full Example: 91.0.4472
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 91
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"software,omitempty"`
		Timezone *struct {
			// Name Example: America/New_York
			Name nullable.Nullable[string] `json:"name,omitempty"`

			// Offset Time offset from UTC measured in minutes
			//
			// Example: -300
			Offset nullable.Nullable[int] `json:"offset,omitempty"`
		} `json:"timezone,omitempty"`

		// Token Device token generated or found
		//
		// Example: eyJhbGciOiJIUzI1NiJ9.eyJ0b2tlbiI6IjEzc2x6RzNHQ0RzeFJCejdJWF9SUDJkV1Y0RFgiLCJxdWFsaWZpZXIiOiJBUUlEQ2pFME5EZzFPREF3T1RZIiwiYW5vbnltb3VzIjpmYWxzZSwidmVyc2lvbiI6MC4zfQ.y3vOt-W1IpOi7Oyn1jll1uDw1YL-JPZtNMTU-PyaYhQ
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Token *string `json:"token,omitempty"`

		// UserAgent Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
		UserAgent *string `json:"user_agent,omitempty"`
	} `json:"device"`

	// Email User Email Object
	Email *struct {
		// Disposable Example: false
		Disposable *bool `json:"disposable,omitempty"`

		// Domain Example: gmail.com
		Domain        *string `json:"domain,omitempty"`
		DomainDetails *struct {
			// CreatedAt Example: 2021-09-27T16:46:38.313Z
			CreatedAt   *time.Time `json:"created_at,omitempty"`
			DmarcRecord *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"dmarc_record,omitempty"`

			// ExpiresAt Example: 2021-09-27T16:46:38.313Z
			ExpiresAt *time.Time `json:"expires_at,omitempty"`
			MxRecords *struct {
				// NullMx Example: false
				NullMx nullable.Nullable[bool] `json:"null_mx,omitempty"`
			} `json:"mx_records,omitempty"`

			// Nameservers Example: ["ns1.hosting.com","ns2.hosting.com","ns3.hosting.com"]
			Nameservers *[]string `json:"nameservers,omitempty"`
			Registrar   *string   `json:"registrar,omitempty"`
			SpfRecord   *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"spf_record,omitempty"`

			// UpdatedAt Example: 2021-09-27T16:46:38.313Z
			UpdatedAt *time.Time `json:"updated_at,omitempty"`
		} `json:"domain_details,omitempty"`

		// Normalized Example: user.email@example.com
		Normalized *string `json:"normalized,omitempty"`

		// Unreachable Example: false
		Unreachable *bool `json:"unreachable,omitempty"`
	} `json:"email,omitempty"`

	// Endpoint Castle Request Endpoint
	//
	// Example: /v1/risk
	Endpoint *string `json:"endpoint,omitempty"`

	// Id Castle Event ID
	//
	// Example: ASZoelALT5-PaVw2pAVMXg
	Id *string `json:"id,omitempty"`
	Ip *IP     `json:"ip,omitempty"`

	// Metrics Metrics triggered for this event/context
	//
	// Example: {"1":{},"2":{},"3":{},"4":{},"5":{}}
	Metrics *map[string]map[string]interface{} `json:"metrics,omitempty"`

	// Name Event Full Name
	//
	// Example: Login Succeeded
	Name *string `json:"name,omitempty"`

	// Params The params object
	Params *EventParams `json:"params,omitempty"`

	// Policy The matching policy
	Policy  Policy   `json:"policy"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties
	Properties *Properties `json:"properties,omitempty"`

	// Risk Deprecated Risk Score - use `scores` instead. Calculated only when `request_token` and `context` are provided.
	//
	// Example: 0.65
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Risk *float32 `json:"risk,omitempty"`

	// Scores Castle Scores breakdown. Calculated only when `request_token` and `context` are provided.
	Scores *struct {
		AccountAbuse struct {
			// Score Calculated Account Abuse Risk Score.
			//
			// Example: 0.65
			Score *float32 `json:"score,omitempty"`
		} `json:"account_abuse"`
		AccountTakeover struct {
			// Score Calculated Account Takeover Risk Score.
			//
			// Example: 0.77
			Score *float32 `json:"score,omitempty"`
		} `json:"account_takeover"`
		Bot struct {
			// Score Calculated Bot Risk Score.
			//
			// Example: 0.34
			Score *float32 `json:"score,omitempty"`
		} `json:"bot"`
	} `json:"scores,omitempty"`

	// Sdks Castle SDKs details
	Sdks *struct {
		Client *struct {
			// Name Example: castle-web
			Name *string `json:"name,omitempty"`

			// Version Example: 2.0.0
			Version *string `json:"version,omitempty"`
		} `json:"client,omitempty"`
		Server *struct {
			// Name Example: castle-postman
			Name *string `json:"name,omitempty"`

			// Version Example: 0.1.0
			Version *string `json:"version,omitempty"`
		} `json:"server,omitempty"`
	} `json:"sdks,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// Signals Signals triggered for this event/context
	//
	// Example: {"bot_behavior":{},"disposable_email":{},"multiple_accounts_per_device":{},"proxy_ip":{},"residential_proxy_access":{},"spoofed_device":{}}
	Signals *map[string]map[string]interface{} `json:"signals,omitempty"`
	Status  *LogoutResponseStatus              `json:"status,omitempty"`

	// Type Castle supported events available for this endpoint
	Type LogoutResponseType     `json:"type"`
	User *UserForMonitorAndRisk `json:"user,omitempty"`
}

LogoutResponse defines model for LogoutResponse.

type LogoutResponseStatus

type LogoutResponseStatus string

LogoutResponseStatus defines model for LogoutResponse.Status.

const (
	LogoutResponseStatusAttempted LogoutResponseStatus = "$attempted"
	LogoutResponseStatusFailed    LogoutResponseStatus = "$failed"
	LogoutResponseStatusSucceeded LogoutResponseStatus = "$succeeded"
)

Defines values for LogoutResponseStatus.

func (LogoutResponseStatus) Valid

func (e LogoutResponseStatus) Valid() bool

Valid indicates whether the value is a known member of the LogoutResponseStatus enum.

type LogoutResponseType

type LogoutResponseType string

LogoutResponseType Castle supported events available for this endpoint

const (
	LogoutResponseTypeLogout LogoutResponseType = "$logout"
)

Defines values for LogoutResponseType.

func (LogoutResponseType) Valid

func (e LogoutResponseType) Valid() bool

Valid indicates whether the value is a known member of the LogoutResponseType enum.

type LogoutRiskRequest

type LogoutRiskRequest struct {
	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand  *[]string `json:"expand,omitempty"`
	Product *Product  `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](/v1/getting-started)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool                   `json:"skip_request_token_validation,omitempty"`
	Status                     LogoutRiskRequestStatus `json:"status"`

	// Type Castle supported events available for this endpoint
	Type LogoutRiskRequestType `json:"type"`
	User UserForMonitorAndRisk `json:"user"`
}

LogoutRiskRequest defines model for LogoutRiskRequest.

type LogoutRiskRequestStatus

type LogoutRiskRequestStatus string

LogoutRiskRequestStatus defines model for LogoutRiskRequest.Status.

const (
	LogoutRiskRequestStatusSucceeded LogoutRiskRequestStatus = "$succeeded"
)

Defines values for LogoutRiskRequestStatus.

func (LogoutRiskRequestStatus) Valid

func (e LogoutRiskRequestStatus) Valid() bool

Valid indicates whether the value is a known member of the LogoutRiskRequestStatus enum.

type LogoutRiskRequestType

type LogoutRiskRequestType string

LogoutRiskRequestType Castle supported events available for this endpoint

const (
	LogoutRiskRequestTypeLogout LogoutRiskRequestType = "$logout"
)

Defines values for LogoutRiskRequestType.

func (LogoutRiskRequestType) Valid

func (e LogoutRiskRequestType) Valid() bool

Valid indicates whether the value is a known member of the LogoutRiskRequestType enum.

type Merchant

type Merchant struct {
	Address  *Address `json:"address,omitempty"`
	Category *struct {
		// Code Merchant Category Code (MCC) in ISO 18245 four-digit format
		//
		// Example: 3000
		Code *string `json:"code,omitempty"`

		// Description Merchant Category Description
		//
		// Example: Airlines
		Description *string `json:"description,omitempty"`
	} `json:"category,omitempty"`

	// Id Merchant Identifier
	//
	// Example: a2c8e7ef-40da-42f2-9b7d-cd928e5f8279
	Id *string `json:"id,omitempty"`

	// Name Merchant Name
	//
	// Example: United Airlines
	Name *string `json:"name,omitempty"`
}

Merchant defines model for Merchant.

type Metadata

type Metadata struct {
	Whodunnit            *string                                  `json:"whodunnit,omitempty"`
	WhodunnitType        *AuthorType                              `json:"whodunnit_type,omitempty"`
	AdditionalProperties map[string]Metadata_AdditionalProperties `json:"-"`
}

Metadata Metadata is useful for providing additional, structured information on an object.

func (Metadata) Get

func (a Metadata) Get(fieldName string) (value Metadata_AdditionalProperties, found bool)

Getter for additional properties for Metadata. Returns the specified element and whether it was found

func (Metadata) MarshalJSON

func (a Metadata) MarshalJSON() ([]byte, error)

Override default JSON handling for Metadata to handle AdditionalProperties

func (*Metadata) Set

func (a *Metadata) Set(fieldName string, value Metadata_AdditionalProperties)

Setter for additional properties for Metadata

func (*Metadata) UnmarshalJSON

func (a *Metadata) UnmarshalJSON(b []byte) error

Override default JSON handling for Metadata to handle AdditionalProperties

type Metadata0

type Metadata0 = string

Metadata0 defines model for Metadata.0.

type Metadata1

type Metadata1 = float32

Metadata1 defines model for Metadata.1.

type Metadata2

type Metadata2 = bool

Metadata2 defines model for Metadata.2.

type Metadata_AdditionalProperties

type Metadata_AdditionalProperties struct {
	// contains filtered or unexported fields
}

Metadata_AdditionalProperties defines model for Metadata.AdditionalProperties.

func (Metadata_AdditionalProperties) AsMetadata0

func (t Metadata_AdditionalProperties) AsMetadata0() (Metadata0, error)

AsMetadata0 returns the union data inside the Metadata_AdditionalProperties as a Metadata0

func (Metadata_AdditionalProperties) AsMetadata1

func (t Metadata_AdditionalProperties) AsMetadata1() (Metadata1, error)

AsMetadata1 returns the union data inside the Metadata_AdditionalProperties as a Metadata1

func (Metadata_AdditionalProperties) AsMetadata2

func (t Metadata_AdditionalProperties) AsMetadata2() (Metadata2, error)

AsMetadata2 returns the union data inside the Metadata_AdditionalProperties as a Metadata2

func (*Metadata_AdditionalProperties) FromMetadata0

func (t *Metadata_AdditionalProperties) FromMetadata0(v Metadata0) error

FromMetadata0 overwrites any union data inside the Metadata_AdditionalProperties as the provided Metadata0

func (*Metadata_AdditionalProperties) FromMetadata1

func (t *Metadata_AdditionalProperties) FromMetadata1(v Metadata1) error

FromMetadata1 overwrites any union data inside the Metadata_AdditionalProperties as the provided Metadata1

func (*Metadata_AdditionalProperties) FromMetadata2

func (t *Metadata_AdditionalProperties) FromMetadata2(v Metadata2) error

FromMetadata2 overwrites any union data inside the Metadata_AdditionalProperties as the provided Metadata2

func (Metadata_AdditionalProperties) MarshalJSON

func (t Metadata_AdditionalProperties) MarshalJSON() ([]byte, error)

func (*Metadata_AdditionalProperties) MergeMetadata0

func (t *Metadata_AdditionalProperties) MergeMetadata0(v Metadata0) error

MergeMetadata0 performs a merge with any union data inside the Metadata_AdditionalProperties, using the provided Metadata0

func (*Metadata_AdditionalProperties) MergeMetadata1

func (t *Metadata_AdditionalProperties) MergeMetadata1(v Metadata1) error

MergeMetadata1 performs a merge with any union data inside the Metadata_AdditionalProperties, using the provided Metadata1

func (*Metadata_AdditionalProperties) MergeMetadata2

func (t *Metadata_AdditionalProperties) MergeMetadata2(v Metadata2) error

MergeMetadata2 performs a merge with any union data inside the Metadata_AdditionalProperties, using the provided Metadata2

func (*Metadata_AdditionalProperties) UnmarshalJSON

func (t *Metadata_AdditionalProperties) UnmarshalJSON(b []byte) error

type Op

type Op string

Op Example: $eq

const (
	OpArrayMatchAll  Op = "$array_match_all"
	OpArrayMatchAny  Op = "$array_match_any"
	OpContains       Op = "$contains"
	OpEndsWith       Op = "$ends_with"
	OpEq             Op = "$eq"
	OpExists         Op = "$exists"
	OpGeo            Op = "$geo"
	OpIn             Op = "$in"
	OpIpRange        Op = "$ip_range"
	OpLike           Op = "$like"
	OpNarrayMatchAll Op = "$narray_match_all"
	OpNarrayMatchAny Op = "$narray_match_any"
	OpNcontains      Op = "$ncontains"
	OpNendsWith      Op = "$nends_with"
	OpNeq            Op = "$neq"
	OpNexists        Op = "$nexists"
	OpNin            Op = "$nin"
	OpNipRange       Op = "$nip_range"
	OpNlike          Op = "$nlike"
	OpNstartsWith    Op = "$nstarts_with"
	OpRange          Op = "$range"
	OpStartsWith     Op = "$starts_with"
)

Defines values for Op.

func (Op) Valid

func (e Op) Valid() bool

Valid indicates whether the value is a known member of the Op enum.

type OrHavingQueryFilter

type OrHavingQueryFilter struct {
	// Op Example: $or
	Op    OrHavingQueryFilterOp            `json:"op"`
	Value []OrHavingQueryFilter_Value_Item `json:"value"`
}

OrHavingQueryFilter defines model for OrHavingQueryFilter.

type OrHavingQueryFilterOp

type OrHavingQueryFilterOp string

OrHavingQueryFilterOp Example: $or

const (
	OrHavingQueryFilterOpOr OrHavingQueryFilterOp = "$or"
)

Defines values for OrHavingQueryFilterOp.

func (OrHavingQueryFilterOp) Valid

func (e OrHavingQueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the OrHavingQueryFilterOp enum.

type OrHavingQueryFilter_Value_Item

type OrHavingQueryFilter_Value_Item struct {
	// contains filtered or unexported fields
}

OrHavingQueryFilter_Value_Item defines model for OrHavingQueryFilter.value.Item.

func (OrHavingQueryFilter_Value_Item) AsExistsHavingQueryFilter

func (t OrHavingQueryFilter_Value_Item) AsExistsHavingQueryFilter() (ExistsHavingQueryFilter, error)

AsExistsHavingQueryFilter returns the union data inside the OrHavingQueryFilter_Value_Item as a ExistsHavingQueryFilter

func (OrHavingQueryFilter_Value_Item) AsHavingQueryFilter

func (t OrHavingQueryFilter_Value_Item) AsHavingQueryFilter() (HavingQueryFilter, error)

AsHavingQueryFilter returns the union data inside the OrHavingQueryFilter_Value_Item as a HavingQueryFilter

func (OrHavingQueryFilter_Value_Item) AsRangeHavingQueryFilter

func (t OrHavingQueryFilter_Value_Item) AsRangeHavingQueryFilter() (RangeHavingQueryFilter, error)

AsRangeHavingQueryFilter returns the union data inside the OrHavingQueryFilter_Value_Item as a RangeHavingQueryFilter

func (*OrHavingQueryFilter_Value_Item) FromExistsHavingQueryFilter

func (t *OrHavingQueryFilter_Value_Item) FromExistsHavingQueryFilter(v ExistsHavingQueryFilter) error

FromExistsHavingQueryFilter overwrites any union data inside the OrHavingQueryFilter_Value_Item as the provided ExistsHavingQueryFilter

func (*OrHavingQueryFilter_Value_Item) FromHavingQueryFilter

func (t *OrHavingQueryFilter_Value_Item) FromHavingQueryFilter(v HavingQueryFilter) error

FromHavingQueryFilter overwrites any union data inside the OrHavingQueryFilter_Value_Item as the provided HavingQueryFilter

func (*OrHavingQueryFilter_Value_Item) FromRangeHavingQueryFilter

func (t *OrHavingQueryFilter_Value_Item) FromRangeHavingQueryFilter(v RangeHavingQueryFilter) error

FromRangeHavingQueryFilter overwrites any union data inside the OrHavingQueryFilter_Value_Item as the provided RangeHavingQueryFilter

func (OrHavingQueryFilter_Value_Item) MarshalJSON

func (t OrHavingQueryFilter_Value_Item) MarshalJSON() ([]byte, error)

func (*OrHavingQueryFilter_Value_Item) MergeExistsHavingQueryFilter

func (t *OrHavingQueryFilter_Value_Item) MergeExistsHavingQueryFilter(v ExistsHavingQueryFilter) error

MergeExistsHavingQueryFilter performs a merge with any union data inside the OrHavingQueryFilter_Value_Item, using the provided ExistsHavingQueryFilter

func (*OrHavingQueryFilter_Value_Item) MergeHavingQueryFilter

func (t *OrHavingQueryFilter_Value_Item) MergeHavingQueryFilter(v HavingQueryFilter) error

MergeHavingQueryFilter performs a merge with any union data inside the OrHavingQueryFilter_Value_Item, using the provided HavingQueryFilter

func (*OrHavingQueryFilter_Value_Item) MergeRangeHavingQueryFilter

func (t *OrHavingQueryFilter_Value_Item) MergeRangeHavingQueryFilter(v RangeHavingQueryFilter) error

MergeRangeHavingQueryFilter performs a merge with any union data inside the OrHavingQueryFilter_Value_Item, using the provided RangeHavingQueryFilter

func (*OrHavingQueryFilter_Value_Item) UnmarshalJSON

func (t *OrHavingQueryFilter_Value_Item) UnmarshalJSON(b []byte) error

type OrQueryFilter

type OrQueryFilter struct {
	// Op Example: $or
	Op    OrQueryFilterOp            `json:"op"`
	Value []OrQueryFilter_Value_Item `json:"value"`
}

OrQueryFilter defines model for OrQueryFilter.

type OrQueryFilterOp

type OrQueryFilterOp string

OrQueryFilterOp Example: $or

const (
	OrQueryFilterOpOr OrQueryFilterOp = "$or"
)

Defines values for OrQueryFilterOp.

func (OrQueryFilterOp) Valid

func (e OrQueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the OrQueryFilterOp enum.

type OrQueryFilter_Value_Item

type OrQueryFilter_Value_Item struct {
	// contains filtered or unexported fields
}

OrQueryFilter_Value_Item defines model for OrQueryFilter.value.Item.

func (OrQueryFilter_Value_Item) AsArrayMatchQueryFilter

func (t OrQueryFilter_Value_Item) AsArrayMatchQueryFilter() (ArrayMatchQueryFilter, error)

AsArrayMatchQueryFilter returns the union data inside the OrQueryFilter_Value_Item as a ArrayMatchQueryFilter

func (OrQueryFilter_Value_Item) AsExistsQueryFilter

func (t OrQueryFilter_Value_Item) AsExistsQueryFilter() (ExistsQueryFilter, error)

AsExistsQueryFilter returns the union data inside the OrQueryFilter_Value_Item as a ExistsQueryFilter

func (OrQueryFilter_Value_Item) AsQueryFilter

func (t OrQueryFilter_Value_Item) AsQueryFilter() (QueryFilter, error)

AsQueryFilter returns the union data inside the OrQueryFilter_Value_Item as a QueryFilter

func (OrQueryFilter_Value_Item) AsRangeQueryFilter

func (t OrQueryFilter_Value_Item) AsRangeQueryFilter() (RangeQueryFilter, error)

AsRangeQueryFilter returns the union data inside the OrQueryFilter_Value_Item as a RangeQueryFilter

func (OrQueryFilter_Value_Item) AsRelativeRangeQueryFilter

func (t OrQueryFilter_Value_Item) AsRelativeRangeQueryFilter() (RelativeRangeQueryFilter, error)

AsRelativeRangeQueryFilter returns the union data inside the OrQueryFilter_Value_Item as a RelativeRangeQueryFilter

func (*OrQueryFilter_Value_Item) FromArrayMatchQueryFilter

func (t *OrQueryFilter_Value_Item) FromArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

FromArrayMatchQueryFilter overwrites any union data inside the OrQueryFilter_Value_Item as the provided ArrayMatchQueryFilter

func (*OrQueryFilter_Value_Item) FromExistsQueryFilter

func (t *OrQueryFilter_Value_Item) FromExistsQueryFilter(v ExistsQueryFilter) error

FromExistsQueryFilter overwrites any union data inside the OrQueryFilter_Value_Item as the provided ExistsQueryFilter

func (*OrQueryFilter_Value_Item) FromQueryFilter

func (t *OrQueryFilter_Value_Item) FromQueryFilter(v QueryFilter) error

FromQueryFilter overwrites any union data inside the OrQueryFilter_Value_Item as the provided QueryFilter

func (*OrQueryFilter_Value_Item) FromRangeQueryFilter

func (t *OrQueryFilter_Value_Item) FromRangeQueryFilter(v RangeQueryFilter) error

FromRangeQueryFilter overwrites any union data inside the OrQueryFilter_Value_Item as the provided RangeQueryFilter

func (*OrQueryFilter_Value_Item) FromRelativeRangeQueryFilter

func (t *OrQueryFilter_Value_Item) FromRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

FromRelativeRangeQueryFilter overwrites any union data inside the OrQueryFilter_Value_Item as the provided RelativeRangeQueryFilter

func (OrQueryFilter_Value_Item) MarshalJSON

func (t OrQueryFilter_Value_Item) MarshalJSON() ([]byte, error)

func (*OrQueryFilter_Value_Item) MergeArrayMatchQueryFilter

func (t *OrQueryFilter_Value_Item) MergeArrayMatchQueryFilter(v ArrayMatchQueryFilter) error

MergeArrayMatchQueryFilter performs a merge with any union data inside the OrQueryFilter_Value_Item, using the provided ArrayMatchQueryFilter

func (*OrQueryFilter_Value_Item) MergeExistsQueryFilter

func (t *OrQueryFilter_Value_Item) MergeExistsQueryFilter(v ExistsQueryFilter) error

MergeExistsQueryFilter performs a merge with any union data inside the OrQueryFilter_Value_Item, using the provided ExistsQueryFilter

func (*OrQueryFilter_Value_Item) MergeQueryFilter

func (t *OrQueryFilter_Value_Item) MergeQueryFilter(v QueryFilter) error

MergeQueryFilter performs a merge with any union data inside the OrQueryFilter_Value_Item, using the provided QueryFilter

func (*OrQueryFilter_Value_Item) MergeRangeQueryFilter

func (t *OrQueryFilter_Value_Item) MergeRangeQueryFilter(v RangeQueryFilter) error

MergeRangeQueryFilter performs a merge with any union data inside the OrQueryFilter_Value_Item, using the provided RangeQueryFilter

func (*OrQueryFilter_Value_Item) MergeRelativeRangeQueryFilter

func (t *OrQueryFilter_Value_Item) MergeRelativeRangeQueryFilter(v RelativeRangeQueryFilter) error

MergeRelativeRangeQueryFilter performs a merge with any union data inside the OrQueryFilter_Value_Item, using the provided RelativeRangeQueryFilter

func (*OrQueryFilter_Value_Item) UnmarshalJSON

func (t *OrQueryFilter_Value_Item) UnmarshalJSON(b []byte) error

type PasswordResetFilterRequest

type PasswordResetFilterRequest struct {
	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand *[]string `json:"expand,omitempty"`

	// MatchingUserId User id related connected with the request
	//
	// Example: 123
	MatchingUserId *string `json:"matching_user_id,omitempty"`
	Params         *struct {
		// Email The email address sent by the user
		//
		// Example: Rhea.Franecki@example.org
		Email *string `json:"email,omitempty"`

		// Phone The phone number sent by the user
		//
		// Example: +16175551212
		Phone *string `json:"phone,omitempty"`

		// Username The username sent by the user
		//
		// Example: superhero123
		Username *string `json:"username,omitempty"`
	} `json:"params,omitempty"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](https://docs.castle.io/docs/quickstart)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool                             `json:"skip_request_token_validation,omitempty"`
	Status                     *PasswordResetFilterRequestStatus `json:"status,omitempty"`

	// Type Castle supported events available for this endpoint
	Type PasswordResetFilterRequestType `json:"type"`
	User *struct {
		// Email The identified user's email address
		//
		// Example: Rhea.Franecki@example.org
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Email *string `json:"email,omitempty"`

		// Phone The identified user's phone number
		//
		// Example: +16175551212
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Phone *string `json:"phone,omitempty"`
	} `json:"user,omitempty"`
}

PasswordResetFilterRequest defines model for PasswordResetFilterRequest.

type PasswordResetFilterRequestStatus

type PasswordResetFilterRequestStatus string

PasswordResetFilterRequestStatus defines model for PasswordResetFilterRequest.Status.

const (
	PasswordResetFilterRequestStatusAttempted PasswordResetFilterRequestStatus = "$attempted"
	PasswordResetFilterRequestStatusFailed    PasswordResetFilterRequestStatus = "$failed"
	PasswordResetFilterRequestStatusSucceeded PasswordResetFilterRequestStatus = "$succeeded"
)

Defines values for PasswordResetFilterRequestStatus.

func (PasswordResetFilterRequestStatus) Valid

Valid indicates whether the value is a known member of the PasswordResetFilterRequestStatus enum.

type PasswordResetFilterRequestType

type PasswordResetFilterRequestType string

PasswordResetFilterRequestType Castle supported events available for this endpoint

const (
	PasswordResetFilterRequestTypePasswordResetRequest PasswordResetFilterRequestType = "$password_reset_request"
)

Defines values for PasswordResetFilterRequestType.

func (PasswordResetFilterRequestType) Valid

Valid indicates whether the value is a known member of the PasswordResetFilterRequestType enum.

type PaymentMethod

type PaymentMethod struct {
	BankName       *string  `json:"bank_name,omitempty"`
	BillingAddress *Address `json:"billing_address,omitempty"`
	Card           *struct {
		Bin      *string                   `json:"bin,omitempty"`
		ExpMonth *int                      `json:"exp_month,omitempty"`
		ExpYear  *int                      `json:"exp_year,omitempty"`
		Funding  *PaymentMethodCardFunding `json:"funding,omitempty"`
		Last4    *string                   `json:"last4,omitempty"`
		Network  *PaymentMethodCardNetwork `json:"network,omitempty"`
	} `json:"card,omitempty"`
	CountryCode *string           `json:"country_code,omitempty"`
	Fingerprint *string           `json:"fingerprint,omitempty"`
	HolderName  *string           `json:"holder_name,omitempty"`
	Type        PaymentMethodType `json:"type"`
}

PaymentMethod defines model for PaymentMethod.

type PaymentMethodCardFunding

type PaymentMethodCardFunding string

PaymentMethodCardFunding defines model for PaymentMethod.Card.Funding.

const (
	PaymentMethodCardFundingCredit  PaymentMethodCardFunding = "$credit"
	PaymentMethodCardFundingDebit   PaymentMethodCardFunding = "$debit"
	PaymentMethodCardFundingOther   PaymentMethodCardFunding = "$other"
	PaymentMethodCardFundingPrepaid PaymentMethodCardFunding = "$prepaid"
)

Defines values for PaymentMethodCardFunding.

func (PaymentMethodCardFunding) Valid

func (e PaymentMethodCardFunding) Valid() bool

Valid indicates whether the value is a known member of the PaymentMethodCardFunding enum.

type PaymentMethodCardNetwork

type PaymentMethodCardNetwork string

PaymentMethodCardNetwork defines model for PaymentMethod.Card.Network.

const (
	PaymentMethodCardNetworkAmex            PaymentMethodCardNetwork = "$amex"
	PaymentMethodCardNetworkCartesBancaires PaymentMethodCardNetwork = "$cartes_bancaires"
	PaymentMethodCardNetworkDiners          PaymentMethodCardNetwork = "$diners"
	PaymentMethodCardNetworkDiscover        PaymentMethodCardNetwork = "$discover"
	PaymentMethodCardNetworkInterac         PaymentMethodCardNetwork = "$interac"
	PaymentMethodCardNetworkJcb             PaymentMethodCardNetwork = "$jcb"
	PaymentMethodCardNetworkMastercard      PaymentMethodCardNetwork = "$mastercard"
	PaymentMethodCardNetworkOther           PaymentMethodCardNetwork = "$other"
	PaymentMethodCardNetworkUnionpay        PaymentMethodCardNetwork = "$unionpay"
	PaymentMethodCardNetworkVisa            PaymentMethodCardNetwork = "$visa"
)

Defines values for PaymentMethodCardNetwork.

func (PaymentMethodCardNetwork) Valid

func (e PaymentMethodCardNetwork) Valid() bool

Valid indicates whether the value is a known member of the PaymentMethodCardNetwork enum.

type PaymentMethodType

type PaymentMethodType string

PaymentMethodType defines model for PaymentMethod.Type.

const (
	PaymentMethodTypeAba          PaymentMethodType = "$aba"
	PaymentMethodTypeAch          PaymentMethodType = "$ach"
	PaymentMethodTypeAmazonPay    PaymentMethodType = "$amazon_pay"
	PaymentMethodTypeAndroidPay   PaymentMethodType = "$android_pay"
	PaymentMethodTypeApplePay     PaymentMethodType = "$apple_pay"
	PaymentMethodTypeBlinc        PaymentMethodType = "$blinc"
	PaymentMethodTypeBoleto       PaymentMethodType = "$boleto"
	PaymentMethodTypeCard         PaymentMethodType = "$card"
	PaymentMethodTypeCryptoWallet PaymentMethodType = "$crypto_wallet"
	PaymentMethodTypeFps          PaymentMethodType = "$fps"
	PaymentMethodTypeGooglePay    PaymentMethodType = "$google_pay"
	PaymentMethodTypeOther        PaymentMethodType = "$other"
	PaymentMethodTypePaypal       PaymentMethodType = "$paypal"
	PaymentMethodTypeSamsungPay   PaymentMethodType = "$samsung_pay"
	PaymentMethodTypeSen          PaymentMethodType = "$sen"
	PaymentMethodTypeSepa         PaymentMethodType = "$sepa"
	PaymentMethodTypeSignet       PaymentMethodType = "$signet"
	PaymentMethodTypeWire         PaymentMethodType = "$wire"
)

Defines values for PaymentMethodType.

func (PaymentMethodType) Valid

func (e PaymentMethodType) Valid() bool

Valid indicates whether the value is a known member of the PaymentMethodType enum.

type Policy

type Policy struct {
	// Action Example: challenge
	Action nullable.Nullable[PolicyAction] `json:"action"`

	// Id Example: 2ee938c8-24c2-4c26-9d25-19511dd75029
	Id nullable.Nullable[string] `json:"id"`

	// Name Name of the matching policy
	//
	// Example: Challenge risk >= 60
	Name nullable.Nullable[string] `json:"name"`

	// Response The response to send when the policy action is deny
	Response nullable.Nullable[struct {
		// Body The body to send in the response
		//
		// Example: Access denied
		Body string `json:"body"`

		// Headers Additional headers to send in the response
		Headers []struct {
			// Name The name of the header
			//
			// Example: X-Custom-Header
			Name *string `json:"name,omitempty"`

			// Value The value of the header
			//
			// Example: 1234567890
			Value *string `json:"value,omitempty"`
		} `json:"headers"`

		// StatusCode The status code to send in the response
		//
		// Example: 403
		StatusCode float32 `json:"status_code"`
	}] `json:"response,omitempty"`

	// RevisionId Example: 900b183a-9f6d-4579-8c47-9ddcccf637b4
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	RevisionId nullable.Nullable[string] `json:"revision_id"`
}

Policy The matching policy

type PolicyAction

type PolicyAction string

PolicyAction Example: challenge

const (
	PolicyActionAllow     PolicyAction = "allow"
	PolicyActionChallenge PolicyAction = "challenge"
	PolicyActionDeny      PolicyAction = "deny"
)

Defines values for PolicyAction.

func (PolicyAction) Valid

func (e PolicyAction) Valid() bool

Valid indicates whether the value is a known member of the PolicyAction enum.

type PrivacyRequest

type PrivacyRequest struct {
	// Identifier ID or e-mail address of a user.
	//
	// Example: Rhea.Franecki@example.org
	Identifier string `json:"identifier"`

	// IdentifierType Type of a provided identifier.
	//
	// Example: $email
	IdentifierType PrivacyRequestIdentifierType `json:"identifier_type"`
}

PrivacyRequest defines model for PrivacyRequest.

type PrivacyRequestIdentifierType

type PrivacyRequestIdentifierType string

PrivacyRequestIdentifierType Type of a provided identifier.

Example: $email

const (
	PrivacyRequestIdentifierTypeEmail PrivacyRequestIdentifierType = "$email"
	PrivacyRequestIdentifierTypeId    PrivacyRequestIdentifierType = "$id"
)

Defines values for PrivacyRequestIdentifierType.

func (PrivacyRequestIdentifierType) Valid

Valid indicates whether the value is a known member of the PrivacyRequestIdentifierType enum.

type Product

type Product struct {
	// Id If you have multiple products that your users can log into using the same credentials, populate this field so that you can segment the data in the dashboard by product.
	Id string `json:"id"`
}

Product defines model for Product.

type ProfileResetResponse

type ProfileResetResponse struct {
	// Agent AI agent identified for this event/context. Omitted when no agent is identified
	Agent *Agent `json:"agent,omitempty"`

	// Authenticated Authenticated or Anonymous visitor
	//
	// Example: true
	Authenticated *bool `json:"authenticated,omitempty"`

	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`
	Behavior             *struct {
		// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
		Fingerprint nullable.Nullable[string] `json:"fingerprint,omitempty"`
	} `json:"behavior,omitempty"`

	// Changeset An object containing information about attributes that changed due to the event. You can send either anonymous attributes (eg. to track password changes) or full attributes (eg. email changes). To simplify your implementation, Castle *automatically* tracks changes to name, email, and phone, however, if you have the `from` and `to` values at hand, you can also send the changeset yourself, which also allows you to specify changes a user’s password as well as any other custom attributes. Changes to custom attributes won’t be searchable in the dashboard, but they will appear in the event stream.
	//
	// Example: [{"authentication_method.type":{"from":"$authenticator","to":"$email"},"email":{"from":"before@exmaple.com","to":"after@example.com"},"name":{"from":null,"to":"John Snow"},"password":{"changed":true}}]
	Changeset *Changeset `json:"changeset,omitempty"`

	// CreatedAt Event timestamp
	//
	// Example: 2021-09-27T16:46:38.313Z
	CreatedAt *time.Time `json:"created_at,omitempty"`
	Device    struct {
		// Fingerprint Example: ohvjn8adSnetYTzZ8B7bOP
		Fingerprint nullable.Nullable[string] `json:"fingerprint"`
		Hardware    *struct {
			Brand   nullable.Nullable[string] `json:"brand"`
			Display struct {
				// Height Example: 982
				Height nullable.Nullable[int] `json:"height"`

				// Width Example: 1512
				Width nullable.Nullable[int] `json:"width"`
			} `json:"display"`
			Model struct {
				Code nullable.Nullable[string] `json:"code"`
				Name nullable.Nullable[string] `json:"name"`
			} `json:"model"`
			Name nullable.Nullable[string] `json:"name"`

			// Type Example: computer
			Type string `json:"type"`
		} `json:"hardware,omitempty"`
		Os *struct {
			// Name Example: Windows 10
			Name    string `json:"name"`
			Version struct {
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 10
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"os,omitempty"`
		Screen *struct {
			// Orientation Example: landscape
			Orientation nullable.Nullable[string] `json:"orientation,omitempty"`

			// Screen Example: 2
			Screen nullable.Nullable[int] `json:"screen,omitempty"`
		} `json:"screen,omitempty"`
		Software *struct {
			// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
			Fingerprint nullable.Nullable[string] `json:"fingerprint"`

			// Languages Example: ["en-us","en"]
			Languages []string `json:"languages"`

			// Name Example: Chrome
			Name string `json:"name"`

			// Type Example: browser
			Type    string `json:"type"`
			Version struct {
				// Full Example: 91.0.4472
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 91
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"software,omitempty"`
		Timezone *struct {
			// Name Example: America/New_York
			Name nullable.Nullable[string] `json:"name,omitempty"`

			// Offset Time offset from UTC measured in minutes
			//
			// Example: -300
			Offset nullable.Nullable[int] `json:"offset,omitempty"`
		} `json:"timezone,omitempty"`

		// Token Device token generated or found
		//
		// Example: eyJhbGciOiJIUzI1NiJ9.eyJ0b2tlbiI6IjEzc2x6RzNHQ0RzeFJCejdJWF9SUDJkV1Y0RFgiLCJxdWFsaWZpZXIiOiJBUUlEQ2pFME5EZzFPREF3T1RZIiwiYW5vbnltb3VzIjpmYWxzZSwidmVyc2lvbiI6MC4zfQ.y3vOt-W1IpOi7Oyn1jll1uDw1YL-JPZtNMTU-PyaYhQ
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Token *string `json:"token,omitempty"`

		// UserAgent Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
		UserAgent *string `json:"user_agent,omitempty"`
	} `json:"device"`

	// Email User Email Object
	Email *struct {
		// Disposable Example: false
		Disposable *bool `json:"disposable,omitempty"`

		// Domain Example: gmail.com
		Domain        *string `json:"domain,omitempty"`
		DomainDetails *struct {
			// CreatedAt Example: 2021-09-27T16:46:38.313Z
			CreatedAt   *time.Time `json:"created_at,omitempty"`
			DmarcRecord *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"dmarc_record,omitempty"`

			// ExpiresAt Example: 2021-09-27T16:46:38.313Z
			ExpiresAt *time.Time `json:"expires_at,omitempty"`
			MxRecords *struct {
				// NullMx Example: false
				NullMx nullable.Nullable[bool] `json:"null_mx,omitempty"`
			} `json:"mx_records,omitempty"`

			// Nameservers Example: ["ns1.hosting.com","ns2.hosting.com","ns3.hosting.com"]
			Nameservers *[]string `json:"nameservers,omitempty"`
			Registrar   *string   `json:"registrar,omitempty"`
			SpfRecord   *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"spf_record,omitempty"`

			// UpdatedAt Example: 2021-09-27T16:46:38.313Z
			UpdatedAt *time.Time `json:"updated_at,omitempty"`
		} `json:"domain_details,omitempty"`

		// Normalized Example: user.email@example.com
		Normalized *string `json:"normalized,omitempty"`

		// Unreachable Example: false
		Unreachable *bool `json:"unreachable,omitempty"`
	} `json:"email,omitempty"`

	// Endpoint Castle Request Endpoint
	//
	// Example: /v1/risk
	Endpoint *string `json:"endpoint,omitempty"`

	// Id Castle Event ID
	//
	// Example: ASZoelALT5-PaVw2pAVMXg
	Id *string `json:"id,omitempty"`
	Ip *IP     `json:"ip,omitempty"`

	// Metrics Metrics triggered for this event/context
	//
	// Example: {"1":{},"2":{},"3":{},"4":{},"5":{}}
	Metrics *map[string]map[string]interface{} `json:"metrics,omitempty"`

	// Name Event Full Name
	//
	// Example: Login Succeeded
	Name *string `json:"name,omitempty"`

	// Params The params object
	Params *EventParams `json:"params,omitempty"`

	// Policy The matching policy
	Policy  Policy   `json:"policy"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties
	Properties *Properties `json:"properties,omitempty"`

	// Risk Deprecated Risk Score - use `scores` instead. Calculated only when `request_token` and `context` are provided.
	//
	// Example: 0.65
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Risk *float32 `json:"risk,omitempty"`

	// Scores Castle Scores breakdown. Calculated only when `request_token` and `context` are provided.
	Scores *struct {
		AccountAbuse struct {
			// Score Calculated Account Abuse Risk Score.
			//
			// Example: 0.65
			Score *float32 `json:"score,omitempty"`
		} `json:"account_abuse"`
		AccountTakeover struct {
			// Score Calculated Account Takeover Risk Score.
			//
			// Example: 0.77
			Score *float32 `json:"score,omitempty"`
		} `json:"account_takeover"`
		Bot struct {
			// Score Calculated Bot Risk Score.
			//
			// Example: 0.34
			Score *float32 `json:"score,omitempty"`
		} `json:"bot"`
	} `json:"scores,omitempty"`

	// Sdks Castle SDKs details
	Sdks *struct {
		Client *struct {
			// Name Example: castle-web
			Name *string `json:"name,omitempty"`

			// Version Example: 2.0.0
			Version *string `json:"version,omitempty"`
		} `json:"client,omitempty"`
		Server *struct {
			// Name Example: castle-postman
			Name *string `json:"name,omitempty"`

			// Version Example: 0.1.0
			Version *string `json:"version,omitempty"`
		} `json:"server,omitempty"`
	} `json:"sdks,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// Signals Signals triggered for this event/context
	//
	// Example: {"bot_behavior":{},"disposable_email":{},"multiple_accounts_per_device":{},"proxy_ip":{},"residential_proxy_access":{},"spoofed_device":{}}
	Signals *map[string]map[string]interface{} `json:"signals,omitempty"`
	Status  *ProfileResetResponseStatus        `json:"status,omitempty"`

	// Type Castle supported events available for this endpoint
	Type ProfileResetResponseType `json:"type"`
	User *UserForMonitorAndRisk   `json:"user,omitempty"`
}

ProfileResetResponse defines model for ProfileResetResponse.

type ProfileResetResponseStatus

type ProfileResetResponseStatus string

ProfileResetResponseStatus defines model for ProfileResetResponse.Status.

const (
	ProfileResetResponseStatusAttempted ProfileResetResponseStatus = "$attempted"
	ProfileResetResponseStatusFailed    ProfileResetResponseStatus = "$failed"
	ProfileResetResponseStatusSucceeded ProfileResetResponseStatus = "$succeeded"
)

Defines values for ProfileResetResponseStatus.

func (ProfileResetResponseStatus) Valid

func (e ProfileResetResponseStatus) Valid() bool

Valid indicates whether the value is a known member of the ProfileResetResponseStatus enum.

type ProfileResetResponseType

type ProfileResetResponseType string

ProfileResetResponseType Castle supported events available for this endpoint

const (
	ProfileResetResponseTypeProfileReset ProfileResetResponseType = "$profile_reset"
)

Defines values for ProfileResetResponseType.

func (ProfileResetResponseType) Valid

func (e ProfileResetResponseType) Valid() bool

Valid indicates whether the value is a known member of the ProfileResetResponseType enum.

type ProfileResetRiskRequest

type ProfileResetRiskRequest struct {
	// Changeset An object containing information about attributes that changed due to the event. You can send either anonymous attributes (eg. to track password changes) or full attributes (eg. email changes). To simplify your implementation, Castle *automatically* tracks changes to name, email, and phone, however, if you have the `from` and `to` values at hand, you can also send the changeset yourself, which also allows you to specify changes a user’s password as well as any other custom attributes. Changes to custom attributes won’t be searchable in the dashboard, but they will appear in the event stream.
	//
	// Example: [{"authentication_method.type":{"from":"$authenticator","to":"$email"},"email":{"from":"before@exmaple.com","to":"after@example.com"},"name":{"from":null,"to":"John Snow"},"password":{"changed":true}}]
	Changeset *Changeset `json:"changeset,omitempty"`

	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand  *[]string `json:"expand,omitempty"`
	Product *Product  `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](/v1/getting-started)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool                         `json:"skip_request_token_validation,omitempty"`
	Status                     ProfileResetRiskRequestStatus `json:"status"`

	// Type Castle supported events available for this endpoint
	Type ProfileResetRiskRequestType `json:"type"`
	User UserForMonitorAndRisk       `json:"user"`
}

ProfileResetRiskRequest defines model for ProfileResetRiskRequest.

type ProfileResetRiskRequestStatus

type ProfileResetRiskRequestStatus string

ProfileResetRiskRequestStatus defines model for ProfileResetRiskRequest.Status.

const (
	ProfileResetRiskRequestStatusAttempted ProfileResetRiskRequestStatus = "$attempted"
	ProfileResetRiskRequestStatusFailed    ProfileResetRiskRequestStatus = "$failed"
	ProfileResetRiskRequestStatusSucceeded ProfileResetRiskRequestStatus = "$succeeded"
)

Defines values for ProfileResetRiskRequestStatus.

func (ProfileResetRiskRequestStatus) Valid

Valid indicates whether the value is a known member of the ProfileResetRiskRequestStatus enum.

type ProfileResetRiskRequestType

type ProfileResetRiskRequestType string

ProfileResetRiskRequestType Castle supported events available for this endpoint

const (
	ProfileResetRiskRequestTypeProfileReset ProfileResetRiskRequestType = "$profile_reset"
)

Defines values for ProfileResetRiskRequestType.

func (ProfileResetRiskRequestType) Valid

Valid indicates whether the value is a known member of the ProfileResetRiskRequestType enum.

type ProfileUpdateResponse

type ProfileUpdateResponse struct {
	// Agent AI agent identified for this event/context. Omitted when no agent is identified
	Agent *Agent `json:"agent,omitempty"`

	// Authenticated Authenticated or Anonymous visitor
	//
	// Example: true
	Authenticated *bool `json:"authenticated,omitempty"`

	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`
	Behavior             *struct {
		// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
		Fingerprint nullable.Nullable[string] `json:"fingerprint,omitempty"`
	} `json:"behavior,omitempty"`

	// Changeset An object containing information about attributes that changed due to the event. You can send either anonymous attributes (eg. to track password changes) or full attributes (eg. email changes). To simplify your implementation, Castle *automatically* tracks changes to name, email, and phone, however, if you have the `from` and `to` values at hand, you can also send the changeset yourself, which also allows you to specify changes a user’s password as well as any other custom attributes. Changes to custom attributes won’t be searchable in the dashboard, but they will appear in the event stream.
	//
	// Example: [{"authentication_method.type":{"from":"$authenticator","to":"$email"},"email":{"from":"before@exmaple.com","to":"after@example.com"},"name":{"from":null,"to":"John Snow"},"password":{"changed":true}}]
	Changeset *Changeset `json:"changeset,omitempty"`

	// CreatedAt Event timestamp
	//
	// Example: 2021-09-27T16:46:38.313Z
	CreatedAt *time.Time `json:"created_at,omitempty"`
	Device    struct {
		// Fingerprint Example: ohvjn8adSnetYTzZ8B7bOP
		Fingerprint nullable.Nullable[string] `json:"fingerprint"`
		Hardware    *struct {
			Brand   nullable.Nullable[string] `json:"brand"`
			Display struct {
				// Height Example: 982
				Height nullable.Nullable[int] `json:"height"`

				// Width Example: 1512
				Width nullable.Nullable[int] `json:"width"`
			} `json:"display"`
			Model struct {
				Code nullable.Nullable[string] `json:"code"`
				Name nullable.Nullable[string] `json:"name"`
			} `json:"model"`
			Name nullable.Nullable[string] `json:"name"`

			// Type Example: computer
			Type string `json:"type"`
		} `json:"hardware,omitempty"`
		Os *struct {
			// Name Example: Windows 10
			Name    string `json:"name"`
			Version struct {
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 10
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"os,omitempty"`
		Screen *struct {
			// Orientation Example: landscape
			Orientation nullable.Nullable[string] `json:"orientation,omitempty"`

			// Screen Example: 2
			Screen nullable.Nullable[int] `json:"screen,omitempty"`
		} `json:"screen,omitempty"`
		Software *struct {
			// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
			Fingerprint nullable.Nullable[string] `json:"fingerprint"`

			// Languages Example: ["en-us","en"]
			Languages []string `json:"languages"`

			// Name Example: Chrome
			Name string `json:"name"`

			// Type Example: browser
			Type    string `json:"type"`
			Version struct {
				// Full Example: 91.0.4472
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 91
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"software,omitempty"`
		Timezone *struct {
			// Name Example: America/New_York
			Name nullable.Nullable[string] `json:"name,omitempty"`

			// Offset Time offset from UTC measured in minutes
			//
			// Example: -300
			Offset nullable.Nullable[int] `json:"offset,omitempty"`
		} `json:"timezone,omitempty"`

		// Token Device token generated or found
		//
		// Example: eyJhbGciOiJIUzI1NiJ9.eyJ0b2tlbiI6IjEzc2x6RzNHQ0RzeFJCejdJWF9SUDJkV1Y0RFgiLCJxdWFsaWZpZXIiOiJBUUlEQ2pFME5EZzFPREF3T1RZIiwiYW5vbnltb3VzIjpmYWxzZSwidmVyc2lvbiI6MC4zfQ.y3vOt-W1IpOi7Oyn1jll1uDw1YL-JPZtNMTU-PyaYhQ
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Token *string `json:"token,omitempty"`

		// UserAgent Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
		UserAgent *string `json:"user_agent,omitempty"`
	} `json:"device"`

	// Email User Email Object
	Email *struct {
		// Disposable Example: false
		Disposable *bool `json:"disposable,omitempty"`

		// Domain Example: gmail.com
		Domain        *string `json:"domain,omitempty"`
		DomainDetails *struct {
			// CreatedAt Example: 2021-09-27T16:46:38.313Z
			CreatedAt   *time.Time `json:"created_at,omitempty"`
			DmarcRecord *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"dmarc_record,omitempty"`

			// ExpiresAt Example: 2021-09-27T16:46:38.313Z
			ExpiresAt *time.Time `json:"expires_at,omitempty"`
			MxRecords *struct {
				// NullMx Example: false
				NullMx nullable.Nullable[bool] `json:"null_mx,omitempty"`
			} `json:"mx_records,omitempty"`

			// Nameservers Example: ["ns1.hosting.com","ns2.hosting.com","ns3.hosting.com"]
			Nameservers *[]string `json:"nameservers,omitempty"`
			Registrar   *string   `json:"registrar,omitempty"`
			SpfRecord   *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"spf_record,omitempty"`

			// UpdatedAt Example: 2021-09-27T16:46:38.313Z
			UpdatedAt *time.Time `json:"updated_at,omitempty"`
		} `json:"domain_details,omitempty"`

		// Normalized Example: user.email@example.com
		Normalized *string `json:"normalized,omitempty"`

		// Unreachable Example: false
		Unreachable *bool `json:"unreachable,omitempty"`
	} `json:"email,omitempty"`

	// Endpoint Castle Request Endpoint
	//
	// Example: /v1/risk
	Endpoint *string `json:"endpoint,omitempty"`

	// Id Castle Event ID
	//
	// Example: ASZoelALT5-PaVw2pAVMXg
	Id *string `json:"id,omitempty"`
	Ip *IP     `json:"ip,omitempty"`

	// Metrics Metrics triggered for this event/context
	//
	// Example: {"1":{},"2":{},"3":{},"4":{},"5":{}}
	Metrics *map[string]map[string]interface{} `json:"metrics,omitempty"`

	// Name Event Full Name
	//
	// Example: Login Succeeded
	Name *string `json:"name,omitempty"`

	// Params The params object
	Params *EventParams `json:"params,omitempty"`

	// Policy The matching policy
	Policy  Policy   `json:"policy"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties
	Properties *Properties `json:"properties,omitempty"`

	// Risk Deprecated Risk Score - use `scores` instead. Calculated only when `request_token` and `context` are provided.
	//
	// Example: 0.65
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Risk *float32 `json:"risk,omitempty"`

	// Scores Castle Scores breakdown. Calculated only when `request_token` and `context` are provided.
	Scores *struct {
		AccountAbuse struct {
			// Score Calculated Account Abuse Risk Score.
			//
			// Example: 0.65
			Score *float32 `json:"score,omitempty"`
		} `json:"account_abuse"`
		AccountTakeover struct {
			// Score Calculated Account Takeover Risk Score.
			//
			// Example: 0.77
			Score *float32 `json:"score,omitempty"`
		} `json:"account_takeover"`
		Bot struct {
			// Score Calculated Bot Risk Score.
			//
			// Example: 0.34
			Score *float32 `json:"score,omitempty"`
		} `json:"bot"`
	} `json:"scores,omitempty"`

	// Sdks Castle SDKs details
	Sdks *struct {
		Client *struct {
			// Name Example: castle-web
			Name *string `json:"name,omitempty"`

			// Version Example: 2.0.0
			Version *string `json:"version,omitempty"`
		} `json:"client,omitempty"`
		Server *struct {
			// Name Example: castle-postman
			Name *string `json:"name,omitempty"`

			// Version Example: 0.1.0
			Version *string `json:"version,omitempty"`
		} `json:"server,omitempty"`
	} `json:"sdks,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// Signals Signals triggered for this event/context
	//
	// Example: {"bot_behavior":{},"disposable_email":{},"multiple_accounts_per_device":{},"proxy_ip":{},"residential_proxy_access":{},"spoofed_device":{}}
	Signals *map[string]map[string]interface{} `json:"signals,omitempty"`
	Status  *ProfileUpdateResponseStatus       `json:"status,omitempty"`

	// Type Castle supported events available for this endpoint
	Type ProfileUpdateResponseType `json:"type"`
	User *UserForMonitorAndRisk    `json:"user,omitempty"`
}

ProfileUpdateResponse defines model for ProfileUpdateResponse.

type ProfileUpdateResponseStatus

type ProfileUpdateResponseStatus string

ProfileUpdateResponseStatus defines model for ProfileUpdateResponse.Status.

const (
	ProfileUpdateResponseStatusAttempted ProfileUpdateResponseStatus = "$attempted"
	ProfileUpdateResponseStatusFailed    ProfileUpdateResponseStatus = "$failed"
	ProfileUpdateResponseStatusSucceeded ProfileUpdateResponseStatus = "$succeeded"
)

Defines values for ProfileUpdateResponseStatus.

func (ProfileUpdateResponseStatus) Valid

Valid indicates whether the value is a known member of the ProfileUpdateResponseStatus enum.

type ProfileUpdateResponseType

type ProfileUpdateResponseType string

ProfileUpdateResponseType Castle supported events available for this endpoint

const (
	ProfileUpdateResponseTypeProfileUpdate ProfileUpdateResponseType = "$profile_update"
)

Defines values for ProfileUpdateResponseType.

func (ProfileUpdateResponseType) Valid

func (e ProfileUpdateResponseType) Valid() bool

Valid indicates whether the value is a known member of the ProfileUpdateResponseType enum.

type ProfileUpdateRiskRequest

type ProfileUpdateRiskRequest struct {
	// Changeset An object containing information about attributes that changed due to the event. You can send either anonymous attributes (eg. to track password changes) or full attributes (eg. email changes). To simplify your implementation, Castle *automatically* tracks changes to name, email, and phone, however, if you have the `from` and `to` values at hand, you can also send the changeset yourself, which also allows you to specify changes a user’s password as well as any other custom attributes. Changes to custom attributes won’t be searchable in the dashboard, but they will appear in the event stream.
	//
	// Example: [{"authentication_method.type":{"from":"$authenticator","to":"$email"},"email":{"from":"before@exmaple.com","to":"after@example.com"},"name":{"from":null,"to":"John Snow"},"password":{"changed":true}}]
	Changeset *Changeset `json:"changeset,omitempty"`

	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand  *[]string `json:"expand,omitempty"`
	Product *Product  `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](/v1/getting-started)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool                          `json:"skip_request_token_validation,omitempty"`
	Status                     ProfileUpdateRiskRequestStatus `json:"status"`

	// Type Castle supported events available for this endpoint
	Type ProfileUpdateRiskRequestType `json:"type"`
	User UserForMonitorAndRisk        `json:"user"`
}

ProfileUpdateRiskRequest defines model for ProfileUpdateRiskRequest.

type ProfileUpdateRiskRequestStatus

type ProfileUpdateRiskRequestStatus string

ProfileUpdateRiskRequestStatus defines model for ProfileUpdateRiskRequest.Status.

const (
	ProfileUpdateRiskRequestStatusAttempted ProfileUpdateRiskRequestStatus = "$attempted"
	ProfileUpdateRiskRequestStatusFailed    ProfileUpdateRiskRequestStatus = "$failed"
	ProfileUpdateRiskRequestStatusSucceeded ProfileUpdateRiskRequestStatus = "$succeeded"
)

Defines values for ProfileUpdateRiskRequestStatus.

func (ProfileUpdateRiskRequestStatus) Valid

Valid indicates whether the value is a known member of the ProfileUpdateRiskRequestStatus enum.

type ProfileUpdateRiskRequestType

type ProfileUpdateRiskRequestType string

ProfileUpdateRiskRequestType Castle supported events available for this endpoint

const (
	ProfileUpdateRiskRequestTypeProfileUpdate ProfileUpdateRiskRequestType = "$profile_update"
)

Defines values for ProfileUpdateRiskRequestType.

func (ProfileUpdateRiskRequestType) Valid

Valid indicates whether the value is a known member of the ProfileUpdateRiskRequestType enum.

type Properties

Properties User defined properties

type Properties0

type Properties0 = string

Properties0 A regular string field or timestamp given in the ISO8601 format

Example: {"account_verified_at":"2024-07-25T13:22:50.834Z","favorite_color":"Blue"}

type Properties1

type Properties1 = float32

Properties1 defines model for Properties.1.

type Properties2

type Properties2 = bool

Properties2 defines model for Properties.2.

type Properties3

Properties3 defines model for Properties.3.

type Properties4

type Properties4 = []Properties_4_Item

Properties4 defines model for Properties.4.

type Properties30

type Properties30 = string

Properties30 defines model for Properties.3.0.

type Properties31

type Properties31 = float32

Properties31 defines model for Properties.3.1.

type Properties32

type Properties32 = bool

Properties32 defines model for Properties.3.2.

type Properties33

type Properties33 = []Properties_3_3_Item

Properties33 defines model for Properties.3.3.

type Properties40

type Properties40 = string

Properties40 defines model for Properties.4.0.

type Properties41

type Properties41 = float32

Properties41 defines model for Properties.4.1.

type Properties42

type Properties42 = bool

Properties42 defines model for Properties.4.2.

type Properties330

type Properties330 = string

Properties330 defines model for Properties.3.3.0.

type Properties331

type Properties331 = float32

Properties331 defines model for Properties.3.3.1.

type Properties332

type Properties332 = bool

Properties332 defines model for Properties.3.3.2.

type Properties_3_3_Item

type Properties_3_3_Item struct {
	// contains filtered or unexported fields
}

Properties_3_3_Item defines model for Properties.3.3.Item.

func (Properties_3_3_Item) AsProperties330

func (t Properties_3_3_Item) AsProperties330() (Properties330, error)

AsProperties330 returns the union data inside the Properties_3_3_Item as a Properties330

func (Properties_3_3_Item) AsProperties331

func (t Properties_3_3_Item) AsProperties331() (Properties331, error)

AsProperties331 returns the union data inside the Properties_3_3_Item as a Properties331

func (Properties_3_3_Item) AsProperties332

func (t Properties_3_3_Item) AsProperties332() (Properties332, error)

AsProperties332 returns the union data inside the Properties_3_3_Item as a Properties332

func (*Properties_3_3_Item) FromProperties330

func (t *Properties_3_3_Item) FromProperties330(v Properties330) error

FromProperties330 overwrites any union data inside the Properties_3_3_Item as the provided Properties330

func (*Properties_3_3_Item) FromProperties331

func (t *Properties_3_3_Item) FromProperties331(v Properties331) error

FromProperties331 overwrites any union data inside the Properties_3_3_Item as the provided Properties331

func (*Properties_3_3_Item) FromProperties332

func (t *Properties_3_3_Item) FromProperties332(v Properties332) error

FromProperties332 overwrites any union data inside the Properties_3_3_Item as the provided Properties332

func (Properties_3_3_Item) MarshalJSON

func (t Properties_3_3_Item) MarshalJSON() ([]byte, error)

func (*Properties_3_3_Item) MergeProperties330

func (t *Properties_3_3_Item) MergeProperties330(v Properties330) error

MergeProperties330 performs a merge with any union data inside the Properties_3_3_Item, using the provided Properties330

func (*Properties_3_3_Item) MergeProperties331

func (t *Properties_3_3_Item) MergeProperties331(v Properties331) error

MergeProperties331 performs a merge with any union data inside the Properties_3_3_Item, using the provided Properties331

func (*Properties_3_3_Item) MergeProperties332

func (t *Properties_3_3_Item) MergeProperties332(v Properties332) error

MergeProperties332 performs a merge with any union data inside the Properties_3_3_Item, using the provided Properties332

func (*Properties_3_3_Item) UnmarshalJSON

func (t *Properties_3_3_Item) UnmarshalJSON(b []byte) error

type Properties_3_AdditionalProperties

type Properties_3_AdditionalProperties struct {
	// contains filtered or unexported fields
}

Properties_3_AdditionalProperties defines model for Properties.3.AdditionalProperties.

func (Properties_3_AdditionalProperties) AsProperties30

AsProperties30 returns the union data inside the Properties_3_AdditionalProperties as a Properties30

func (Properties_3_AdditionalProperties) AsProperties31

AsProperties31 returns the union data inside the Properties_3_AdditionalProperties as a Properties31

func (Properties_3_AdditionalProperties) AsProperties32

AsProperties32 returns the union data inside the Properties_3_AdditionalProperties as a Properties32

func (Properties_3_AdditionalProperties) AsProperties33

AsProperties33 returns the union data inside the Properties_3_AdditionalProperties as a Properties33

func (*Properties_3_AdditionalProperties) FromProperties30

func (t *Properties_3_AdditionalProperties) FromProperties30(v Properties30) error

FromProperties30 overwrites any union data inside the Properties_3_AdditionalProperties as the provided Properties30

func (*Properties_3_AdditionalProperties) FromProperties31

func (t *Properties_3_AdditionalProperties) FromProperties31(v Properties31) error

FromProperties31 overwrites any union data inside the Properties_3_AdditionalProperties as the provided Properties31

func (*Properties_3_AdditionalProperties) FromProperties32

func (t *Properties_3_AdditionalProperties) FromProperties32(v Properties32) error

FromProperties32 overwrites any union data inside the Properties_3_AdditionalProperties as the provided Properties32

func (*Properties_3_AdditionalProperties) FromProperties33

func (t *Properties_3_AdditionalProperties) FromProperties33(v Properties33) error

FromProperties33 overwrites any union data inside the Properties_3_AdditionalProperties as the provided Properties33

func (Properties_3_AdditionalProperties) MarshalJSON

func (t Properties_3_AdditionalProperties) MarshalJSON() ([]byte, error)

func (*Properties_3_AdditionalProperties) MergeProperties30

func (t *Properties_3_AdditionalProperties) MergeProperties30(v Properties30) error

MergeProperties30 performs a merge with any union data inside the Properties_3_AdditionalProperties, using the provided Properties30

func (*Properties_3_AdditionalProperties) MergeProperties31

func (t *Properties_3_AdditionalProperties) MergeProperties31(v Properties31) error

MergeProperties31 performs a merge with any union data inside the Properties_3_AdditionalProperties, using the provided Properties31

func (*Properties_3_AdditionalProperties) MergeProperties32

func (t *Properties_3_AdditionalProperties) MergeProperties32(v Properties32) error

MergeProperties32 performs a merge with any union data inside the Properties_3_AdditionalProperties, using the provided Properties32

func (*Properties_3_AdditionalProperties) MergeProperties33

func (t *Properties_3_AdditionalProperties) MergeProperties33(v Properties33) error

MergeProperties33 performs a merge with any union data inside the Properties_3_AdditionalProperties, using the provided Properties33

func (*Properties_3_AdditionalProperties) UnmarshalJSON

func (t *Properties_3_AdditionalProperties) UnmarshalJSON(b []byte) error

type Properties_4_Item

type Properties_4_Item struct {
	// contains filtered or unexported fields
}

Properties_4_Item defines model for Properties.4.Item.

func (Properties_4_Item) AsProperties40

func (t Properties_4_Item) AsProperties40() (Properties40, error)

AsProperties40 returns the union data inside the Properties_4_Item as a Properties40

func (Properties_4_Item) AsProperties41

func (t Properties_4_Item) AsProperties41() (Properties41, error)

AsProperties41 returns the union data inside the Properties_4_Item as a Properties41

func (Properties_4_Item) AsProperties42

func (t Properties_4_Item) AsProperties42() (Properties42, error)

AsProperties42 returns the union data inside the Properties_4_Item as a Properties42

func (*Properties_4_Item) FromProperties40

func (t *Properties_4_Item) FromProperties40(v Properties40) error

FromProperties40 overwrites any union data inside the Properties_4_Item as the provided Properties40

func (*Properties_4_Item) FromProperties41

func (t *Properties_4_Item) FromProperties41(v Properties41) error

FromProperties41 overwrites any union data inside the Properties_4_Item as the provided Properties41

func (*Properties_4_Item) FromProperties42

func (t *Properties_4_Item) FromProperties42(v Properties42) error

FromProperties42 overwrites any union data inside the Properties_4_Item as the provided Properties42

func (Properties_4_Item) MarshalJSON

func (t Properties_4_Item) MarshalJSON() ([]byte, error)

func (*Properties_4_Item) MergeProperties40

func (t *Properties_4_Item) MergeProperties40(v Properties40) error

MergeProperties40 performs a merge with any union data inside the Properties_4_Item, using the provided Properties40

func (*Properties_4_Item) MergeProperties41

func (t *Properties_4_Item) MergeProperties41(v Properties41) error

MergeProperties41 performs a merge with any union data inside the Properties_4_Item, using the provided Properties41

func (*Properties_4_Item) MergeProperties42

func (t *Properties_4_Item) MergeProperties42(v Properties42) error

MergeProperties42 performs a merge with any union data inside the Properties_4_Item, using the provided Properties42

func (*Properties_4_Item) UnmarshalJSON

func (t *Properties_4_Item) UnmarshalJSON(b []byte) error

type Properties_AdditionalProperties

type Properties_AdditionalProperties struct {
	// contains filtered or unexported fields
}

Properties_AdditionalProperties defines model for Properties.AdditionalProperties.

func (Properties_AdditionalProperties) AsProperties0

func (t Properties_AdditionalProperties) AsProperties0() (Properties0, error)

AsProperties0 returns the union data inside the Properties_AdditionalProperties as a Properties0

func (Properties_AdditionalProperties) AsProperties1

func (t Properties_AdditionalProperties) AsProperties1() (Properties1, error)

AsProperties1 returns the union data inside the Properties_AdditionalProperties as a Properties1

func (Properties_AdditionalProperties) AsProperties2

func (t Properties_AdditionalProperties) AsProperties2() (Properties2, error)

AsProperties2 returns the union data inside the Properties_AdditionalProperties as a Properties2

func (Properties_AdditionalProperties) AsProperties3

func (t Properties_AdditionalProperties) AsProperties3() (Properties3, error)

AsProperties3 returns the union data inside the Properties_AdditionalProperties as a Properties3

func (Properties_AdditionalProperties) AsProperties4

func (t Properties_AdditionalProperties) AsProperties4() (Properties4, error)

AsProperties4 returns the union data inside the Properties_AdditionalProperties as a Properties4

func (*Properties_AdditionalProperties) FromProperties0

func (t *Properties_AdditionalProperties) FromProperties0(v Properties0) error

FromProperties0 overwrites any union data inside the Properties_AdditionalProperties as the provided Properties0

func (*Properties_AdditionalProperties) FromProperties1

func (t *Properties_AdditionalProperties) FromProperties1(v Properties1) error

FromProperties1 overwrites any union data inside the Properties_AdditionalProperties as the provided Properties1

func (*Properties_AdditionalProperties) FromProperties2

func (t *Properties_AdditionalProperties) FromProperties2(v Properties2) error

FromProperties2 overwrites any union data inside the Properties_AdditionalProperties as the provided Properties2

func (*Properties_AdditionalProperties) FromProperties3

func (t *Properties_AdditionalProperties) FromProperties3(v Properties3) error

FromProperties3 overwrites any union data inside the Properties_AdditionalProperties as the provided Properties3

func (*Properties_AdditionalProperties) FromProperties4

func (t *Properties_AdditionalProperties) FromProperties4(v Properties4) error

FromProperties4 overwrites any union data inside the Properties_AdditionalProperties as the provided Properties4

func (Properties_AdditionalProperties) MarshalJSON

func (t Properties_AdditionalProperties) MarshalJSON() ([]byte, error)

func (*Properties_AdditionalProperties) MergeProperties0

func (t *Properties_AdditionalProperties) MergeProperties0(v Properties0) error

MergeProperties0 performs a merge with any union data inside the Properties_AdditionalProperties, using the provided Properties0

func (*Properties_AdditionalProperties) MergeProperties1

func (t *Properties_AdditionalProperties) MergeProperties1(v Properties1) error

MergeProperties1 performs a merge with any union data inside the Properties_AdditionalProperties, using the provided Properties1

func (*Properties_AdditionalProperties) MergeProperties2

func (t *Properties_AdditionalProperties) MergeProperties2(v Properties2) error

MergeProperties2 performs a merge with any union data inside the Properties_AdditionalProperties, using the provided Properties2

func (*Properties_AdditionalProperties) MergeProperties3

func (t *Properties_AdditionalProperties) MergeProperties3(v Properties3) error

MergeProperties3 performs a merge with any union data inside the Properties_AdditionalProperties, using the provided Properties3

func (*Properties_AdditionalProperties) MergeProperties4

func (t *Properties_AdditionalProperties) MergeProperties4(v Properties4) error

MergeProperties4 performs a merge with any union data inside the Properties_AdditionalProperties, using the provided Properties4

func (*Properties_AdditionalProperties) UnmarshalJSON

func (t *Properties_AdditionalProperties) UnmarshalJSON(b []byte) error

type Query

type Query struct {
	// Aggregations EXPERIMENTAL! Array of aggregations to include in the response.
	// For each aggregation, you can reference its name in the `columns`, `sort`, and `having` fields.
	Aggregations *[]AggregationRequest `json:"aggregations,omitempty"`

	// Columns Field names to return. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	// When set, only these fields are returned. When omitted, all fields are returned.
	Columns *[]string `json:"columns,omitempty"`

	// Filters Either a list of filters or a filter tree (`{ "$and" | "$or": [...] }`). A tree can nest `$and` and `$or`
	// groups, for example `(A OR B) AND (C OR D)`, which the list form cannot express.
	Filters EventFilters `json:"filters"`

	// Formulas EXPERIMENTAL! Array of formulas to include in the response.
	// For each formula, you can reference its name in the `columns`, `sort`, and `having` fields.
	Formulas *[]FormulaRequest `json:"formulas,omitempty"`
	Page     *int              `json:"page,omitempty"`

	// QueryType The type of query to perform.
	//
	// - `$count` returns the number of records matching the query (`total_count` will be present and `data` will be empty)
	// - `$records` returns the records matching the query (`total_count` will be 0)
	// - `$records_with_count` returns the number of records matching the query and the records matching the query
	QueryType   *QueryQueryType `json:"query_type,omitempty"`
	ResultsSize *int            `json:"results_size,omitempty"`
}

Query defines model for Query.

type QueryEventsJSONRequestBody

type QueryEventsJSONRequestBody = Query

QueryEventsJSONRequestBody defines body for QueryEvents for application/json ContentType.

type QueryEventsResponse

type QueryEventsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Events
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
}

func ParseQueryEventsResponse

func ParseQueryEventsResponse(rsp *http.Response) (*QueryEventsResponse, error)

ParseQueryEventsResponse parses an HTTP response from a QueryEventsWithResponse call

func (QueryEventsResponse) ContentType

func (r QueryEventsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (QueryEventsResponse) GetBody

func (r QueryEventsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (QueryEventsResponse) GetJSON200

func (r QueryEventsResponse) GetJSON200() *Events

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (QueryEventsResponse) GetJSON422

func (r QueryEventsResponse) GetJSON422() *UnprocessableEntity

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (QueryEventsResponse) Status

func (r QueryEventsResponse) Status() string

Status returns HTTPResponse.Status

func (QueryEventsResponse) StatusCode

func (r QueryEventsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type QueryFilter

type QueryFilter struct {
	// Field Field name. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	Field string `json:"field"`

	// Op Example: $eq
	Op QueryFilterOp `json:"op"`

	// Value Can be string, bool, numeric, object, or an array of string/numeric values
	Value QueryFilter_Value `json:"value"`
}

QueryFilter defines model for QueryFilter.

type QueryFilterOp

type QueryFilterOp string

QueryFilterOp Example: $eq

const (
	QueryFilterOpContains    QueryFilterOp = "$contains"
	QueryFilterOpEndsWith    QueryFilterOp = "$ends_with"
	QueryFilterOpEq          QueryFilterOp = "$eq"
	QueryFilterOpIn          QueryFilterOp = "$in"
	QueryFilterOpIpRange     QueryFilterOp = "$ip_range"
	QueryFilterOpLike        QueryFilterOp = "$like"
	QueryFilterOpMatches     QueryFilterOp = "$matches"
	QueryFilterOpNcontains   QueryFilterOp = "$ncontains"
	QueryFilterOpNendsWith   QueryFilterOp = "$nends_with"
	QueryFilterOpNeq         QueryFilterOp = "$neq"
	QueryFilterOpNin         QueryFilterOp = "$nin"
	QueryFilterOpNipRange    QueryFilterOp = "$nip_range"
	QueryFilterOpNlike       QueryFilterOp = "$nlike"
	QueryFilterOpNmatches    QueryFilterOp = "$nmatches"
	QueryFilterOpNstartsWith QueryFilterOp = "$nstarts_with"
	QueryFilterOpStartsWith  QueryFilterOp = "$starts_with"
)

Defines values for QueryFilterOp.

func (QueryFilterOp) Valid

func (e QueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the QueryFilterOp enum.

type QueryFilterValue0

type QueryFilterValue0 = string

QueryFilterValue0 Example: Rhea

type QueryFilterValue1

type QueryFilterValue1 = float32

QueryFilterValue1 Example: 2

type QueryFilterValue2

type QueryFilterValue2 = bool

QueryFilterValue2 Example: true

type QueryFilterValue3

type QueryFilterValue3 = []QueryFilter_Value_3_Item

QueryFilterValue3 Example: ["Rhea"]

type QueryFilterValue4

type QueryFilterValue4 struct {
	// Reference A field to compare a value against. Consult the [Events Schema API](/#operation/getEventSchema) for the list of referenceable fields.
	Reference string `json:"reference"`
}

QueryFilterValue4 Example: {"reference":"user_email"}

type QueryFilterValue30

type QueryFilterValue30 = string

QueryFilterValue30 defines model for QueryFilter.Value.3.0.

type QueryFilterValue31

type QueryFilterValue31 = float32

QueryFilterValue31 defines model for QueryFilter.Value.3.1.

type QueryFilter_Value

type QueryFilter_Value struct {
	// contains filtered or unexported fields
}

QueryFilter_Value Can be string, bool, numeric, object, or an array of string/numeric values

func (QueryFilter_Value) AsQueryFilterValue0

func (t QueryFilter_Value) AsQueryFilterValue0() (QueryFilterValue0, error)

AsQueryFilterValue0 returns the union data inside the QueryFilter_Value as a QueryFilterValue0

func (QueryFilter_Value) AsQueryFilterValue1

func (t QueryFilter_Value) AsQueryFilterValue1() (QueryFilterValue1, error)

AsQueryFilterValue1 returns the union data inside the QueryFilter_Value as a QueryFilterValue1

func (QueryFilter_Value) AsQueryFilterValue2

func (t QueryFilter_Value) AsQueryFilterValue2() (QueryFilterValue2, error)

AsQueryFilterValue2 returns the union data inside the QueryFilter_Value as a QueryFilterValue2

func (QueryFilter_Value) AsQueryFilterValue3

func (t QueryFilter_Value) AsQueryFilterValue3() (QueryFilterValue3, error)

AsQueryFilterValue3 returns the union data inside the QueryFilter_Value as a QueryFilterValue3

func (QueryFilter_Value) AsQueryFilterValue4

func (t QueryFilter_Value) AsQueryFilterValue4() (QueryFilterValue4, error)

AsQueryFilterValue4 returns the union data inside the QueryFilter_Value as a QueryFilterValue4

func (*QueryFilter_Value) FromQueryFilterValue0

func (t *QueryFilter_Value) FromQueryFilterValue0(v QueryFilterValue0) error

FromQueryFilterValue0 overwrites any union data inside the QueryFilter_Value as the provided QueryFilterValue0

func (*QueryFilter_Value) FromQueryFilterValue1

func (t *QueryFilter_Value) FromQueryFilterValue1(v QueryFilterValue1) error

FromQueryFilterValue1 overwrites any union data inside the QueryFilter_Value as the provided QueryFilterValue1

func (*QueryFilter_Value) FromQueryFilterValue2

func (t *QueryFilter_Value) FromQueryFilterValue2(v QueryFilterValue2) error

FromQueryFilterValue2 overwrites any union data inside the QueryFilter_Value as the provided QueryFilterValue2

func (*QueryFilter_Value) FromQueryFilterValue3

func (t *QueryFilter_Value) FromQueryFilterValue3(v QueryFilterValue3) error

FromQueryFilterValue3 overwrites any union data inside the QueryFilter_Value as the provided QueryFilterValue3

func (*QueryFilter_Value) FromQueryFilterValue4

func (t *QueryFilter_Value) FromQueryFilterValue4(v QueryFilterValue4) error

FromQueryFilterValue4 overwrites any union data inside the QueryFilter_Value as the provided QueryFilterValue4

func (QueryFilter_Value) MarshalJSON

func (t QueryFilter_Value) MarshalJSON() ([]byte, error)

func (*QueryFilter_Value) MergeQueryFilterValue0

func (t *QueryFilter_Value) MergeQueryFilterValue0(v QueryFilterValue0) error

MergeQueryFilterValue0 performs a merge with any union data inside the QueryFilter_Value, using the provided QueryFilterValue0

func (*QueryFilter_Value) MergeQueryFilterValue1

func (t *QueryFilter_Value) MergeQueryFilterValue1(v QueryFilterValue1) error

MergeQueryFilterValue1 performs a merge with any union data inside the QueryFilter_Value, using the provided QueryFilterValue1

func (*QueryFilter_Value) MergeQueryFilterValue2

func (t *QueryFilter_Value) MergeQueryFilterValue2(v QueryFilterValue2) error

MergeQueryFilterValue2 performs a merge with any union data inside the QueryFilter_Value, using the provided QueryFilterValue2

func (*QueryFilter_Value) MergeQueryFilterValue3

func (t *QueryFilter_Value) MergeQueryFilterValue3(v QueryFilterValue3) error

MergeQueryFilterValue3 performs a merge with any union data inside the QueryFilter_Value, using the provided QueryFilterValue3

func (*QueryFilter_Value) MergeQueryFilterValue4

func (t *QueryFilter_Value) MergeQueryFilterValue4(v QueryFilterValue4) error

MergeQueryFilterValue4 performs a merge with any union data inside the QueryFilter_Value, using the provided QueryFilterValue4

func (*QueryFilter_Value) UnmarshalJSON

func (t *QueryFilter_Value) UnmarshalJSON(b []byte) error

type QueryFilter_Value_3_Item

type QueryFilter_Value_3_Item struct {
	// contains filtered or unexported fields
}

QueryFilter_Value_3_Item defines model for QueryFilter.Value.3.Item.

func (QueryFilter_Value_3_Item) AsQueryFilterValue30

func (t QueryFilter_Value_3_Item) AsQueryFilterValue30() (QueryFilterValue30, error)

AsQueryFilterValue30 returns the union data inside the QueryFilter_Value_3_Item as a QueryFilterValue30

func (QueryFilter_Value_3_Item) AsQueryFilterValue31

func (t QueryFilter_Value_3_Item) AsQueryFilterValue31() (QueryFilterValue31, error)

AsQueryFilterValue31 returns the union data inside the QueryFilter_Value_3_Item as a QueryFilterValue31

func (*QueryFilter_Value_3_Item) FromQueryFilterValue30

func (t *QueryFilter_Value_3_Item) FromQueryFilterValue30(v QueryFilterValue30) error

FromQueryFilterValue30 overwrites any union data inside the QueryFilter_Value_3_Item as the provided QueryFilterValue30

func (*QueryFilter_Value_3_Item) FromQueryFilterValue31

func (t *QueryFilter_Value_3_Item) FromQueryFilterValue31(v QueryFilterValue31) error

FromQueryFilterValue31 overwrites any union data inside the QueryFilter_Value_3_Item as the provided QueryFilterValue31

func (QueryFilter_Value_3_Item) MarshalJSON

func (t QueryFilter_Value_3_Item) MarshalJSON() ([]byte, error)

func (*QueryFilter_Value_3_Item) MergeQueryFilterValue30

func (t *QueryFilter_Value_3_Item) MergeQueryFilterValue30(v QueryFilterValue30) error

MergeQueryFilterValue30 performs a merge with any union data inside the QueryFilter_Value_3_Item, using the provided QueryFilterValue30

func (*QueryFilter_Value_3_Item) MergeQueryFilterValue31

func (t *QueryFilter_Value_3_Item) MergeQueryFilterValue31(v QueryFilterValue31) error

MergeQueryFilterValue31 performs a merge with any union data inside the QueryFilter_Value_3_Item, using the provided QueryFilterValue31

func (*QueryFilter_Value_3_Item) UnmarshalJSON

func (t *QueryFilter_Value_3_Item) UnmarshalJSON(b []byte) error

type QueryListItemsJSONRequestBody

type QueryListItemsJSONRequestBody = ListItemQuery

QueryListItemsJSONRequestBody defines body for QueryListItems for application/json ContentType.

type QueryListItemsResponse

type QueryListItemsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ListItemList
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
}

func ParseQueryListItemsResponse

func ParseQueryListItemsResponse(rsp *http.Response) (*QueryListItemsResponse, error)

ParseQueryListItemsResponse parses an HTTP response from a QueryListItemsWithResponse call

func (QueryListItemsResponse) ContentType

func (r QueryListItemsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (QueryListItemsResponse) GetBody

func (r QueryListItemsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (QueryListItemsResponse) GetJSON200

func (r QueryListItemsResponse) GetJSON200() *ListItemList

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (QueryListItemsResponse) GetJSON422

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (QueryListItemsResponse) Status

func (r QueryListItemsResponse) Status() string

Status returns HTTPResponse.Status

func (QueryListItemsResponse) StatusCode

func (r QueryListItemsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type QueryListsJSONRequestBody

type QueryListsJSONRequestBody = ListQuery

QueryListsJSONRequestBody defines body for QueryLists for application/json ContentType.

type QueryListsResponse

type QueryListsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ListQueryResponse
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
}

func ParseQueryListsResponse

func ParseQueryListsResponse(rsp *http.Response) (*QueryListsResponse, error)

ParseQueryListsResponse parses an HTTP response from a QueryListsWithResponse call

func (QueryListsResponse) ContentType

func (r QueryListsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (QueryListsResponse) GetBody

func (r QueryListsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (QueryListsResponse) GetJSON200

func (r QueryListsResponse) GetJSON200() *ListQueryResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (QueryListsResponse) GetJSON422

func (r QueryListsResponse) GetJSON422() *UnprocessableEntity

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (QueryListsResponse) Status

func (r QueryListsResponse) Status() string

Status returns HTTPResponse.Status

func (QueryListsResponse) StatusCode

func (r QueryListsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type QueryParams

type QueryParams struct {
	// Aggregations EXPERIMENTAL! Array of aggregations to include in the response.
	// For each aggregation, you can reference its name in the `columns`, `sort`, and `having` fields.
	Aggregations *[]AggregationRequest `json:"aggregations,omitempty"`

	// Columns Field names to return. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	// When set, only these fields are returned. When omitted, all fields are returned.
	Columns *[]string `json:"columns,omitempty"`

	// Filters Either a list of filters or a filter tree (`{ "$and" | "$or": [...] }`). A tree can nest `$and` and `$or`
	// groups, for example `(A OR B) AND (C OR D)`, which the list form cannot express.
	Filters EventFilters `json:"filters"`

	// Formulas EXPERIMENTAL! Array of formulas to include in the response.
	// For each formula, you can reference its name in the `columns`, `sort`, and `having` fields.
	Formulas *[]FormulaRequest `json:"formulas,omitempty"`
	Page     *int              `json:"page,omitempty"`

	// QueryType The type of query to perform.
	//
	// - `$count` returns the number of records matching the query (`total_count` will be present and `data` will be empty)
	// - `$records` returns the records matching the query (`total_count` will be 0)
	// - `$records_with_count` returns the number of records matching the query and the records matching the query
	QueryType *QueryParamsQueryType `json:"query_type,omitempty"`
}

QueryParams defines model for QueryParams.

type QueryParamsQueryType

type QueryParamsQueryType string

QueryParamsQueryType The type of query to perform.

- `$count` returns the number of records matching the query (`total_count` will be present and `data` will be empty) - `$records` returns the records matching the query (`total_count` will be 0) - `$records_with_count` returns the number of records matching the query and the records matching the query

const (
	QueryParamsQueryTypeCount            QueryParamsQueryType = "$count"
	QueryParamsQueryTypeRecords          QueryParamsQueryType = "$records"
	QueryParamsQueryTypeRecordsWithCount QueryParamsQueryType = "$records_with_count"
)

Defines values for QueryParamsQueryType.

func (QueryParamsQueryType) Valid

func (e QueryParamsQueryType) Valid() bool

Valid indicates whether the value is a known member of the QueryParamsQueryType enum.

type QueryQueryType

type QueryQueryType string

QueryQueryType The type of query to perform.

- `$count` returns the number of records matching the query (`total_count` will be present and `data` will be empty) - `$records` returns the records matching the query (`total_count` will be 0) - `$records_with_count` returns the number of records matching the query and the records matching the query

const (
	QueryQueryTypeCount            QueryQueryType = "$count"
	QueryQueryTypeRecords          QueryQueryType = "$records"
	QueryQueryTypeRecordsWithCount QueryQueryType = "$records_with_count"
)

Defines values for QueryQueryType.

func (QueryQueryType) Valid

func (e QueryQueryType) Valid() bool

Valid indicates whether the value is a known member of the QueryQueryType enum.

type RangeBucket

type RangeBucket struct {
	// Field Name of the field the bucket is based on
	//
	// Example: user.id
	Field string `json:"field"`

	// Name Example: risk_count
	Name    string `json:"name"`
	Options struct {
		Ranges struct {
			// DataType Example: string
			DataType RangeBucketOptionsRangesDataType `json:"data_type"`
			Required bool                             `json:"required"`
		} `json:"ranges"`
	} `json:"options"`
	Type RangeBucketType `json:"type"`
}

RangeBucket defines model for RangeBucket.

type RangeBucketOptionsRangesDataType

type RangeBucketOptionsRangesDataType string

RangeBucketOptionsRangesDataType Example: string

const (
	RangeBucketOptionsRangesDataTypeNumber RangeBucketOptionsRangesDataType = "number"
	RangeBucketOptionsRangesDataTypeString RangeBucketOptionsRangesDataType = "string"
)

Defines values for RangeBucketOptionsRangesDataType.

func (RangeBucketOptionsRangesDataType) Valid

Valid indicates whether the value is a known member of the RangeBucketOptionsRangesDataType enum.

type RangeBucketType

type RangeBucketType string

RangeBucketType defines model for RangeBucket.Type.

const (
	RangeBucketTypeRange RangeBucketType = "$range"
)

Defines values for RangeBucketType.

func (RangeBucketType) Valid

func (e RangeBucketType) Valid() bool

Valid indicates whether the value is a known member of the RangeBucketType enum.

type RangeHavingQueryFilter

type RangeHavingQueryFilter struct {
	// Field Field name. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	Field string `json:"field"`

	// Func Aggregation function to be applied on the field
	//
	// Example: $sum
	Func Func `json:"func"`

	// Op Example: $range
	Op RangeHavingQueryFilterOp `json:"op"`

	// Options Options specific for each aggregation function
	Options *map[string]interface{} `json:"options,omitempty"`

	// Transform Describes how to transform the column value. The transformation is applied before the `func` aggregation function.
	Transform *Transform `json:"transform,omitempty"`

	// Value Example: {"gt":2,"lt":10}
	Value struct {
		Gt   *RangeHavingQueryFilter_Value_Gt   `json:"gt,omitempty"`
		Gteq *RangeHavingQueryFilter_Value_Gteq `json:"gteq,omitempty"`
		Lt   *RangeHavingQueryFilter_Value_Lt   `json:"lt,omitempty"`
		Lteq *RangeHavingQueryFilter_Value_Lteq `json:"lteq,omitempty"`
	} `json:"value"`
}

RangeHavingQueryFilter defines model for RangeHavingQueryFilter.

type RangeHavingQueryFilterOp

type RangeHavingQueryFilterOp string

RangeHavingQueryFilterOp Example: $range

const (
	RangeHavingQueryFilterOpRange RangeHavingQueryFilterOp = "$range"
)

Defines values for RangeHavingQueryFilterOp.

func (RangeHavingQueryFilterOp) Valid

func (e RangeHavingQueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the RangeHavingQueryFilterOp enum.

type RangeHavingQueryFilterValueGt0

type RangeHavingQueryFilterValueGt0 = string

RangeHavingQueryFilterValueGt0 defines model for RangeHavingQueryFilter.Value.Gt.0.

type RangeHavingQueryFilterValueGt1

type RangeHavingQueryFilterValueGt1 = float32

RangeHavingQueryFilterValueGt1 defines model for RangeHavingQueryFilter.Value.Gt.1.

type RangeHavingQueryFilterValueGteq0

type RangeHavingQueryFilterValueGteq0 = string

RangeHavingQueryFilterValueGteq0 defines model for RangeHavingQueryFilter.Value.Gteq.0.

type RangeHavingQueryFilterValueGteq1

type RangeHavingQueryFilterValueGteq1 = float32

RangeHavingQueryFilterValueGteq1 defines model for RangeHavingQueryFilter.Value.Gteq.1.

type RangeHavingQueryFilterValueLt0

type RangeHavingQueryFilterValueLt0 = string

RangeHavingQueryFilterValueLt0 defines model for RangeHavingQueryFilter.Value.Lt.0.

type RangeHavingQueryFilterValueLt1

type RangeHavingQueryFilterValueLt1 = float32

RangeHavingQueryFilterValueLt1 defines model for RangeHavingQueryFilter.Value.Lt.1.

type RangeHavingQueryFilterValueLteq0

type RangeHavingQueryFilterValueLteq0 = string

RangeHavingQueryFilterValueLteq0 defines model for RangeHavingQueryFilter.Value.Lteq.0.

type RangeHavingQueryFilterValueLteq1

type RangeHavingQueryFilterValueLteq1 = float32

RangeHavingQueryFilterValueLteq1 defines model for RangeHavingQueryFilter.Value.Lteq.1.

type RangeHavingQueryFilter_Value_Gt

type RangeHavingQueryFilter_Value_Gt struct {
	// contains filtered or unexported fields
}

RangeHavingQueryFilter_Value_Gt defines model for RangeHavingQueryFilter.Value.Gt.

func (RangeHavingQueryFilter_Value_Gt) AsRangeHavingQueryFilterValueGt0

func (t RangeHavingQueryFilter_Value_Gt) AsRangeHavingQueryFilterValueGt0() (RangeHavingQueryFilterValueGt0, error)

AsRangeHavingQueryFilterValueGt0 returns the union data inside the RangeHavingQueryFilter_Value_Gt as a RangeHavingQueryFilterValueGt0

func (RangeHavingQueryFilter_Value_Gt) AsRangeHavingQueryFilterValueGt1

func (t RangeHavingQueryFilter_Value_Gt) AsRangeHavingQueryFilterValueGt1() (RangeHavingQueryFilterValueGt1, error)

AsRangeHavingQueryFilterValueGt1 returns the union data inside the RangeHavingQueryFilter_Value_Gt as a RangeHavingQueryFilterValueGt1

func (*RangeHavingQueryFilter_Value_Gt) FromRangeHavingQueryFilterValueGt0

func (t *RangeHavingQueryFilter_Value_Gt) FromRangeHavingQueryFilterValueGt0(v RangeHavingQueryFilterValueGt0) error

FromRangeHavingQueryFilterValueGt0 overwrites any union data inside the RangeHavingQueryFilter_Value_Gt as the provided RangeHavingQueryFilterValueGt0

func (*RangeHavingQueryFilter_Value_Gt) FromRangeHavingQueryFilterValueGt1

func (t *RangeHavingQueryFilter_Value_Gt) FromRangeHavingQueryFilterValueGt1(v RangeHavingQueryFilterValueGt1) error

FromRangeHavingQueryFilterValueGt1 overwrites any union data inside the RangeHavingQueryFilter_Value_Gt as the provided RangeHavingQueryFilterValueGt1

func (RangeHavingQueryFilter_Value_Gt) MarshalJSON

func (t RangeHavingQueryFilter_Value_Gt) MarshalJSON() ([]byte, error)

func (*RangeHavingQueryFilter_Value_Gt) MergeRangeHavingQueryFilterValueGt0

func (t *RangeHavingQueryFilter_Value_Gt) MergeRangeHavingQueryFilterValueGt0(v RangeHavingQueryFilterValueGt0) error

MergeRangeHavingQueryFilterValueGt0 performs a merge with any union data inside the RangeHavingQueryFilter_Value_Gt, using the provided RangeHavingQueryFilterValueGt0

func (*RangeHavingQueryFilter_Value_Gt) MergeRangeHavingQueryFilterValueGt1

func (t *RangeHavingQueryFilter_Value_Gt) MergeRangeHavingQueryFilterValueGt1(v RangeHavingQueryFilterValueGt1) error

MergeRangeHavingQueryFilterValueGt1 performs a merge with any union data inside the RangeHavingQueryFilter_Value_Gt, using the provided RangeHavingQueryFilterValueGt1

func (*RangeHavingQueryFilter_Value_Gt) UnmarshalJSON

func (t *RangeHavingQueryFilter_Value_Gt) UnmarshalJSON(b []byte) error

type RangeHavingQueryFilter_Value_Gteq

type RangeHavingQueryFilter_Value_Gteq struct {
	// contains filtered or unexported fields
}

RangeHavingQueryFilter_Value_Gteq defines model for RangeHavingQueryFilter.Value.Gteq.

func (RangeHavingQueryFilter_Value_Gteq) AsRangeHavingQueryFilterValueGteq0

func (t RangeHavingQueryFilter_Value_Gteq) AsRangeHavingQueryFilterValueGteq0() (RangeHavingQueryFilterValueGteq0, error)

AsRangeHavingQueryFilterValueGteq0 returns the union data inside the RangeHavingQueryFilter_Value_Gteq as a RangeHavingQueryFilterValueGteq0

func (RangeHavingQueryFilter_Value_Gteq) AsRangeHavingQueryFilterValueGteq1

func (t RangeHavingQueryFilter_Value_Gteq) AsRangeHavingQueryFilterValueGteq1() (RangeHavingQueryFilterValueGteq1, error)

AsRangeHavingQueryFilterValueGteq1 returns the union data inside the RangeHavingQueryFilter_Value_Gteq as a RangeHavingQueryFilterValueGteq1

func (*RangeHavingQueryFilter_Value_Gteq) FromRangeHavingQueryFilterValueGteq0

func (t *RangeHavingQueryFilter_Value_Gteq) FromRangeHavingQueryFilterValueGteq0(v RangeHavingQueryFilterValueGteq0) error

FromRangeHavingQueryFilterValueGteq0 overwrites any union data inside the RangeHavingQueryFilter_Value_Gteq as the provided RangeHavingQueryFilterValueGteq0

func (*RangeHavingQueryFilter_Value_Gteq) FromRangeHavingQueryFilterValueGteq1

func (t *RangeHavingQueryFilter_Value_Gteq) FromRangeHavingQueryFilterValueGteq1(v RangeHavingQueryFilterValueGteq1) error

FromRangeHavingQueryFilterValueGteq1 overwrites any union data inside the RangeHavingQueryFilter_Value_Gteq as the provided RangeHavingQueryFilterValueGteq1

func (RangeHavingQueryFilter_Value_Gteq) MarshalJSON

func (t RangeHavingQueryFilter_Value_Gteq) MarshalJSON() ([]byte, error)

func (*RangeHavingQueryFilter_Value_Gteq) MergeRangeHavingQueryFilterValueGteq0

func (t *RangeHavingQueryFilter_Value_Gteq) MergeRangeHavingQueryFilterValueGteq0(v RangeHavingQueryFilterValueGteq0) error

MergeRangeHavingQueryFilterValueGteq0 performs a merge with any union data inside the RangeHavingQueryFilter_Value_Gteq, using the provided RangeHavingQueryFilterValueGteq0

func (*RangeHavingQueryFilter_Value_Gteq) MergeRangeHavingQueryFilterValueGteq1

func (t *RangeHavingQueryFilter_Value_Gteq) MergeRangeHavingQueryFilterValueGteq1(v RangeHavingQueryFilterValueGteq1) error

MergeRangeHavingQueryFilterValueGteq1 performs a merge with any union data inside the RangeHavingQueryFilter_Value_Gteq, using the provided RangeHavingQueryFilterValueGteq1

func (*RangeHavingQueryFilter_Value_Gteq) UnmarshalJSON

func (t *RangeHavingQueryFilter_Value_Gteq) UnmarshalJSON(b []byte) error

type RangeHavingQueryFilter_Value_Lt

type RangeHavingQueryFilter_Value_Lt struct {
	// contains filtered or unexported fields
}

RangeHavingQueryFilter_Value_Lt defines model for RangeHavingQueryFilter.Value.Lt.

func (RangeHavingQueryFilter_Value_Lt) AsRangeHavingQueryFilterValueLt0

func (t RangeHavingQueryFilter_Value_Lt) AsRangeHavingQueryFilterValueLt0() (RangeHavingQueryFilterValueLt0, error)

AsRangeHavingQueryFilterValueLt0 returns the union data inside the RangeHavingQueryFilter_Value_Lt as a RangeHavingQueryFilterValueLt0

func (RangeHavingQueryFilter_Value_Lt) AsRangeHavingQueryFilterValueLt1

func (t RangeHavingQueryFilter_Value_Lt) AsRangeHavingQueryFilterValueLt1() (RangeHavingQueryFilterValueLt1, error)

AsRangeHavingQueryFilterValueLt1 returns the union data inside the RangeHavingQueryFilter_Value_Lt as a RangeHavingQueryFilterValueLt1

func (*RangeHavingQueryFilter_Value_Lt) FromRangeHavingQueryFilterValueLt0

func (t *RangeHavingQueryFilter_Value_Lt) FromRangeHavingQueryFilterValueLt0(v RangeHavingQueryFilterValueLt0) error

FromRangeHavingQueryFilterValueLt0 overwrites any union data inside the RangeHavingQueryFilter_Value_Lt as the provided RangeHavingQueryFilterValueLt0

func (*RangeHavingQueryFilter_Value_Lt) FromRangeHavingQueryFilterValueLt1

func (t *RangeHavingQueryFilter_Value_Lt) FromRangeHavingQueryFilterValueLt1(v RangeHavingQueryFilterValueLt1) error

FromRangeHavingQueryFilterValueLt1 overwrites any union data inside the RangeHavingQueryFilter_Value_Lt as the provided RangeHavingQueryFilterValueLt1

func (RangeHavingQueryFilter_Value_Lt) MarshalJSON

func (t RangeHavingQueryFilter_Value_Lt) MarshalJSON() ([]byte, error)

func (*RangeHavingQueryFilter_Value_Lt) MergeRangeHavingQueryFilterValueLt0

func (t *RangeHavingQueryFilter_Value_Lt) MergeRangeHavingQueryFilterValueLt0(v RangeHavingQueryFilterValueLt0) error

MergeRangeHavingQueryFilterValueLt0 performs a merge with any union data inside the RangeHavingQueryFilter_Value_Lt, using the provided RangeHavingQueryFilterValueLt0

func (*RangeHavingQueryFilter_Value_Lt) MergeRangeHavingQueryFilterValueLt1

func (t *RangeHavingQueryFilter_Value_Lt) MergeRangeHavingQueryFilterValueLt1(v RangeHavingQueryFilterValueLt1) error

MergeRangeHavingQueryFilterValueLt1 performs a merge with any union data inside the RangeHavingQueryFilter_Value_Lt, using the provided RangeHavingQueryFilterValueLt1

func (*RangeHavingQueryFilter_Value_Lt) UnmarshalJSON

func (t *RangeHavingQueryFilter_Value_Lt) UnmarshalJSON(b []byte) error

type RangeHavingQueryFilter_Value_Lteq

type RangeHavingQueryFilter_Value_Lteq struct {
	// contains filtered or unexported fields
}

RangeHavingQueryFilter_Value_Lteq defines model for RangeHavingQueryFilter.Value.Lteq.

func (RangeHavingQueryFilter_Value_Lteq) AsRangeHavingQueryFilterValueLteq0

func (t RangeHavingQueryFilter_Value_Lteq) AsRangeHavingQueryFilterValueLteq0() (RangeHavingQueryFilterValueLteq0, error)

AsRangeHavingQueryFilterValueLteq0 returns the union data inside the RangeHavingQueryFilter_Value_Lteq as a RangeHavingQueryFilterValueLteq0

func (RangeHavingQueryFilter_Value_Lteq) AsRangeHavingQueryFilterValueLteq1

func (t RangeHavingQueryFilter_Value_Lteq) AsRangeHavingQueryFilterValueLteq1() (RangeHavingQueryFilterValueLteq1, error)

AsRangeHavingQueryFilterValueLteq1 returns the union data inside the RangeHavingQueryFilter_Value_Lteq as a RangeHavingQueryFilterValueLteq1

func (*RangeHavingQueryFilter_Value_Lteq) FromRangeHavingQueryFilterValueLteq0

func (t *RangeHavingQueryFilter_Value_Lteq) FromRangeHavingQueryFilterValueLteq0(v RangeHavingQueryFilterValueLteq0) error

FromRangeHavingQueryFilterValueLteq0 overwrites any union data inside the RangeHavingQueryFilter_Value_Lteq as the provided RangeHavingQueryFilterValueLteq0

func (*RangeHavingQueryFilter_Value_Lteq) FromRangeHavingQueryFilterValueLteq1

func (t *RangeHavingQueryFilter_Value_Lteq) FromRangeHavingQueryFilterValueLteq1(v RangeHavingQueryFilterValueLteq1) error

FromRangeHavingQueryFilterValueLteq1 overwrites any union data inside the RangeHavingQueryFilter_Value_Lteq as the provided RangeHavingQueryFilterValueLteq1

func (RangeHavingQueryFilter_Value_Lteq) MarshalJSON

func (t RangeHavingQueryFilter_Value_Lteq) MarshalJSON() ([]byte, error)

func (*RangeHavingQueryFilter_Value_Lteq) MergeRangeHavingQueryFilterValueLteq0

func (t *RangeHavingQueryFilter_Value_Lteq) MergeRangeHavingQueryFilterValueLteq0(v RangeHavingQueryFilterValueLteq0) error

MergeRangeHavingQueryFilterValueLteq0 performs a merge with any union data inside the RangeHavingQueryFilter_Value_Lteq, using the provided RangeHavingQueryFilterValueLteq0

func (*RangeHavingQueryFilter_Value_Lteq) MergeRangeHavingQueryFilterValueLteq1

func (t *RangeHavingQueryFilter_Value_Lteq) MergeRangeHavingQueryFilterValueLteq1(v RangeHavingQueryFilterValueLteq1) error

MergeRangeHavingQueryFilterValueLteq1 performs a merge with any union data inside the RangeHavingQueryFilter_Value_Lteq, using the provided RangeHavingQueryFilterValueLteq1

func (*RangeHavingQueryFilter_Value_Lteq) UnmarshalJSON

func (t *RangeHavingQueryFilter_Value_Lteq) UnmarshalJSON(b []byte) error

type RangeQueryFilter

type RangeQueryFilter struct {
	// Field Field name. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	//
	// Example: name
	Field string `json:"field"`

	// Op Example: $range
	Op RangeQueryFilterOp `json:"op"`

	// Value Example: {"gt":2,"lt":10}
	Value struct {
		Gt   *RangeQueryFilter_Value_Gt   `json:"gt,omitempty"`
		Gteq *RangeQueryFilter_Value_Gteq `json:"gteq,omitempty"`
		Lt   *RangeQueryFilter_Value_Lt   `json:"lt,omitempty"`
		Lteq *RangeQueryFilter_Value_Lteq `json:"lteq,omitempty"`
	} `json:"value"`
}

RangeQueryFilter defines model for RangeQueryFilter.

type RangeQueryFilterOp

type RangeQueryFilterOp string

RangeQueryFilterOp Example: $range

const (
	RangeQueryFilterOpRange RangeQueryFilterOp = "$range"
)

Defines values for RangeQueryFilterOp.

func (RangeQueryFilterOp) Valid

func (e RangeQueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the RangeQueryFilterOp enum.

type RangeQueryFilterValueGt0

type RangeQueryFilterValueGt0 = string

RangeQueryFilterValueGt0 defines model for RangeQueryFilter.Value.Gt.0.

type RangeQueryFilterValueGt1

type RangeQueryFilterValueGt1 = float32

RangeQueryFilterValueGt1 defines model for RangeQueryFilter.Value.Gt.1.

type RangeQueryFilterValueGteq0

type RangeQueryFilterValueGteq0 = string

RangeQueryFilterValueGteq0 defines model for RangeQueryFilter.Value.Gteq.0.

type RangeQueryFilterValueGteq1

type RangeQueryFilterValueGteq1 = float32

RangeQueryFilterValueGteq1 defines model for RangeQueryFilter.Value.Gteq.1.

type RangeQueryFilterValueLt0

type RangeQueryFilterValueLt0 = string

RangeQueryFilterValueLt0 defines model for RangeQueryFilter.Value.Lt.0.

type RangeQueryFilterValueLt1

type RangeQueryFilterValueLt1 = float32

RangeQueryFilterValueLt1 defines model for RangeQueryFilter.Value.Lt.1.

type RangeQueryFilterValueLteq0

type RangeQueryFilterValueLteq0 = string

RangeQueryFilterValueLteq0 defines model for RangeQueryFilter.Value.Lteq.0.

type RangeQueryFilterValueLteq1

type RangeQueryFilterValueLteq1 = float32

RangeQueryFilterValueLteq1 defines model for RangeQueryFilter.Value.Lteq.1.

type RangeQueryFilter_Value_Gt

type RangeQueryFilter_Value_Gt struct {
	// contains filtered or unexported fields
}

RangeQueryFilter_Value_Gt defines model for RangeQueryFilter.Value.Gt.

func (RangeQueryFilter_Value_Gt) AsRangeQueryFilterValueGt0

func (t RangeQueryFilter_Value_Gt) AsRangeQueryFilterValueGt0() (RangeQueryFilterValueGt0, error)

AsRangeQueryFilterValueGt0 returns the union data inside the RangeQueryFilter_Value_Gt as a RangeQueryFilterValueGt0

func (RangeQueryFilter_Value_Gt) AsRangeQueryFilterValueGt1

func (t RangeQueryFilter_Value_Gt) AsRangeQueryFilterValueGt1() (RangeQueryFilterValueGt1, error)

AsRangeQueryFilterValueGt1 returns the union data inside the RangeQueryFilter_Value_Gt as a RangeQueryFilterValueGt1

func (*RangeQueryFilter_Value_Gt) FromRangeQueryFilterValueGt0

func (t *RangeQueryFilter_Value_Gt) FromRangeQueryFilterValueGt0(v RangeQueryFilterValueGt0) error

FromRangeQueryFilterValueGt0 overwrites any union data inside the RangeQueryFilter_Value_Gt as the provided RangeQueryFilterValueGt0

func (*RangeQueryFilter_Value_Gt) FromRangeQueryFilterValueGt1

func (t *RangeQueryFilter_Value_Gt) FromRangeQueryFilterValueGt1(v RangeQueryFilterValueGt1) error

FromRangeQueryFilterValueGt1 overwrites any union data inside the RangeQueryFilter_Value_Gt as the provided RangeQueryFilterValueGt1

func (RangeQueryFilter_Value_Gt) MarshalJSON

func (t RangeQueryFilter_Value_Gt) MarshalJSON() ([]byte, error)

func (*RangeQueryFilter_Value_Gt) MergeRangeQueryFilterValueGt0

func (t *RangeQueryFilter_Value_Gt) MergeRangeQueryFilterValueGt0(v RangeQueryFilterValueGt0) error

MergeRangeQueryFilterValueGt0 performs a merge with any union data inside the RangeQueryFilter_Value_Gt, using the provided RangeQueryFilterValueGt0

func (*RangeQueryFilter_Value_Gt) MergeRangeQueryFilterValueGt1

func (t *RangeQueryFilter_Value_Gt) MergeRangeQueryFilterValueGt1(v RangeQueryFilterValueGt1) error

MergeRangeQueryFilterValueGt1 performs a merge with any union data inside the RangeQueryFilter_Value_Gt, using the provided RangeQueryFilterValueGt1

func (*RangeQueryFilter_Value_Gt) UnmarshalJSON

func (t *RangeQueryFilter_Value_Gt) UnmarshalJSON(b []byte) error

type RangeQueryFilter_Value_Gteq

type RangeQueryFilter_Value_Gteq struct {
	// contains filtered or unexported fields
}

RangeQueryFilter_Value_Gteq defines model for RangeQueryFilter.Value.Gteq.

func (RangeQueryFilter_Value_Gteq) AsRangeQueryFilterValueGteq0

func (t RangeQueryFilter_Value_Gteq) AsRangeQueryFilterValueGteq0() (RangeQueryFilterValueGteq0, error)

AsRangeQueryFilterValueGteq0 returns the union data inside the RangeQueryFilter_Value_Gteq as a RangeQueryFilterValueGteq0

func (RangeQueryFilter_Value_Gteq) AsRangeQueryFilterValueGteq1

func (t RangeQueryFilter_Value_Gteq) AsRangeQueryFilterValueGteq1() (RangeQueryFilterValueGteq1, error)

AsRangeQueryFilterValueGteq1 returns the union data inside the RangeQueryFilter_Value_Gteq as a RangeQueryFilterValueGteq1

func (*RangeQueryFilter_Value_Gteq) FromRangeQueryFilterValueGteq0

func (t *RangeQueryFilter_Value_Gteq) FromRangeQueryFilterValueGteq0(v RangeQueryFilterValueGteq0) error

FromRangeQueryFilterValueGteq0 overwrites any union data inside the RangeQueryFilter_Value_Gteq as the provided RangeQueryFilterValueGteq0

func (*RangeQueryFilter_Value_Gteq) FromRangeQueryFilterValueGteq1

func (t *RangeQueryFilter_Value_Gteq) FromRangeQueryFilterValueGteq1(v RangeQueryFilterValueGteq1) error

FromRangeQueryFilterValueGteq1 overwrites any union data inside the RangeQueryFilter_Value_Gteq as the provided RangeQueryFilterValueGteq1

func (RangeQueryFilter_Value_Gteq) MarshalJSON

func (t RangeQueryFilter_Value_Gteq) MarshalJSON() ([]byte, error)

func (*RangeQueryFilter_Value_Gteq) MergeRangeQueryFilterValueGteq0

func (t *RangeQueryFilter_Value_Gteq) MergeRangeQueryFilterValueGteq0(v RangeQueryFilterValueGteq0) error

MergeRangeQueryFilterValueGteq0 performs a merge with any union data inside the RangeQueryFilter_Value_Gteq, using the provided RangeQueryFilterValueGteq0

func (*RangeQueryFilter_Value_Gteq) MergeRangeQueryFilterValueGteq1

func (t *RangeQueryFilter_Value_Gteq) MergeRangeQueryFilterValueGteq1(v RangeQueryFilterValueGteq1) error

MergeRangeQueryFilterValueGteq1 performs a merge with any union data inside the RangeQueryFilter_Value_Gteq, using the provided RangeQueryFilterValueGteq1

func (*RangeQueryFilter_Value_Gteq) UnmarshalJSON

func (t *RangeQueryFilter_Value_Gteq) UnmarshalJSON(b []byte) error

type RangeQueryFilter_Value_Lt

type RangeQueryFilter_Value_Lt struct {
	// contains filtered or unexported fields
}

RangeQueryFilter_Value_Lt defines model for RangeQueryFilter.Value.Lt.

func (RangeQueryFilter_Value_Lt) AsRangeQueryFilterValueLt0

func (t RangeQueryFilter_Value_Lt) AsRangeQueryFilterValueLt0() (RangeQueryFilterValueLt0, error)

AsRangeQueryFilterValueLt0 returns the union data inside the RangeQueryFilter_Value_Lt as a RangeQueryFilterValueLt0

func (RangeQueryFilter_Value_Lt) AsRangeQueryFilterValueLt1

func (t RangeQueryFilter_Value_Lt) AsRangeQueryFilterValueLt1() (RangeQueryFilterValueLt1, error)

AsRangeQueryFilterValueLt1 returns the union data inside the RangeQueryFilter_Value_Lt as a RangeQueryFilterValueLt1

func (*RangeQueryFilter_Value_Lt) FromRangeQueryFilterValueLt0

func (t *RangeQueryFilter_Value_Lt) FromRangeQueryFilterValueLt0(v RangeQueryFilterValueLt0) error

FromRangeQueryFilterValueLt0 overwrites any union data inside the RangeQueryFilter_Value_Lt as the provided RangeQueryFilterValueLt0

func (*RangeQueryFilter_Value_Lt) FromRangeQueryFilterValueLt1

func (t *RangeQueryFilter_Value_Lt) FromRangeQueryFilterValueLt1(v RangeQueryFilterValueLt1) error

FromRangeQueryFilterValueLt1 overwrites any union data inside the RangeQueryFilter_Value_Lt as the provided RangeQueryFilterValueLt1

func (RangeQueryFilter_Value_Lt) MarshalJSON

func (t RangeQueryFilter_Value_Lt) MarshalJSON() ([]byte, error)

func (*RangeQueryFilter_Value_Lt) MergeRangeQueryFilterValueLt0

func (t *RangeQueryFilter_Value_Lt) MergeRangeQueryFilterValueLt0(v RangeQueryFilterValueLt0) error

MergeRangeQueryFilterValueLt0 performs a merge with any union data inside the RangeQueryFilter_Value_Lt, using the provided RangeQueryFilterValueLt0

func (*RangeQueryFilter_Value_Lt) MergeRangeQueryFilterValueLt1

func (t *RangeQueryFilter_Value_Lt) MergeRangeQueryFilterValueLt1(v RangeQueryFilterValueLt1) error

MergeRangeQueryFilterValueLt1 performs a merge with any union data inside the RangeQueryFilter_Value_Lt, using the provided RangeQueryFilterValueLt1

func (*RangeQueryFilter_Value_Lt) UnmarshalJSON

func (t *RangeQueryFilter_Value_Lt) UnmarshalJSON(b []byte) error

type RangeQueryFilter_Value_Lteq

type RangeQueryFilter_Value_Lteq struct {
	// contains filtered or unexported fields
}

RangeQueryFilter_Value_Lteq defines model for RangeQueryFilter.Value.Lteq.

func (RangeQueryFilter_Value_Lteq) AsRangeQueryFilterValueLteq0

func (t RangeQueryFilter_Value_Lteq) AsRangeQueryFilterValueLteq0() (RangeQueryFilterValueLteq0, error)

AsRangeQueryFilterValueLteq0 returns the union data inside the RangeQueryFilter_Value_Lteq as a RangeQueryFilterValueLteq0

func (RangeQueryFilter_Value_Lteq) AsRangeQueryFilterValueLteq1

func (t RangeQueryFilter_Value_Lteq) AsRangeQueryFilterValueLteq1() (RangeQueryFilterValueLteq1, error)

AsRangeQueryFilterValueLteq1 returns the union data inside the RangeQueryFilter_Value_Lteq as a RangeQueryFilterValueLteq1

func (*RangeQueryFilter_Value_Lteq) FromRangeQueryFilterValueLteq0

func (t *RangeQueryFilter_Value_Lteq) FromRangeQueryFilterValueLteq0(v RangeQueryFilterValueLteq0) error

FromRangeQueryFilterValueLteq0 overwrites any union data inside the RangeQueryFilter_Value_Lteq as the provided RangeQueryFilterValueLteq0

func (*RangeQueryFilter_Value_Lteq) FromRangeQueryFilterValueLteq1

func (t *RangeQueryFilter_Value_Lteq) FromRangeQueryFilterValueLteq1(v RangeQueryFilterValueLteq1) error

FromRangeQueryFilterValueLteq1 overwrites any union data inside the RangeQueryFilter_Value_Lteq as the provided RangeQueryFilterValueLteq1

func (RangeQueryFilter_Value_Lteq) MarshalJSON

func (t RangeQueryFilter_Value_Lteq) MarshalJSON() ([]byte, error)

func (*RangeQueryFilter_Value_Lteq) MergeRangeQueryFilterValueLteq0

func (t *RangeQueryFilter_Value_Lteq) MergeRangeQueryFilterValueLteq0(v RangeQueryFilterValueLteq0) error

MergeRangeQueryFilterValueLteq0 performs a merge with any union data inside the RangeQueryFilter_Value_Lteq, using the provided RangeQueryFilterValueLteq0

func (*RangeQueryFilter_Value_Lteq) MergeRangeQueryFilterValueLteq1

func (t *RangeQueryFilter_Value_Lteq) MergeRangeQueryFilterValueLteq1(v RangeQueryFilterValueLteq1) error

MergeRangeQueryFilterValueLteq1 performs a merge with any union data inside the RangeQueryFilter_Value_Lteq, using the provided RangeQueryFilterValueLteq1

func (*RangeQueryFilter_Value_Lteq) UnmarshalJSON

func (t *RangeQueryFilter_Value_Lteq) UnmarshalJSON(b []byte) error

type RecordInvalidError

type RecordInvalidError struct {
	// Message reason for error message
	Message *string                 `json:"message,omitempty"`
	Type    *RecordInvalidErrorType `json:"type,omitempty"`
}

RecordInvalidError defines model for RecordInvalidError.

type RecordInvalidErrorType

type RecordInvalidErrorType string

RecordInvalidErrorType defines model for RecordInvalidError.Type.

const (
	RecordInvalid RecordInvalidErrorType = "record_invalid"
)

Defines values for RecordInvalidErrorType.

func (RecordInvalidErrorType) Valid

func (e RecordInvalidErrorType) Valid() bool

Valid indicates whether the value is a known member of the RecordInvalidErrorType enum.

type RegistrationFilterRequest

type RegistrationFilterRequest struct {
	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`

	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand *[]string `json:"expand,omitempty"`

	// MatchingUserId User id related connected with the request
	//
	// Example: 123
	MatchingUserId *string `json:"matching_user_id,omitempty"`
	Params         *struct {
		// Email The email address sent by the user
		//
		// Example: Rhea.Franecki@example.org
		Email *string `json:"email,omitempty"`

		// Phone The phone number sent by the user
		//
		// Example: +16175551212
		Phone *string `json:"phone,omitempty"`

		// Username The username sent by the user
		//
		// Example: superhero123
		Username *string `json:"username,omitempty"`
	} `json:"params,omitempty"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](https://docs.castle.io/docs/quickstart)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool                            `json:"skip_request_token_validation,omitempty"`
	Status                     *RegistrationFilterRequestStatus `json:"status,omitempty"`

	// Type Castle supported events available for this endpoint
	Type RegistrationFilterRequestType `json:"type"`
	User *struct {
		// Email The identified user's email address
		//
		// Example: Rhea.Franecki@example.org
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Email *string `json:"email,omitempty"`

		// Phone The identified user's phone number
		//
		// Example: +16175551212
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Phone *string `json:"phone,omitempty"`
	} `json:"user,omitempty"`
}

RegistrationFilterRequest defines model for RegistrationFilterRequest.

type RegistrationFilterRequestStatus

type RegistrationFilterRequestStatus string

RegistrationFilterRequestStatus defines model for RegistrationFilterRequest.Status.

const (
	RegistrationFilterRequestStatusAttempted RegistrationFilterRequestStatus = "$attempted"
	RegistrationFilterRequestStatusFailed    RegistrationFilterRequestStatus = "$failed"
)

Defines values for RegistrationFilterRequestStatus.

func (RegistrationFilterRequestStatus) Valid

Valid indicates whether the value is a known member of the RegistrationFilterRequestStatus enum.

type RegistrationFilterRequestType

type RegistrationFilterRequestType string

RegistrationFilterRequestType Castle supported events available for this endpoint

const (
	RegistrationFilterRequestTypeRegistration RegistrationFilterRequestType = "$registration"
)

Defines values for RegistrationFilterRequestType.

func (RegistrationFilterRequestType) Valid

Valid indicates whether the value is a known member of the RegistrationFilterRequestType enum.

type RegistrationResponse

type RegistrationResponse struct {
	// Agent AI agent identified for this event/context. Omitted when no agent is identified
	Agent *Agent `json:"agent,omitempty"`

	// Authenticated Authenticated or Anonymous visitor
	//
	// Example: true
	Authenticated *bool `json:"authenticated,omitempty"`

	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`
	Behavior             *struct {
		// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
		Fingerprint nullable.Nullable[string] `json:"fingerprint,omitempty"`
	} `json:"behavior,omitempty"`

	// CreatedAt Event timestamp
	//
	// Example: 2021-09-27T16:46:38.313Z
	CreatedAt *time.Time `json:"created_at,omitempty"`
	Device    struct {
		// Fingerprint Example: ohvjn8adSnetYTzZ8B7bOP
		Fingerprint nullable.Nullable[string] `json:"fingerprint"`
		Hardware    *struct {
			Brand   nullable.Nullable[string] `json:"brand"`
			Display struct {
				// Height Example: 982
				Height nullable.Nullable[int] `json:"height"`

				// Width Example: 1512
				Width nullable.Nullable[int] `json:"width"`
			} `json:"display"`
			Model struct {
				Code nullable.Nullable[string] `json:"code"`
				Name nullable.Nullable[string] `json:"name"`
			} `json:"model"`
			Name nullable.Nullable[string] `json:"name"`

			// Type Example: computer
			Type string `json:"type"`
		} `json:"hardware,omitempty"`
		Os *struct {
			// Name Example: Windows 10
			Name    string `json:"name"`
			Version struct {
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 10
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"os,omitempty"`
		Screen *struct {
			// Orientation Example: landscape
			Orientation nullable.Nullable[string] `json:"orientation,omitempty"`

			// Screen Example: 2
			Screen nullable.Nullable[int] `json:"screen,omitempty"`
		} `json:"screen,omitempty"`
		Software *struct {
			// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
			Fingerprint nullable.Nullable[string] `json:"fingerprint"`

			// Languages Example: ["en-us","en"]
			Languages []string `json:"languages"`

			// Name Example: Chrome
			Name string `json:"name"`

			// Type Example: browser
			Type    string `json:"type"`
			Version struct {
				// Full Example: 91.0.4472
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 91
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"software,omitempty"`
		Timezone *struct {
			// Name Example: America/New_York
			Name nullable.Nullable[string] `json:"name,omitempty"`

			// Offset Time offset from UTC measured in minutes
			//
			// Example: -300
			Offset nullable.Nullable[int] `json:"offset,omitempty"`
		} `json:"timezone,omitempty"`

		// Token Device token generated or found
		//
		// Example: eyJhbGciOiJIUzI1NiJ9.eyJ0b2tlbiI6IjEzc2x6RzNHQ0RzeFJCejdJWF9SUDJkV1Y0RFgiLCJxdWFsaWZpZXIiOiJBUUlEQ2pFME5EZzFPREF3T1RZIiwiYW5vbnltb3VzIjpmYWxzZSwidmVyc2lvbiI6MC4zfQ.y3vOt-W1IpOi7Oyn1jll1uDw1YL-JPZtNMTU-PyaYhQ
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Token *string `json:"token,omitempty"`

		// UserAgent Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
		UserAgent *string `json:"user_agent,omitempty"`
	} `json:"device"`

	// Email User Email Object
	Email *struct {
		// Disposable Example: false
		Disposable *bool `json:"disposable,omitempty"`

		// Domain Example: gmail.com
		Domain        *string `json:"domain,omitempty"`
		DomainDetails *struct {
			// CreatedAt Example: 2021-09-27T16:46:38.313Z
			CreatedAt   *time.Time `json:"created_at,omitempty"`
			DmarcRecord *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"dmarc_record,omitempty"`

			// ExpiresAt Example: 2021-09-27T16:46:38.313Z
			ExpiresAt *time.Time `json:"expires_at,omitempty"`
			MxRecords *struct {
				// NullMx Example: false
				NullMx nullable.Nullable[bool] `json:"null_mx,omitempty"`
			} `json:"mx_records,omitempty"`

			// Nameservers Example: ["ns1.hosting.com","ns2.hosting.com","ns3.hosting.com"]
			Nameservers *[]string `json:"nameservers,omitempty"`
			Registrar   *string   `json:"registrar,omitempty"`
			SpfRecord   *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"spf_record,omitempty"`

			// UpdatedAt Example: 2021-09-27T16:46:38.313Z
			UpdatedAt *time.Time `json:"updated_at,omitempty"`
		} `json:"domain_details,omitempty"`

		// Normalized Example: user.email@example.com
		Normalized *string `json:"normalized,omitempty"`

		// Unreachable Example: false
		Unreachable *bool `json:"unreachable,omitempty"`
	} `json:"email,omitempty"`

	// Endpoint Castle Request Endpoint
	//
	// Example: /v1/risk
	Endpoint *string `json:"endpoint,omitempty"`

	// Id Castle Event ID
	//
	// Example: ASZoelALT5-PaVw2pAVMXg
	Id *string `json:"id,omitempty"`
	Ip *IP     `json:"ip,omitempty"`

	// Metrics Metrics triggered for this event/context
	//
	// Example: {"1":{},"2":{},"3":{},"4":{},"5":{}}
	Metrics *map[string]map[string]interface{} `json:"metrics,omitempty"`

	// Name Event Full Name
	//
	// Example: Login Succeeded
	Name *string `json:"name,omitempty"`

	// Params The params object
	Params *EventParams `json:"params,omitempty"`

	// Policy The matching policy
	Policy  Policy   `json:"policy"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties
	Properties *Properties `json:"properties,omitempty"`

	// Risk Deprecated Risk Score - use `scores` instead. Calculated only when `request_token` and `context` are provided.
	//
	// Example: 0.65
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Risk *float32 `json:"risk,omitempty"`

	// Scores Castle Scores breakdown. Calculated only when `request_token` and `context` are provided.
	Scores *struct {
		AccountAbuse struct {
			// Score Calculated Account Abuse Risk Score.
			//
			// Example: 0.65
			Score *float32 `json:"score,omitempty"`
		} `json:"account_abuse"`
		AccountTakeover struct {
			// Score Calculated Account Takeover Risk Score.
			//
			// Example: 0.77
			Score *float32 `json:"score,omitempty"`
		} `json:"account_takeover"`
		Bot struct {
			// Score Calculated Bot Risk Score.
			//
			// Example: 0.34
			Score *float32 `json:"score,omitempty"`
		} `json:"bot"`
	} `json:"scores,omitempty"`

	// Sdks Castle SDKs details
	Sdks *struct {
		Client *struct {
			// Name Example: castle-web
			Name *string `json:"name,omitempty"`

			// Version Example: 2.0.0
			Version *string `json:"version,omitempty"`
		} `json:"client,omitempty"`
		Server *struct {
			// Name Example: castle-postman
			Name *string `json:"name,omitempty"`

			// Version Example: 0.1.0
			Version *string `json:"version,omitempty"`
		} `json:"server,omitempty"`
	} `json:"sdks,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// Signals Signals triggered for this event/context
	//
	// Example: {"bot_behavior":{},"disposable_email":{},"multiple_accounts_per_device":{},"proxy_ip":{},"residential_proxy_access":{},"spoofed_device":{}}
	Signals *map[string]map[string]interface{} `json:"signals,omitempty"`
	Status  *RegistrationResponseStatus        `json:"status,omitempty"`

	// Type Castle supported events available for this endpoint
	Type RegistrationResponseType `json:"type"`
	User *UserForMonitorAndRisk   `json:"user,omitempty"`
}

RegistrationResponse defines model for RegistrationResponse.

type RegistrationResponseStatus

type RegistrationResponseStatus string

RegistrationResponseStatus defines model for RegistrationResponse.Status.

const (
	RegistrationResponseStatusAttempted RegistrationResponseStatus = "$attempted"
	RegistrationResponseStatusFailed    RegistrationResponseStatus = "$failed"
	RegistrationResponseStatusSucceeded RegistrationResponseStatus = "$succeeded"
)

Defines values for RegistrationResponseStatus.

func (RegistrationResponseStatus) Valid

func (e RegistrationResponseStatus) Valid() bool

Valid indicates whether the value is a known member of the RegistrationResponseStatus enum.

type RegistrationResponseType

type RegistrationResponseType string

RegistrationResponseType Castle supported events available for this endpoint

const (
	RegistrationResponseTypeRegistration RegistrationResponseType = "$registration"
)

Defines values for RegistrationResponseType.

func (RegistrationResponseType) Valid

func (e RegistrationResponseType) Valid() bool

Valid indicates whether the value is a known member of the RegistrationResponseType enum.

type RegistrationRiskRequest

type RegistrationRiskRequest struct {
	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`

	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand  *[]string `json:"expand,omitempty"`
	Product *Product  `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](/v1/getting-started)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool                         `json:"skip_request_token_validation,omitempty"`
	Status                     RegistrationRiskRequestStatus `json:"status"`

	// Type Castle supported events available for this endpoint
	Type RegistrationRiskRequestType `json:"type"`
	User UserForMonitorAndRisk       `json:"user"`
}

RegistrationRiskRequest defines model for RegistrationRiskRequest.

type RegistrationRiskRequestStatus

type RegistrationRiskRequestStatus string

RegistrationRiskRequestStatus defines model for RegistrationRiskRequest.Status.

const (
	RegistrationRiskRequestStatusSucceeded RegistrationRiskRequestStatus = "$succeeded"
)

Defines values for RegistrationRiskRequestStatus.

func (RegistrationRiskRequestStatus) Valid

Valid indicates whether the value is a known member of the RegistrationRiskRequestStatus enum.

type RegistrationRiskRequestType

type RegistrationRiskRequestType string

RegistrationRiskRequestType Castle supported events available for this endpoint

const (
	RegistrationRiskRequestTypeRegistration RegistrationRiskRequestType = "$registration"
)

Defines values for RegistrationRiskRequestType.

func (RegistrationRiskRequestType) Valid

Valid indicates whether the value is a known member of the RegistrationRiskRequestType enum.

type RelativeRangeQueryFilter

type RelativeRangeQueryFilter struct {
	// Field Field name. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	//
	// Example: name
	Field string `json:"field"`

	// Op Example: $relative_range
	Op RelativeRangeQueryFilterOp `json:"op"`

	// Value Example: {"gt":3600}
	Value struct {
		Gt   *int `json:"gt,omitempty"`
		Gteq *int `json:"gteq,omitempty"`
		Lt   *int `json:"lt,omitempty"`
		Lteq *int `json:"lteq,omitempty"`
	} `json:"value"`
}

RelativeRangeQueryFilter It allows querying data for relative time, eq. events within the last 1 hour.

Example: {"field":"created_at","op":"$relative_range","value":{"gt":3600}}

type RelativeRangeQueryFilterOp

type RelativeRangeQueryFilterOp string

RelativeRangeQueryFilterOp Example: $relative_range

const (
	RelativeRange RelativeRangeQueryFilterOp = "$relative_range"
)

Defines values for RelativeRangeQueryFilterOp.

func (RelativeRangeQueryFilterOp) Valid

func (e RelativeRangeQueryFilterOp) Valid() bool

Valid indicates whether the value is a known member of the RelativeRangeQueryFilterOp enum.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RequestWithExpand

type RequestWithExpand struct {
	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand *[]string `json:"expand,omitempty"`
}

RequestWithExpand defines model for RequestWithExpand.

type RequestWithOptionalValidation

type RequestWithOptionalValidation struct {
	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool `json:"skip_request_token_validation,omitempty"`
}

RequestWithOptionalValidation defines model for RequestWithOptionalValidation.

type Risk

type Risk struct {
	// contains filtered or unexported fields
}

Risk defines model for Risk.

func (Risk) AsChallengeRiskRequest

func (t Risk) AsChallengeRiskRequest() (ChallengeRiskRequest, error)

AsChallengeRiskRequest returns the union data inside the Risk as a ChallengeRiskRequest

func (Risk) AsCustomRiskRequest

func (t Risk) AsCustomRiskRequest() (CustomRiskRequest, error)

AsCustomRiskRequest returns the union data inside the Risk as a CustomRiskRequest

func (Risk) AsLoginRiskRequest

func (t Risk) AsLoginRiskRequest() (LoginRiskRequest, error)

AsLoginRiskRequest returns the union data inside the Risk as a LoginRiskRequest

func (Risk) AsLogoutRiskRequest

func (t Risk) AsLogoutRiskRequest() (LogoutRiskRequest, error)

AsLogoutRiskRequest returns the union data inside the Risk as a LogoutRiskRequest

func (Risk) AsProfileResetRiskRequest

func (t Risk) AsProfileResetRiskRequest() (ProfileResetRiskRequest, error)

AsProfileResetRiskRequest returns the union data inside the Risk as a ProfileResetRiskRequest

func (Risk) AsProfileUpdateRiskRequest

func (t Risk) AsProfileUpdateRiskRequest() (ProfileUpdateRiskRequest, error)

AsProfileUpdateRiskRequest returns the union data inside the Risk as a ProfileUpdateRiskRequest

func (Risk) AsRegistrationRiskRequest

func (t Risk) AsRegistrationRiskRequest() (RegistrationRiskRequest, error)

AsRegistrationRiskRequest returns the union data inside the Risk as a RegistrationRiskRequest

func (Risk) AsTransactionRiskRequest

func (t Risk) AsTransactionRiskRequest() (TransactionRiskRequest, error)

AsTransactionRiskRequest returns the union data inside the Risk as a TransactionRiskRequest

func (Risk) Discriminator

func (t Risk) Discriminator() (string, error)

func (*Risk) FromChallengeRiskRequest

func (t *Risk) FromChallengeRiskRequest(v ChallengeRiskRequest) error

FromChallengeRiskRequest overwrites any union data inside the Risk as the provided ChallengeRiskRequest

func (*Risk) FromCustomRiskRequest

func (t *Risk) FromCustomRiskRequest(v CustomRiskRequest) error

FromCustomRiskRequest overwrites any union data inside the Risk as the provided CustomRiskRequest

func (*Risk) FromLoginRiskRequest

func (t *Risk) FromLoginRiskRequest(v LoginRiskRequest) error

FromLoginRiskRequest overwrites any union data inside the Risk as the provided LoginRiskRequest

func (*Risk) FromLogoutRiskRequest

func (t *Risk) FromLogoutRiskRequest(v LogoutRiskRequest) error

FromLogoutRiskRequest overwrites any union data inside the Risk as the provided LogoutRiskRequest

func (*Risk) FromProfileResetRiskRequest

func (t *Risk) FromProfileResetRiskRequest(v ProfileResetRiskRequest) error

FromProfileResetRiskRequest overwrites any union data inside the Risk as the provided ProfileResetRiskRequest

func (*Risk) FromProfileUpdateRiskRequest

func (t *Risk) FromProfileUpdateRiskRequest(v ProfileUpdateRiskRequest) error

FromProfileUpdateRiskRequest overwrites any union data inside the Risk as the provided ProfileUpdateRiskRequest

func (*Risk) FromRegistrationRiskRequest

func (t *Risk) FromRegistrationRiskRequest(v RegistrationRiskRequest) error

FromRegistrationRiskRequest overwrites any union data inside the Risk as the provided RegistrationRiskRequest

func (*Risk) FromTransactionRiskRequest

func (t *Risk) FromTransactionRiskRequest(v TransactionRiskRequest) error

FromTransactionRiskRequest overwrites any union data inside the Risk as the provided TransactionRiskRequest

func (Risk) MarshalJSON

func (t Risk) MarshalJSON() ([]byte, error)

func (*Risk) MergeChallengeRiskRequest

func (t *Risk) MergeChallengeRiskRequest(v ChallengeRiskRequest) error

MergeChallengeRiskRequest performs a merge with any union data inside the Risk, using the provided ChallengeRiskRequest

func (*Risk) MergeCustomRiskRequest

func (t *Risk) MergeCustomRiskRequest(v CustomRiskRequest) error

MergeCustomRiskRequest performs a merge with any union data inside the Risk, using the provided CustomRiskRequest

func (*Risk) MergeLoginRiskRequest

func (t *Risk) MergeLoginRiskRequest(v LoginRiskRequest) error

MergeLoginRiskRequest performs a merge with any union data inside the Risk, using the provided LoginRiskRequest

func (*Risk) MergeLogoutRiskRequest

func (t *Risk) MergeLogoutRiskRequest(v LogoutRiskRequest) error

MergeLogoutRiskRequest performs a merge with any union data inside the Risk, using the provided LogoutRiskRequest

func (*Risk) MergeProfileResetRiskRequest

func (t *Risk) MergeProfileResetRiskRequest(v ProfileResetRiskRequest) error

MergeProfileResetRiskRequest performs a merge with any union data inside the Risk, using the provided ProfileResetRiskRequest

func (*Risk) MergeProfileUpdateRiskRequest

func (t *Risk) MergeProfileUpdateRiskRequest(v ProfileUpdateRiskRequest) error

MergeProfileUpdateRiskRequest performs a merge with any union data inside the Risk, using the provided ProfileUpdateRiskRequest

func (*Risk) MergeRegistrationRiskRequest

func (t *Risk) MergeRegistrationRiskRequest(v RegistrationRiskRequest) error

MergeRegistrationRiskRequest performs a merge with any union data inside the Risk, using the provided RegistrationRiskRequest

func (*Risk) MergeTransactionRiskRequest

func (t *Risk) MergeTransactionRiskRequest(v TransactionRiskRequest) error

MergeTransactionRiskRequest performs a merge with any union data inside the Risk, using the provided TransactionRiskRequest

func (*Risk) UnmarshalJSON

func (t *Risk) UnmarshalJSON(b []byte) error

func (Risk) ValueByDiscriminator

func (t Risk) ValueByDiscriminator() (interface{}, error)

type RiskJSONRequestBody

type RiskJSONRequestBody = Risk

RiskJSONRequestBody defines body for Risk for application/json ContentType.

type RiskRequest

type RiskRequest struct {
	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand  *[]string `json:"expand,omitempty"`
	Product *Product  `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](/v1/getting-started)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool                 `json:"skip_request_token_validation,omitempty"`
	User                       UserForMonitorAndRisk `json:"user"`
}

RiskRequest defines model for RiskRequest.

type RiskResponse

type RiskResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *FilterAndRiskResponse
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
}

func ParseRiskResponse

func ParseRiskResponse(rsp *http.Response) (*RiskResponse, error)

ParseRiskResponse parses an HTTP response from a RiskWithResponse call

func (RiskResponse) ContentType

func (r RiskResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (RiskResponse) GetBody

func (r RiskResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (RiskResponse) GetJSON201

func (r RiskResponse) GetJSON201() *FilterAndRiskResponse

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (RiskResponse) GetJSON422

func (r RiskResponse) GetJSON422() *UnprocessableEntity

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (RiskResponse) Status

func (r RiskResponse) Status() string

Status returns HTTPResponse.Status

func (RiskResponse) StatusCode

func (r RiskResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Score

type Score struct {
	// Score Example: 0.396
	Score nullable.Nullable[float32] `json:"score"`
}

Score defines model for Score.

type SearchField

type SearchField struct {
	// Description Human-readable description of the field
	//
	// Example: User ID sent by the client to Castle
	Description string `json:"description"`

	// Enum List of possible values for this field
	Enum *[]string `json:"enum,omitempty"`

	// Example Example value of this field
	//
	// Example: 9610c462-fe50-4e6e-a714-9c4377be209d
	Example *string `json:"example,omitempty"`

	// Field Name of the field
	//
	// Example: user.id
	Field string `json:"field"`

	// Func List of functions that can be applied on this field
	//
	// Example: ["$top_k"]
	Func []Func `json:"func"`

	// Max Maximal value for the field
	Max *SearchField_Max `json:"max,omitempty"`

	// Min Minimal value for the field
	Min *SearchField_Min `json:"min,omitempty"`

	// NiceName Human-readable name of the field
	//
	// Example: User ID
	NiceName string `json:"nice_name"`

	// Op List of operations that can be performed on this field
	//
	// Example: ["$eq","$neq"]
	Op []Op `json:"op"`

	// Source Indicates which SDKs can send this field
	Source *[]SearchFieldSource `json:"source,omitempty"`

	// Transform List of transformations that can be applied on this field
	Transform *[]Transforms `json:"transform,omitempty"`

	// Type Example: string
	Type DataType `json:"type"`

	// Unit Unit of the field. This can be '%' for battery_level, 'ms' for time, etc.
	Unit *string `json:"unit,omitempty"`
}

SearchField defines model for SearchField.

type SearchFieldMax0

type SearchFieldMax0 = string

SearchFieldMax0 defines model for SearchField.Max.0.

type SearchFieldMax1

type SearchFieldMax1 = float32

SearchFieldMax1 defines model for SearchField.Max.1.

type SearchFieldMin0

type SearchFieldMin0 = string

SearchFieldMin0 defines model for SearchField.Min.0.

type SearchFieldMin1

type SearchFieldMin1 = float32

SearchFieldMin1 defines model for SearchField.Min.1.

type SearchFieldSource

type SearchFieldSource string

SearchFieldSource defines model for SearchField.Source.

const (
	Android SearchFieldSource = "android"
	Ios     SearchFieldSource = "ios"
	Web     SearchFieldSource = "web"
)

Defines values for SearchFieldSource.

func (SearchFieldSource) Valid

func (e SearchFieldSource) Valid() bool

Valid indicates whether the value is a known member of the SearchFieldSource enum.

type SearchField_Max

type SearchField_Max struct {
	// contains filtered or unexported fields
}

SearchField_Max Maximal value for the field

func (SearchField_Max) AsSearchFieldMax0

func (t SearchField_Max) AsSearchFieldMax0() (SearchFieldMax0, error)

AsSearchFieldMax0 returns the union data inside the SearchField_Max as a SearchFieldMax0

func (SearchField_Max) AsSearchFieldMax1

func (t SearchField_Max) AsSearchFieldMax1() (SearchFieldMax1, error)

AsSearchFieldMax1 returns the union data inside the SearchField_Max as a SearchFieldMax1

func (*SearchField_Max) FromSearchFieldMax0

func (t *SearchField_Max) FromSearchFieldMax0(v SearchFieldMax0) error

FromSearchFieldMax0 overwrites any union data inside the SearchField_Max as the provided SearchFieldMax0

func (*SearchField_Max) FromSearchFieldMax1

func (t *SearchField_Max) FromSearchFieldMax1(v SearchFieldMax1) error

FromSearchFieldMax1 overwrites any union data inside the SearchField_Max as the provided SearchFieldMax1

func (SearchField_Max) MarshalJSON

func (t SearchField_Max) MarshalJSON() ([]byte, error)

func (*SearchField_Max) MergeSearchFieldMax0

func (t *SearchField_Max) MergeSearchFieldMax0(v SearchFieldMax0) error

MergeSearchFieldMax0 performs a merge with any union data inside the SearchField_Max, using the provided SearchFieldMax0

func (*SearchField_Max) MergeSearchFieldMax1

func (t *SearchField_Max) MergeSearchFieldMax1(v SearchFieldMax1) error

MergeSearchFieldMax1 performs a merge with any union data inside the SearchField_Max, using the provided SearchFieldMax1

func (*SearchField_Max) UnmarshalJSON

func (t *SearchField_Max) UnmarshalJSON(b []byte) error

type SearchField_Min

type SearchField_Min struct {
	// contains filtered or unexported fields
}

SearchField_Min Minimal value for the field

func (SearchField_Min) AsSearchFieldMin0

func (t SearchField_Min) AsSearchFieldMin0() (SearchFieldMin0, error)

AsSearchFieldMin0 returns the union data inside the SearchField_Min as a SearchFieldMin0

func (SearchField_Min) AsSearchFieldMin1

func (t SearchField_Min) AsSearchFieldMin1() (SearchFieldMin1, error)

AsSearchFieldMin1 returns the union data inside the SearchField_Min as a SearchFieldMin1

func (*SearchField_Min) FromSearchFieldMin0

func (t *SearchField_Min) FromSearchFieldMin0(v SearchFieldMin0) error

FromSearchFieldMin0 overwrites any union data inside the SearchField_Min as the provided SearchFieldMin0

func (*SearchField_Min) FromSearchFieldMin1

func (t *SearchField_Min) FromSearchFieldMin1(v SearchFieldMin1) error

FromSearchFieldMin1 overwrites any union data inside the SearchField_Min as the provided SearchFieldMin1

func (SearchField_Min) MarshalJSON

func (t SearchField_Min) MarshalJSON() ([]byte, error)

func (*SearchField_Min) MergeSearchFieldMin0

func (t *SearchField_Min) MergeSearchFieldMin0(v SearchFieldMin0) error

MergeSearchFieldMin0 performs a merge with any union data inside the SearchField_Min, using the provided SearchFieldMin0

func (*SearchField_Min) MergeSearchFieldMin1

func (t *SearchField_Min) MergeSearchFieldMin1(v SearchFieldMin1) error

MergeSearchFieldMin1 performs a merge with any union data inside the SearchField_Min, using the provided SearchFieldMin1

func (*SearchField_Min) UnmarshalJSON

func (t *SearchField_Min) UnmarshalJSON(b []byte) error

type SearchSchema

type SearchSchema struct {
	Buckets []SearchSchema_Buckets_Item `json:"buckets"`
	Fields  []SearchField               `json:"fields"`
}

SearchSchema defines model for SearchSchema.

type SearchSchema_Buckets_Item

type SearchSchema_Buckets_Item struct {
	// contains filtered or unexported fields
}

SearchSchema_Buckets_Item defines model for SearchSchema.buckets.Item.

func (SearchSchema_Buckets_Item) AsCountBucket

func (t SearchSchema_Buckets_Item) AsCountBucket() (CountBucket, error)

AsCountBucket returns the union data inside the SearchSchema_Buckets_Item as a CountBucket

func (SearchSchema_Buckets_Item) AsDateHistogramBucket

func (t SearchSchema_Buckets_Item) AsDateHistogramBucket() (DateHistogramBucket, error)

AsDateHistogramBucket returns the union data inside the SearchSchema_Buckets_Item as a DateHistogramBucket

func (SearchSchema_Buckets_Item) AsRangeBucket

func (t SearchSchema_Buckets_Item) AsRangeBucket() (RangeBucket, error)

AsRangeBucket returns the union data inside the SearchSchema_Buckets_Item as a RangeBucket

func (*SearchSchema_Buckets_Item) FromCountBucket

func (t *SearchSchema_Buckets_Item) FromCountBucket(v CountBucket) error

FromCountBucket overwrites any union data inside the SearchSchema_Buckets_Item as the provided CountBucket

func (*SearchSchema_Buckets_Item) FromDateHistogramBucket

func (t *SearchSchema_Buckets_Item) FromDateHistogramBucket(v DateHistogramBucket) error

FromDateHistogramBucket overwrites any union data inside the SearchSchema_Buckets_Item as the provided DateHistogramBucket

func (*SearchSchema_Buckets_Item) FromRangeBucket

func (t *SearchSchema_Buckets_Item) FromRangeBucket(v RangeBucket) error

FromRangeBucket overwrites any union data inside the SearchSchema_Buckets_Item as the provided RangeBucket

func (SearchSchema_Buckets_Item) MarshalJSON

func (t SearchSchema_Buckets_Item) MarshalJSON() ([]byte, error)

func (*SearchSchema_Buckets_Item) MergeCountBucket

func (t *SearchSchema_Buckets_Item) MergeCountBucket(v CountBucket) error

MergeCountBucket performs a merge with any union data inside the SearchSchema_Buckets_Item, using the provided CountBucket

func (*SearchSchema_Buckets_Item) MergeDateHistogramBucket

func (t *SearchSchema_Buckets_Item) MergeDateHistogramBucket(v DateHistogramBucket) error

MergeDateHistogramBucket performs a merge with any union data inside the SearchSchema_Buckets_Item, using the provided DateHistogramBucket

func (*SearchSchema_Buckets_Item) MergeRangeBucket

func (t *SearchSchema_Buckets_Item) MergeRangeBucket(v RangeBucket) error

MergeRangeBucket performs a merge with any union data inside the SearchSchema_Buckets_Item, using the provided RangeBucket

func (*SearchSchema_Buckets_Item) UnmarshalJSON

func (t *SearchSchema_Buckets_Item) UnmarshalJSON(b []byte) error

type Session

type Session struct {
	// CreatedAt Timestamp when the session was created
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Id A unique session identifier from your system. You should hash the value before sending it to Castle
	Id string `json:"id"`
}

Session Additional session information from your system

type Transaction

type Transaction struct {
	Amount *Transaction_Amount `json:"amount,omitempty"`

	// BaseAmount Monetary amount of the transaction in your system's home currency, with two decimals
	//
	// Example: 499.99
	BaseAmount *string `json:"base_amount,omitempty"`

	// Id Unique identifier for this transaction. Use this to link the flow of your
	// transactions with different events and types
	//
	//
	// Example: 900b183a-9f6d-4579-8c47-9ddcccf637b4
	Id              string          `json:"id"`
	Merchant        *Merchant       `json:"merchant,omitempty"`
	PaymentMethod   *PaymentMethod  `json:"payment_method,omitempty"`
	ShippingAddress *Address        `json:"shipping_address,omitempty"`
	Type            TransactionType `json:"type"`
}

Transaction defines model for Transaction.

type TransactionFilterRequest

type TransactionFilterRequest struct {
	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand *[]string `json:"expand,omitempty"`

	// MatchingUserId User id related connected with the request
	//
	// Example: 123
	MatchingUserId *string `json:"matching_user_id,omitempty"`
	Params         *struct {
		// Email The email address sent by the user
		//
		// Example: Rhea.Franecki@example.org
		Email *string `json:"email,omitempty"`

		// Phone The phone number sent by the user
		//
		// Example: +16175551212
		Phone *string `json:"phone,omitempty"`

		// Username The username sent by the user
		//
		// Example: superhero123
		Username *string `json:"username,omitempty"`
	} `json:"params,omitempty"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](https://docs.castle.io/docs/quickstart)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool                           `json:"skip_request_token_validation,omitempty"`
	Status                     *TransactionFilterRequestStatus `json:"status,omitempty"`
	Transaction                *Transaction                    `json:"transaction,omitempty"`

	// Type Castle supported events available for this endpoint
	Type TransactionFilterRequestType `json:"type"`
	User *struct {
		// Email The identified user's email address
		//
		// Example: Rhea.Franecki@example.org
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Email *string `json:"email,omitempty"`

		// Phone The identified user's phone number
		//
		// Example: +16175551212
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Phone *string `json:"phone,omitempty"`
	} `json:"user,omitempty"`
}

TransactionFilterRequest defines model for TransactionFilterRequest.

type TransactionFilterRequestStatus

type TransactionFilterRequestStatus string

TransactionFilterRequestStatus defines model for TransactionFilterRequest.Status.

const (
	TransactionFilterRequestStatusAttempted TransactionFilterRequestStatus = "$attempted"
	TransactionFilterRequestStatusFailed    TransactionFilterRequestStatus = "$failed"
	TransactionFilterRequestStatusSucceeded TransactionFilterRequestStatus = "$succeeded"
)

Defines values for TransactionFilterRequestStatus.

func (TransactionFilterRequestStatus) Valid

Valid indicates whether the value is a known member of the TransactionFilterRequestStatus enum.

type TransactionFilterRequestType

type TransactionFilterRequestType string

TransactionFilterRequestType Castle supported events available for this endpoint

const (
	TransactionFilterRequestTypeTransaction TransactionFilterRequestType = "$transaction"
)

Defines values for TransactionFilterRequestType.

func (TransactionFilterRequestType) Valid

Valid indicates whether the value is a known member of the TransactionFilterRequestType enum.

type TransactionResponse

type TransactionResponse struct {
	// Agent AI agent identified for this event/context. Omitted when no agent is identified
	Agent *Agent `json:"agent,omitempty"`

	// Authenticated Authenticated or Anonymous visitor
	//
	// Example: true
	Authenticated *bool `json:"authenticated,omitempty"`

	// AuthenticationMethod Example: {"type":"$social","variant":"facebook"}
	AuthenticationMethod *AuthenticationMethod `json:"authentication_method,omitempty"`
	Behavior             *struct {
		// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
		Fingerprint nullable.Nullable[string] `json:"fingerprint,omitempty"`
	} `json:"behavior,omitempty"`

	// CreatedAt Event timestamp
	//
	// Example: 2021-09-27T16:46:38.313Z
	CreatedAt *time.Time `json:"created_at,omitempty"`
	Device    struct {
		// Fingerprint Example: ohvjn8adSnetYTzZ8B7bOP
		Fingerprint nullable.Nullable[string] `json:"fingerprint"`
		Hardware    *struct {
			Brand   nullable.Nullable[string] `json:"brand"`
			Display struct {
				// Height Example: 982
				Height nullable.Nullable[int] `json:"height"`

				// Width Example: 1512
				Width nullable.Nullable[int] `json:"width"`
			} `json:"display"`
			Model struct {
				Code nullable.Nullable[string] `json:"code"`
				Name nullable.Nullable[string] `json:"name"`
			} `json:"model"`
			Name nullable.Nullable[string] `json:"name"`

			// Type Example: computer
			Type string `json:"type"`
		} `json:"hardware,omitempty"`
		Os *struct {
			// Name Example: Windows 10
			Name    string `json:"name"`
			Version struct {
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 10
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"os,omitempty"`
		Screen *struct {
			// Orientation Example: landscape
			Orientation nullable.Nullable[string] `json:"orientation,omitempty"`

			// Screen Example: 2
			Screen nullable.Nullable[int] `json:"screen,omitempty"`
		} `json:"screen,omitempty"`
		Software *struct {
			// Fingerprint Example: vOch_0a_fpkl1Tf-pVPuDA
			Fingerprint nullable.Nullable[string] `json:"fingerprint"`

			// Languages Example: ["en-us","en"]
			Languages []string `json:"languages"`

			// Name Example: Chrome
			Name string `json:"name"`

			// Type Example: browser
			Type    string `json:"type"`
			Version struct {
				// Full Example: 91.0.4472
				Full nullable.Nullable[string] `json:"full"`

				// Major Example: 91
				Major nullable.Nullable[string] `json:"major"`
			} `json:"version"`
		} `json:"software,omitempty"`
		Timezone *struct {
			// Name Example: America/New_York
			Name nullable.Nullable[string] `json:"name,omitempty"`

			// Offset Time offset from UTC measured in minutes
			//
			// Example: -300
			Offset nullable.Nullable[int] `json:"offset,omitempty"`
		} `json:"timezone,omitempty"`

		// Token Device token generated or found
		//
		// Example: eyJhbGciOiJIUzI1NiJ9.eyJ0b2tlbiI6IjEzc2x6RzNHQ0RzeFJCejdJWF9SUDJkV1Y0RFgiLCJxdWFsaWZpZXIiOiJBUUlEQ2pFME5EZzFPREF3T1RZIiwiYW5vbnltb3VzIjpmYWxzZSwidmVyc2lvbiI6MC4zfQ.y3vOt-W1IpOi7Oyn1jll1uDw1YL-JPZtNMTU-PyaYhQ
		// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
		Token *string `json:"token,omitempty"`

		// UserAgent Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
		UserAgent *string `json:"user_agent,omitempty"`
	} `json:"device"`

	// Email User Email Object
	Email *struct {
		// Disposable Example: false
		Disposable *bool `json:"disposable,omitempty"`

		// Domain Example: gmail.com
		Domain        *string `json:"domain,omitempty"`
		DomainDetails *struct {
			// CreatedAt Example: 2021-09-27T16:46:38.313Z
			CreatedAt   *time.Time `json:"created_at,omitempty"`
			DmarcRecord *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"dmarc_record,omitempty"`

			// ExpiresAt Example: 2021-09-27T16:46:38.313Z
			ExpiresAt *time.Time `json:"expires_at,omitempty"`
			MxRecords *struct {
				// NullMx Example: false
				NullMx nullable.Nullable[bool] `json:"null_mx,omitempty"`
			} `json:"mx_records,omitempty"`

			// Nameservers Example: ["ns1.hosting.com","ns2.hosting.com","ns3.hosting.com"]
			Nameservers *[]string `json:"nameservers,omitempty"`
			Registrar   *string   `json:"registrar,omitempty"`
			SpfRecord   *struct {
				// Exists Example: false
				Exists nullable.Nullable[bool] `json:"exists,omitempty"`
			} `json:"spf_record,omitempty"`

			// UpdatedAt Example: 2021-09-27T16:46:38.313Z
			UpdatedAt *time.Time `json:"updated_at,omitempty"`
		} `json:"domain_details,omitempty"`

		// Normalized Example: user.email@example.com
		Normalized *string `json:"normalized,omitempty"`

		// Unreachable Example: false
		Unreachable *bool `json:"unreachable,omitempty"`
	} `json:"email,omitempty"`

	// Endpoint Castle Request Endpoint
	//
	// Example: /v1/risk
	Endpoint *string `json:"endpoint,omitempty"`

	// Id Castle Event ID
	//
	// Example: ASZoelALT5-PaVw2pAVMXg
	Id *string `json:"id,omitempty"`
	Ip *IP     `json:"ip,omitempty"`

	// Metrics Metrics triggered for this event/context
	//
	// Example: {"1":{},"2":{},"3":{},"4":{},"5":{}}
	Metrics *map[string]map[string]interface{} `json:"metrics,omitempty"`

	// Name Event Full Name
	//
	// Example: Login Succeeded
	Name *string `json:"name,omitempty"`

	// Params The params object
	Params *EventParams `json:"params,omitempty"`

	// Policy The matching policy
	Policy  Policy   `json:"policy"`
	Product *Product `json:"product,omitempty"`

	// Properties User defined properties
	Properties *Properties `json:"properties,omitempty"`

	// Risk Deprecated Risk Score - use `scores` instead. Calculated only when `request_token` and `context` are provided.
	//
	// Example: 0.65
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Risk *float32 `json:"risk,omitempty"`

	// Scores Castle Scores breakdown. Calculated only when `request_token` and `context` are provided.
	Scores *struct {
		AccountAbuse struct {
			// Score Calculated Account Abuse Risk Score.
			//
			// Example: 0.65
			Score *float32 `json:"score,omitempty"`
		} `json:"account_abuse"`
		AccountTakeover struct {
			// Score Calculated Account Takeover Risk Score.
			//
			// Example: 0.77
			Score *float32 `json:"score,omitempty"`
		} `json:"account_takeover"`
		Bot struct {
			// Score Calculated Bot Risk Score.
			//
			// Example: 0.34
			Score *float32 `json:"score,omitempty"`
		} `json:"bot"`
	} `json:"scores,omitempty"`

	// Sdks Castle SDKs details
	Sdks *struct {
		Client *struct {
			// Name Example: castle-web
			Name *string `json:"name,omitempty"`

			// Version Example: 2.0.0
			Version *string `json:"version,omitempty"`
		} `json:"client,omitempty"`
		Server *struct {
			// Name Example: castle-postman
			Name *string `json:"name,omitempty"`

			// Version Example: 0.1.0
			Version *string `json:"version,omitempty"`
		} `json:"server,omitempty"`
	} `json:"sdks,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// Signals Signals triggered for this event/context
	//
	// Example: {"bot_behavior":{},"disposable_email":{},"multiple_accounts_per_device":{},"proxy_ip":{},"residential_proxy_access":{},"spoofed_device":{}}
	Signals     *map[string]map[string]interface{} `json:"signals,omitempty"`
	Status      *TransactionResponseStatus         `json:"status,omitempty"`
	Transaction *Transaction                       `json:"transaction,omitempty"`

	// Type Castle supported events available for this endpoint
	Type TransactionResponseType `json:"type"`
	User *UserForMonitorAndRisk  `json:"user,omitempty"`
}

TransactionResponse defines model for TransactionResponse.

type TransactionResponseStatus

type TransactionResponseStatus string

TransactionResponseStatus defines model for TransactionResponse.Status.

const (
	TransactionResponseStatusAttempted TransactionResponseStatus = "$attempted"
	TransactionResponseStatusFailed    TransactionResponseStatus = "$failed"
	TransactionResponseStatusSucceeded TransactionResponseStatus = "$succeeded"
)

Defines values for TransactionResponseStatus.

func (TransactionResponseStatus) Valid

func (e TransactionResponseStatus) Valid() bool

Valid indicates whether the value is a known member of the TransactionResponseStatus enum.

type TransactionResponseType

type TransactionResponseType string

TransactionResponseType Castle supported events available for this endpoint

const (
	TransactionResponseTypeTransaction TransactionResponseType = "$transaction"
)

Defines values for TransactionResponseType.

func (TransactionResponseType) Valid

func (e TransactionResponseType) Valid() bool

Valid indicates whether the value is a known member of the TransactionResponseType enum.

type TransactionRiskRequest

type TransactionRiskRequest struct {
	// Context The context object contains information about the originating request, including IP address and HTTP headers.
	//
	// **Note:** This field can be skipped by setting `skip_context_validation` to `true`.
	Context *Context `json:"context,omitempty"`

	// CreatedAt The default value is the time of which the event was received by Castle. If you’re passing events in a delayed fashion, such as via an event queue, you should make sure to set this field to the time of which the event was tracked and put into the queue.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Expand Include additional properties into API response.
	// *This option is currently in beta and available only to select customers.*
	//
	//
	// Example: ["all"]
	Expand  *[]string `json:"expand,omitempty"`
	Product *Product  `json:"product,omitempty"`

	// Properties User defined properties associated with this device
	Properties *map[string]Properties `json:"properties,omitempty"`

	// RequestToken Token generated from a client. Check out our [quick start guide](/v1/getting-started)
	// to generate a `request_token`.
	//
	// **Note:** This field can be skipped by setting `skip_request_token_validation` to `true`.
	//
	//
	// Example: test_lZWva9rsNe3u0_EIc6R8V3t5beV38piPAQbhgREGygYCAo2FRSv1tAQ4-cb6ArKHOWK_zG18hO1uZ8K0LDbNqU9njuhscoLyaj3NyGxyiO0iS4ziIkm-oVom3LEsN9i6InSbuzo-w7ErJqrkYW2CrjA23LEyN92wIkCE82dggvktPtWvMmrl42Bj2uM7Zdn2AQGXC6qGTIECRlwaAgZcgcAGeX4
	RequestToken *string `json:"request_token,omitempty"`

	// Session Additional session information from your system
	Session *Session `json:"session,omitempty"`

	// SkipContextValidation Skip `context` validation. Enable when HTTP request context is not providing useful insight
	// (e.g., third-party API calls from Data Center IP).
	//
	// Set to `true` to make the `context` field optional.
	SkipContextValidation *bool `json:"skip_context_validation,omitempty"`

	// SkipRequestTokenValidation Skip `request_token` validation. Enable when it's impossible to obtain Castle request_token (e.g., third-party API calls).
	// When enabled, Castle risk scores are not calculated.
	//
	// Set to `true` to make the `request_token` field optional.
	SkipRequestTokenValidation *bool                        `json:"skip_request_token_validation,omitempty"`
	Status                     TransactionRiskRequestStatus `json:"status"`
	Transaction                *Transaction                 `json:"transaction,omitempty"`

	// Type Castle supported events available for this endpoint
	Type TransactionRiskRequestType `json:"type"`
	User UserForMonitorAndRisk      `json:"user"`
}

TransactionRiskRequest defines model for TransactionRiskRequest.

type TransactionRiskRequestStatus

type TransactionRiskRequestStatus string

TransactionRiskRequestStatus defines model for TransactionRiskRequest.Status.

const (
	TransactionRiskRequestStatusAttempted TransactionRiskRequestStatus = "$attempted"
	TransactionRiskRequestStatusFailed    TransactionRiskRequestStatus = "$failed"
	TransactionRiskRequestStatusSucceeded TransactionRiskRequestStatus = "$succeeded"
)

Defines values for TransactionRiskRequestStatus.

func (TransactionRiskRequestStatus) Valid

Valid indicates whether the value is a known member of the TransactionRiskRequestStatus enum.

type TransactionRiskRequestType

type TransactionRiskRequestType string

TransactionRiskRequestType Castle supported events available for this endpoint

const (
	TransactionRiskRequestTypeTransaction TransactionRiskRequestType = "$transaction"
)

Defines values for TransactionRiskRequestType.

func (TransactionRiskRequestType) Valid

func (e TransactionRiskRequestType) Valid() bool

Valid indicates whether the value is a known member of the TransactionRiskRequestType enum.

type TransactionType

type TransactionType string

TransactionType defines model for Transaction.Type.

const (
	Deposit    TransactionType = "$deposit"
	Purchase   TransactionType = "$purchase"
	Reward     TransactionType = "$reward"
	Sale       TransactionType = "$sale"
	Transfer   TransactionType = "$transfer"
	Withdrawal TransactionType = "$withdrawal"
)

Defines values for TransactionType.

func (TransactionType) Valid

func (e TransactionType) Valid() bool

Valid indicates whether the value is a known member of the TransactionType enum.

type Transaction_Amount

type Transaction_Amount struct {
	// contains filtered or unexported fields
}

Transaction_Amount defines model for Transaction.Amount.

func (Transaction_Amount) AsCryptoAmount

func (t Transaction_Amount) AsCryptoAmount() (CryptoAmount, error)

AsCryptoAmount returns the union data inside the Transaction_Amount as a CryptoAmount

func (Transaction_Amount) AsFiatAmount

func (t Transaction_Amount) AsFiatAmount() (FiatAmount, error)

AsFiatAmount returns the union data inside the Transaction_Amount as a FiatAmount

func (*Transaction_Amount) FromCryptoAmount

func (t *Transaction_Amount) FromCryptoAmount(v CryptoAmount) error

FromCryptoAmount overwrites any union data inside the Transaction_Amount as the provided CryptoAmount

func (*Transaction_Amount) FromFiatAmount

func (t *Transaction_Amount) FromFiatAmount(v FiatAmount) error

FromFiatAmount overwrites any union data inside the Transaction_Amount as the provided FiatAmount

func (Transaction_Amount) MarshalJSON

func (t Transaction_Amount) MarshalJSON() ([]byte, error)

func (*Transaction_Amount) MergeCryptoAmount

func (t *Transaction_Amount) MergeCryptoAmount(v CryptoAmount) error

MergeCryptoAmount performs a merge with any union data inside the Transaction_Amount, using the provided CryptoAmount

func (*Transaction_Amount) MergeFiatAmount

func (t *Transaction_Amount) MergeFiatAmount(v FiatAmount) error

MergeFiatAmount performs a merge with any union data inside the Transaction_Amount, using the provided FiatAmount

func (*Transaction_Amount) UnmarshalJSON

func (t *Transaction_Amount) UnmarshalJSON(b []byte) error

type Transform

type Transform struct {
	// Options Options specific for each transformation function
	Options *map[string]interface{} `json:"options,omitempty"`

	// Transform All possible transformations
	Transform Transforms `json:"transform"`
}

Transform Describes how to transform the column value. The transformation is applied before the `func` aggregation function.

type Transforms

type Transforms string

Transforms All possible transformations

const (
	ToStartOfInterval Transforms = "$to_start_of_interval"
)

Defines values for Transforms.

func (Transforms) Valid

func (e Transforms) Valid() bool

Valid indicates whether the value is a known member of the Transforms enum.

type UnarchiveListItemJSONRequestBody

type UnarchiveListItemJSONRequestBody = UnarchiveListItemRequest

UnarchiveListItemJSONRequestBody defines body for UnarchiveListItem for application/json ContentType.

type UnarchiveListItemRequest

type UnarchiveListItemRequest struct {
	// AutoArchivesAt Time after which a the List Item will be automatically archived and no longer matched against each event. A value of `null` means auto archivation is disabled and the record will stay active in the list forever.
	//
	// Example: 2021-09-27T16:46:38.313Z
	AutoArchivesAt nullable.Nullable[time.Time] `json:"auto_archives_at,omitempty"`
}

UnarchiveListItemRequest defines model for UnarchiveListItemRequest.

type UnarchiveListItemResponse

type UnarchiveListItemResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
}

func ParseUnarchiveListItemResponse

func ParseUnarchiveListItemResponse(rsp *http.Response) (*UnarchiveListItemResponse, error)

ParseUnarchiveListItemResponse parses an HTTP response from a UnarchiveListItemWithResponse call

func (UnarchiveListItemResponse) ContentType

func (r UnarchiveListItemResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (UnarchiveListItemResponse) GetBody

func (r UnarchiveListItemResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (UnarchiveListItemResponse) GetJSON422

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (UnarchiveListItemResponse) Status

func (r UnarchiveListItemResponse) Status() string

Status returns HTTPResponse.Status

func (UnarchiveListItemResponse) StatusCode

func (r UnarchiveListItemResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UnnamedColumn

type UnnamedColumn struct {
	// Field Field name. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	Field string `json:"field"`

	// Func Aggregation function to be applied on the field
	//
	// Example: $sum
	Func Func `json:"func"`

	// Options Options specific for each aggregation function
	Options *map[string]interface{} `json:"options,omitempty"`

	// Transform Describes how to transform the column value. The transformation is applied before the `func` aggregation function.
	Transform *Transform `json:"transform,omitempty"`
}

UnnamedColumn defines model for UnnamedColumn.

type UnnamedColumnWithOrder

type UnnamedColumnWithOrder struct {
	// Field Field name. Consult the [Events Schema API](/#operation/getEventSchema) for the list of available fields.
	Field string `json:"field"`

	// Func Aggregation function to be applied on the field
	//
	// Example: $sum
	Func Func `json:"func"`

	// Options Options specific for each aggregation function
	Options *map[string]interface{}      `json:"options,omitempty"`
	Order   *UnnamedColumnWithOrderOrder `json:"order,omitempty"`

	// Transform Describes how to transform the column value. The transformation is applied before the `func` aggregation function.
	Transform *Transform `json:"transform,omitempty"`
}

UnnamedColumnWithOrder defines model for UnnamedColumnWithOrder.

type UnnamedColumnWithOrderOrder

type UnnamedColumnWithOrderOrder string

UnnamedColumnWithOrderOrder defines model for UnnamedColumnWithOrder.Order.

const (
	UnnamedColumnWithOrderOrderAsc  UnnamedColumnWithOrderOrder = "asc"
	UnnamedColumnWithOrderOrderDesc UnnamedColumnWithOrderOrder = "desc"
)

Defines values for UnnamedColumnWithOrderOrder.

func (UnnamedColumnWithOrderOrder) Valid

Valid indicates whether the value is a known member of the UnnamedColumnWithOrderOrder enum.

type UnprocessableEntity

type UnprocessableEntity = RecordInvalidError

UnprocessableEntity defines model for UnprocessableEntity.

type UpdateListItemJSONRequestBody

type UpdateListItemJSONRequestBody = UpdateListItemRequest

UpdateListItemJSONRequestBody defines body for UpdateListItem for application/json ContentType.

type UpdateListItemRequest

type UpdateListItemRequest struct {
	// Comment An arbitrary string that can be used to eg. explain why this List Item was created. Often useful to display to other users.
	//
	// Example: Listed due to manual investigation
	Comment string `json:"comment"`
}

UpdateListItemRequest defines model for UpdateListItemRequest.

type UpdateListItemResponse

type UpdateListItemResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *ListItem
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
}

func ParseUpdateListItemResponse

func ParseUpdateListItemResponse(rsp *http.Response) (*UpdateListItemResponse, error)

ParseUpdateListItemResponse parses an HTTP response from a UpdateListItemWithResponse call

func (UpdateListItemResponse) ContentType

func (r UpdateListItemResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (UpdateListItemResponse) GetBody

func (r UpdateListItemResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (UpdateListItemResponse) GetJSON201

func (r UpdateListItemResponse) GetJSON201() *ListItem

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (UpdateListItemResponse) GetJSON422

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (UpdateListItemResponse) Status

func (r UpdateListItemResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateListItemResponse) StatusCode

func (r UpdateListItemResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateListJSONRequestBody

type UpdateListJSONRequestBody = UpdateListRequest

UpdateListJSONRequestBody defines body for UpdateList for application/json ContentType.

type UpdateListRequest

type UpdateListRequest struct {
	// Color Color assigned to the List. These colors can be used to represent different sentiments, such as red for blocked records or green for trusted.
	//
	// Example: $red
	Color *ListColor `json:"color,omitempty"`

	// DefaultItemArchivationTime Default time, in seconds, after which Items in this List automatically gets archived after they are created. It is possible to override this value when creating the individual List Items
	//
	// Example: 2592000
	DefaultItemArchivationTime nullable.Nullable[int] `json:"default_item_archivation_time,omitempty"`

	// Description Description of the List
	//
	// Example: We block these IPs from withdrawing funds. Please be careful.
	Description nullable.Nullable[string] `json:"description,omitempty"`

	// Name Name of the List
	//
	// Example: Malicious IPs
	Name *string `json:"name,omitempty"`
}

UpdateListRequest defines model for UpdateListRequest.

type UpdateListResponse

type UpdateListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *List
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *UnprocessableEntity
}

func ParseUpdateListResponse

func ParseUpdateListResponse(rsp *http.Response) (*UpdateListResponse, error)

ParseUpdateListResponse parses an HTTP response from a UpdateListWithResponse call

func (UpdateListResponse) ContentType

func (r UpdateListResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (UpdateListResponse) GetBody

func (r UpdateListResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (UpdateListResponse) GetJSON201

func (r UpdateListResponse) GetJSON201() *List

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (UpdateListResponse) GetJSON422

func (r UpdateListResponse) GetJSON422() *UnprocessableEntity

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (UpdateListResponse) Status

func (r UpdateListResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateListResponse) StatusCode

func (r UpdateListResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UserForMonitorAndRisk

type UserForMonitorAndRisk struct {
	Address *Address `json:"address,omitempty"`

	// Email The identified user's email address
	Email *string `json:"email,omitempty"`

	// Id A unique user identifier
	Id string `json:"id"`

	// Name The full name of the user
	Name *string `json:"name,omitempty"`

	// Phone The identified user's phone number E.164 formatted
	Phone *string `json:"phone,omitempty"`

	// RegisteredAt The ISO8601 timestamp of the user's account creation
	RegisteredAt *time.Time `json:"registered_at,omitempty"`

	// Traits Known traits of the identified user
	Traits nullable.Nullable[map[string]interface{}] `json:"traits,omitempty"`
}

UserForMonitorAndRisk defines model for UserForMonitorAndRisk.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL