diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cbe4b44 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: tests + +on: + push: + branches: + - 'main' + pull_request: + branches: + - 'main' + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + uses: "./.github/workflows/ci_test.yml" + secrets: inherit + + lint: + uses: "./.github/workflows/ci_lint.yml" + secrets: inherit diff --git a/.github/workflows/ci_lint.yml b/.github/workflows/ci_lint.yml new file mode 100644 index 0000000..f13a53d --- /dev/null +++ b/.github/workflows/ci_lint.yml @@ -0,0 +1,20 @@ +name: lint + +on: + workflow_call: + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: 1.18 + cache: true + + - uses: golangci/golangci-lint-action@v3.7.0 + with: + version: v1.55.2 + args: --timeout 5m diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml new file mode 100644 index 0000000..2149af3 --- /dev/null +++ b/.github/workflows/ci_test.yml @@ -0,0 +1,24 @@ +name: test + +on: + workflow_call: + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + go: + - '1.18' + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go }} + cache: true + + - run: go test ./... \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..d5fb201 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,36 @@ +linters-settings: + lll: + line-length: 200 + funlen: + lines: 100 + statements: 50 + +linters: + disable-all: true + enable: + - lll + - funlen + - gosec + - govet + - dogsled + - dupl + - errcheck + - gochecknoinits + - goconst + - gocritic + - gocyclo + - godox + - gofmt + - goimports + - revive + - gosimple + - ineffassign + - nakedret + - prealloc + - exportloopref + - staticcheck + - stylecheck + - typecheck + - unconvert + - unused + - whitespace diff --git a/README.md b/README.md new file mode 100644 index 0000000..aab3e1d --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# Corbado Go SDK + +Go SDK for Corbado Backend API + +[![Go Reference](https://pkg.go.dev/badge/github.com/corbado/corbado-go.svg)](https://pkg.go.dev/github.com/corbado/corbado-go) +[![Test Status](https://github.com/corbado/corbado-go/workflows/tests/badge.svg)](https://github.com/corbado/corbado-go/actions?query=workflow%3Atests) +[![documentation](https://img.shields.io/badge/documentation-Corbado_Backend_API_Reference-blue.svg)](https://api.corbado.com/docs/api/) + +## Requirements + +The SDK supports Go version 1.18 and above. + +## Usage + +``` +$ go get github.com/corbado/corbado-go@v0.1.0 +``` + +Import SDK in your Go files: + +```go +import "github.com/corbado/corbado-go" +``` + +Now create a new SDK client: + +```go +config := corbado.MustNewConfig("pro-12345678", "yoursecret") +sdk, err := corbado.NewSDK(config) +if err != nil { + // handle error +} + +// list all users +users, err := sdk.Users().List(context.TODO(), nil) +if err != nil { + if serverErr := corbado.AsServerError(err); serverErr != nil { + // handle server error + } +} +``` + +See [examples](https://github.com/corbado/corbado-go/tree/main/examples) for some real example code diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 0000000..3e9bba6 --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,11 @@ +version: '3' + +tasks: + lint: + desc: Runs Golang linters + cmds: + - GOFLAGS="-buildvcs=false" golangci-lint run --timeout=5m + sources: + - ./**/*.go + - ./.golangci.yml + method: checksum \ No newline at end of file diff --git a/client.go b/client.go new file mode 100644 index 0000000..ab62aa1 --- /dev/null +++ b/client.go @@ -0,0 +1,119 @@ +package corbado + +import ( + "bytes" + "context" + "fmt" + "io" + "net/http" + + "github.com/corbado/corbado-go/pkg/logger" + "github.com/corbado/corbado-go/pkg/sdk/assert" + "github.com/corbado/corbado-go/pkg/sdk/entity/api" + "github.com/deepmap/oapi-codegen/pkg/securityprovider" + "github.com/pkg/errors" +) + +func newClient(config *Config) (*api.ClientWithResponses, error) { + if err := assert.NotNil(config); err != nil { + return nil, err + } + + basicAuth, err := securityprovider.NewSecurityProviderBasicAuth(config.ProjectID, config.APISecret) + if err != nil { + return nil, errors.WithStack(err) + } + + extraOptions := []api.ClientOption{ + api.WithRequestEditorFn(newSDKVersionHeaderEditorFn), + api.WithRequestEditorFn(basicAuth.Intercept), + } + + if config.ExtraClientOptions != nil { + extraOptions = append(extraOptions, config.ExtraClientOptions...) + } + + return api.NewClientWithResponses(config.BackendAPI, extraOptions...) +} + +type httpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +type loggingClient struct { + underlying httpRequestDoer +} + +// Do implements HttpRequestDoer and executes HTTP request +func (l *loggingClient) Do(req *http.Request) (*http.Response, error) { + if err := assert.NotNil(req); err != nil { + return nil, err + } + + logger.Debug("Sending request to Public API: %s %s", req.Method, req.URL.String()) + if req.Body != nil { + requestBody, err := l.readBody(&req.Body) + if err != nil { + return nil, err + } + + logger.Debug("Request body: %s", requestBody) + } + + response, err := l.underlying.Do(req) + if err != nil { + return nil, err + } + + responseBody, err := l.readBody(&response.Body) + if err != nil { + return nil, err + } + + logger.Debug("Received response from Public API: %s", responseBody) + + return response, nil +} + +func (l *loggingClient) readBody(rc *io.ReadCloser /* nilable */) (string, error) { + if rc == nil { + return "", nil + } + + var buf bytes.Buffer + tee := io.TeeReader(*rc, &buf) + + body, err := io.ReadAll(tee) + if err != nil { + return "", errors.WithStack(err) + } + + *rc = io.NopCloser(&buf) + + return string(body), nil +} + +// newLoggingClient returns new logging HTTP client +func newLoggingClient() (*loggingClient, error) { + return &loggingClient{&http.Client{}}, nil +} + +// NewLoggingClientOption enhances HTTP client to log requests/responses +func NewLoggingClientOption() api.ClientOption { + return func(c *api.Client) error { + client, err := newLoggingClient() + if err != nil { + return err + } + + c.Client = client + + return nil + } +} + +func newSDKVersionHeaderEditorFn(_ context.Context, req *http.Request) error { + req.Header.Set("X-Corbado-SDK-Version", fmt.Sprintf("Go %s", Version)) + + return nil +} diff --git a/config.go b/config.go new file mode 100644 index 0000000..7ac96ec --- /dev/null +++ b/config.go @@ -0,0 +1,60 @@ +package corbado + +import ( + "fmt" + "net/http" + "time" + + "github.com/corbado/corbado-go/pkg/sdk/assert" + "github.com/corbado/corbado-go/pkg/sdk/entity/api" +) + +type Config struct { + ProjectID string + APISecret string + FrontendAPI string + BackendAPI string + ShortSessionCookieName string + CacheMaxAge time.Duration + JWTIssuer string + + HTTPClient *http.Client + ExtraClientOptions []api.ClientOption +} + +const ( + configDefaultBackendAPI string = "https://backendapi.corbado.io" + configDefaultFrontendAPI string = "https://%s.frontendapi.corbado.io" + configDefaultShortSessionCookieName string = "cbo_short_session" + configDefaultCacheMaxAge = time.Minute +) + +// NewConfig returns new config with sane defaults +func NewConfig(projectID string, apiSecret string) (*Config, error) { + if err := assert.StringNotEmpty(projectID); err != nil { + return nil, err + } + + if err := assert.StringNotEmpty(apiSecret); err != nil { + return nil, err + } + + return &Config{ + ProjectID: projectID, + APISecret: apiSecret, + BackendAPI: configDefaultBackendAPI, + FrontendAPI: fmt.Sprintf(configDefaultFrontendAPI, projectID), + ShortSessionCookieName: configDefaultShortSessionCookieName, + CacheMaxAge: configDefaultCacheMaxAge, + }, nil +} + +// MustNewConfig returns new config and panics if projectID or apiSecret are not specified/empty +func MustNewConfig(projectID string, apiSecret string) *Config { + config, err := NewConfig(projectID, apiSecret) + if err != nil { + panic(err) + } + + return config +} diff --git a/examples/basic/main.go b/examples/basic/main.go new file mode 100644 index 0000000..1836971 --- /dev/null +++ b/examples/basic/main.go @@ -0,0 +1,33 @@ +package main + +import ( + "context" + "fmt" + + "github.com/corbado/corbado-go" +) + +func main() { + config := corbado.MustNewConfig("pro-12345678", "yoursecret") + sdk, err := corbado.NewSDK(config) + if err != nil { + panic(err) + } + + // list all users + users, err := sdk.Users().List(context.TODO(), nil) + if err != nil { + // handle server errors and client errors differently + if serverErr := corbado.AsServerError(err); serverErr != nil { + fmt.Printf("Received server error: %s", serverErr) + + return + } else { + panic(err) + } + } + + for _, usr := range users.Data.Users { + fmt.Printf("%s: %s\n", usr.ID, usr.Name) + } +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..4548957 --- /dev/null +++ b/go.mod @@ -0,0 +1,16 @@ +module github.com/corbado/corbado-go + +go 1.18 + +require ( + github.com/MicahParks/keyfunc v1.9.0 + github.com/deepmap/oapi-codegen v1.16.2 + github.com/golang-jwt/jwt/v4 v4.4.2 + github.com/oapi-codegen/runtime v1.0.0 + github.com/pkg/errors v0.9.1 +) + +require ( + github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect + github.com/google/uuid v1.3.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..5d46542 --- /dev/null +++ b/go.sum @@ -0,0 +1,26 @@ +github.com/MicahParks/keyfunc v1.9.0 h1:lhKd5xrFHLNOWrDc4Tyb/Q1AJ4LCzQ48GVJyVIID3+o= +github.com/MicahParks/keyfunc v1.9.0/go.mod h1:IdnCilugA0O/99dW+/MkvlyrsX8+L8+x95xuVNtM5jw= +github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= +github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= +github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= +github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/deepmap/oapi-codegen v1.16.2 h1:xGHx0dNqYfy9gE8a7AVgVM8Sd5oF9SEgePzP+UPAUXI= +github.com/deepmap/oapi-codegen v1.16.2/go.mod h1:rdYoEA2GE+riuZ91DvpmBX9hJbQpuY9wchXpfQ3n+ho= +github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= +github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= +github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7oOxrWo= +github.com/oapi-codegen/runtime v1.0.0/go.mod h1:LmCUMQuPB4M/nLXilQXhHw+BLZdDb18B34OO356yJ/A= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/pkg/logger/logger.go b/pkg/logger/logger.go new file mode 100644 index 0000000..3015055 --- /dev/null +++ b/pkg/logger/logger.go @@ -0,0 +1,67 @@ +package logger + +import ( + "fmt" + "log" + "sync" +) + +type Logger interface { + Print(v ...any) +} + +type LogLevel uint + +const ( + LogLevelOff LogLevel = iota + LogLevelError LogLevel = 1 + LogLevelInfo LogLevel = 2 + LogLevelDebug LogLevel = 3 +) + +type impl struct { + logLevel LogLevel + logger Logger +} + +var ( + initLogger sync.Once + loggerInstance impl +) + +func Init(logLevel LogLevel, logger Logger) { + if logger == nil { + logger = log.Default() + } + + initLogger.Do(func() { + loggerInstance = impl{ + logLevel: logLevel, + logger: logger, + } + }) +} + +func (i *impl) log(l LogLevel, format string, args ...any) { // notest + if i.logLevel < l { + return + } + + if i.logger == nil { + return + } + + i.logger.Print(fmt.Sprintf(format, args...)) +} + +func Debug(format string, args ...any) { + loggerInstance.log(LogLevelDebug, format, args...) +} + +func Info(format string, args ...any) { + loggerInstance.log(LogLevelInfo, format, args...) +} + +func Error(format string, args ...any) { + loggerInstance.log(LogLevelError, format, args...) +} diff --git a/pkg/sdk/assert/assert.go b/pkg/sdk/assert/assert.go new file mode 100644 index 0000000..d66d93b --- /dev/null +++ b/pkg/sdk/assert/assert.go @@ -0,0 +1,63 @@ +package assert + +import ( + "fmt" + "reflect" + + "github.com/pkg/errors" +) + +// NotNil checks given value if it is not nil +func NotNil(values ...any) error { + for i, value := range values { + if value == nil { + return errors.WithStack(fmt.Errorf("assert failed: given value at index %d is nil", i)) + } + + switch reflect.TypeOf(value).Kind() { + case reflect.Ptr, reflect.Map, reflect.Array, reflect.Chan, reflect.Slice, reflect.Func: + if reflect.ValueOf(value).IsNil() { + return errors.WithStack(fmt.Errorf("assert failed: given value at index %d is nil", i)) + } + } + } + + return nil +} + +// StringLength checks a string for the given min and max length +func StringLength(value string, minLength int, maxLength int, allowedValues *[]string /* can be nil */) error { + if minLength != -1 && maxLength != -1 && minLength > maxLength { + return errors.Errorf("assert misuse: minLength should be smaller than maxLength (minLength: %d, maxLength: %d)", minLength, maxLength) + } + + lenString := len(value) + if minLength != -1 && lenString < minLength { + return errors.Errorf("assert failed: given value '%s' is too short (%d < %d)", value, lenString, minLength) + } + + if maxLength != -1 && lenString > maxLength { + return errors.Errorf("assert failed: given value '%s' is too long (%d > %d)", value, lenString, minLength) + } + + if allowedValues != nil { + found := false + for _, allowedValue := range *allowedValues { + if allowedValue == value { + found = true + break + } + } + + if !found { + return errors.Errorf("assert failed: given value '%s' is not in allowed values (%s)", value, *allowedValues) + } + } + + return nil +} + +// StringNotEmpty checks if given string is not empty +func StringNotEmpty(value string) error { + return StringLength(value, 1, -1, nil) +} diff --git a/pkg/sdk/authtoken/authtoken.go b/pkg/sdk/authtoken/authtoken.go new file mode 100644 index 0000000..abc0afc --- /dev/null +++ b/pkg/sdk/authtoken/authtoken.go @@ -0,0 +1,38 @@ +package authtoken + +import ( + "context" + + "github.com/corbado/corbado-go/pkg/sdk/entity/api" + "github.com/corbado/corbado-go/pkg/sdk/servererror" +) + +type AuthToken interface { + Validate(ctx context.Context, req api.AuthTokenValidateReq, editors ...api.RequestEditorFn) (*api.AuthTokenValidateRsp, error) +} + +type Impl struct { + client *api.ClientWithResponses +} + +var _ AuthToken = &Impl{} + +// New returns new email link client +func New(client *api.ClientWithResponses) *Impl { + return &Impl{ + client: client, + } +} + +func (i *Impl) Validate(ctx context.Context, req api.AuthTokenValidateReq, editors ...api.RequestEditorFn) (*api.AuthTokenValidateRsp, error) { + res, err := i.client.AuthTokenValidateWithResponse(ctx, req, editors...) + if err != nil { + return nil, err + } + + if res.JSONDefault != nil { + return nil, servererror.New(res.JSONDefault) + } + + return res.JSON200, nil +} diff --git a/pkg/sdk/emaillink/emaillinks.go b/pkg/sdk/emaillink/emaillinks.go new file mode 100644 index 0000000..2d4717e --- /dev/null +++ b/pkg/sdk/emaillink/emaillinks.go @@ -0,0 +1,75 @@ +package emaillink + +import ( + "context" + + "github.com/corbado/corbado-go/pkg/sdk/assert" + "github.com/corbado/corbado-go/pkg/sdk/entity/api" + "github.com/corbado/corbado-go/pkg/sdk/entity/common" + "github.com/corbado/corbado-go/pkg/sdk/servererror" +) + +type EmailLink interface { + Send(ctx context.Context, req api.EmailLinkSendReq, editors ...api.RequestEditorFn) (*api.EmailLinkSendRsp, error) + Validate(ctx context.Context, emailLinkID common.EmailLinkID, req api.EmailLinksValidateReq, editors ...api.RequestEditorFn) (*api.EmailLinkValidateRsp, error) + Get(ctx context.Context, emailLinkID common.EmailLinkID, editors ...api.RequestEditorFn) (*api.EmailLinkGetRsp, error) +} + +type Impl struct { + client *api.ClientWithResponses +} + +var _ EmailLink = &Impl{} + +// New returns new email link client +func New(client *api.ClientWithResponses) (*Impl, error) { + if err := assert.NotNil(client); err != nil { + return nil, err + } + + return &Impl{ + client: client, + }, nil +} + +// Send sends email link email to given email address +func (i *Impl) Send(ctx context.Context, req api.EmailLinkSendReq, editors ...api.RequestEditorFn) (*api.EmailLinkSendRsp, error) { + res, err := i.client.EmailLinkSendWithResponse(ctx, req, editors...) + if err != nil { + return nil, err + } + + if res.JSONDefault != nil { + return nil, servererror.New(res.JSONDefault) + } + + return res.JSON200, nil +} + +// Validate validates email link token +func (i *Impl) Validate(ctx context.Context, emailLinkID common.EmailLinkID, req api.EmailLinksValidateReq, editors ...api.RequestEditorFn) (*api.EmailLinkValidateRsp, error) { + res, err := i.client.EmailLinkValidateWithResponse(ctx, emailLinkID, req, editors...) + if err != nil { + return nil, err + } + + if res.JSONDefault != nil { + return nil, servererror.New(res.JSONDefault) + } + + return res.JSON200, nil +} + +// Get gets email link +func (i *Impl) Get(ctx context.Context, emailLinkID common.EmailLinkID, editors ...api.RequestEditorFn) (*api.EmailLinkGetRsp, error) { + res, err := i.client.EmailLinkGetWithResponse(ctx, emailLinkID, editors...) + if err != nil { + return nil, err + } + + if res.JSONDefault != nil { + return nil, servererror.New(res.JSONDefault) + } + + return res.JSON200, nil +} diff --git a/pkg/sdk/entity/api/api.gen.go b/pkg/sdk/entity/api/api.gen.go new file mode 100644 index 0000000..1ff7730 --- /dev/null +++ b/pkg/sdk/entity/api/api.gen.go @@ -0,0 +1,17530 @@ +// Package api provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.0 DO NOT EDIT. +package api + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "strings" + + externalRef0 "github.com/corbado/corbado-go/pkg/sdk/entity/common" + "github.com/oapi-codegen/runtime" +) + +const ( + BasicAuthScopes = "basicAuth.Scopes" + BearerAuthScopes = "bearerAuth.Scopes" + ProjectIDScopes = "projectID.Scopes" +) + +// Defines values for EmailCodeStatus. +const ( + EmailCodeStatusActive EmailCodeStatus = "active" + EmailCodeStatusConfirmed EmailCodeStatus = "confirmed" +) + +// Defines values for EmailLinkStatus. +const ( + EmailLinkStatusActive EmailLinkStatus = "active" + EmailLinkStatusConfirmed EmailLinkStatus = "confirmed" +) + +// Defines values for EmailLinkSendReqPurpose. +const ( + Authentication EmailLinkSendReqPurpose = "authentication" + Confirmation EmailLinkSendReqPurpose = "confirmation" + Invitation EmailLinkSendReqPurpose = "invitation" +) + +// Defines values for EmailTemplateCreateReqLang. +const ( + De EmailTemplateCreateReqLang = "de" + En EmailTemplateCreateReqLang = "en" + Fr EmailTemplateCreateReqLang = "fr" +) + +// Defines values for EmailTemplateCreateReqType. +const ( + EmailTemplateCreateReqTypeEmailCode EmailTemplateCreateReqType = "email_code" + EmailTemplateCreateReqTypeEmailLink EmailTemplateCreateReqType = "email_link" + EmailTemplateCreateReqTypeEmailLinkLogin EmailTemplateCreateReqType = "email_link_login" + EmailTemplateCreateReqTypeLoginNotification EmailTemplateCreateReqType = "login_notification" + EmailTemplateCreateReqTypePasskeyNotification EmailTemplateCreateReqType = "passkey_notification" +) + +// Defines values for EmailValidationResultValidationCode. +const ( + EmailValidationResultValidationCodeInvalidSyntax EmailValidationResultValidationCode = "invalid_syntax" + EmailValidationResultValidationCodeNoSuchHost EmailValidationResultValidationCode = "no_such_host" + EmailValidationResultValidationCodeNotAllowed EmailValidationResultValidationCode = "not_allowed" + EmailValidationResultValidationCodeUnknown EmailValidationResultValidationCode = "unknown" + EmailValidationResultValidationCodeValid EmailValidationResultValidationCode = "valid" +) + +// Defines values for ExampleGetRspExtension. +const ( + TarGz ExampleGetRspExtension = "tar.gz" + Zip ExampleGetRspExtension = "zip" +) + +// Defines values for LongSessionStatus. +const ( + LongSessionStatusActive LongSessionStatus = "active" + LongSessionStatusExpired LongSessionStatus = "expired" + LongSessionStatusInactivityReached LongSessionStatus = "inactivity_reached" + LongSessionStatusLoggedOut LongSessionStatus = "logged_out" + LongSessionStatusRevoked LongSessionStatus = "revoked" +) + +// Defines values for PhoneNumberValidationResultValidationCode. +const ( + PhoneNumberValidationResultValidationCodeInvalidCountryCode PhoneNumberValidationResultValidationCode = "invalid_country_code" + PhoneNumberValidationResultValidationCodeInvalidNumber PhoneNumberValidationResultValidationCode = "invalid_number" + PhoneNumberValidationResultValidationCodeTooLong PhoneNumberValidationResultValidationCode = "too_long" + PhoneNumberValidationResultValidationCodeValid PhoneNumberValidationResultValidationCode = "valid" +) + +// Defines values for ProjectConfigAppType. +const ( + ProjectConfigAppTypeNative ProjectConfigAppType = "native" + ProjectConfigAppTypeWeb ProjectConfigAppType = "web" +) + +// Defines values for ProjectConfigBackendLanguage. +const ( + ProjectConfigBackendLanguageGo ProjectConfigBackendLanguage = "go" + ProjectConfigBackendLanguageJavascript ProjectConfigBackendLanguage = "javascript" + ProjectConfigBackendLanguagePhp ProjectConfigBackendLanguage = "php" +) + +// Defines values for ProjectConfigEnvironment. +const ( + ProjectConfigEnvironmentDev ProjectConfigEnvironment = "dev" + ProjectConfigEnvironmentProd ProjectConfigEnvironment = "prod" +) + +// Defines values for ProjectConfigFrontendFramework. +const ( + ProjectConfigFrontendFrameworkReact ProjectConfigFrontendFramework = "react" + ProjectConfigFrontendFrameworkVanillajs ProjectConfigFrontendFramework = "vanillajs" + ProjectConfigFrontendFrameworkVuejs ProjectConfigFrontendFramework = "vuejs" +) + +// Defines values for ProjectConfigPasskeyAppendInterval. +const ( + ProjectConfigPasskeyAppendIntervalN0d ProjectConfigPasskeyAppendInterval = "0d" + ProjectConfigPasskeyAppendIntervalN1d ProjectConfigPasskeyAppendInterval = "1d" + ProjectConfigPasskeyAppendIntervalN1m ProjectConfigPasskeyAppendInterval = "1m" + ProjectConfigPasskeyAppendIntervalN1w ProjectConfigPasskeyAppendInterval = "1w" + ProjectConfigPasskeyAppendIntervalN3d ProjectConfigPasskeyAppendInterval = "3d" + ProjectConfigPasskeyAppendIntervalN3m ProjectConfigPasskeyAppendInterval = "3m" + ProjectConfigPasskeyAppendIntervalN3w ProjectConfigPasskeyAppendInterval = "3w" +) + +// Defines values for ProjectConfigStatus. +const ( + ProjectConfigStatusActive ProjectConfigStatus = "active" + ProjectConfigStatusConfiguring ProjectConfigStatus = "configuring" +) + +// Defines values for ProjectConfigSaveReqAppType. +const ( + ProjectConfigSaveReqAppTypeNative ProjectConfigSaveReqAppType = "native" + ProjectConfigSaveReqAppTypeWeb ProjectConfigSaveReqAppType = "web" +) + +// Defines values for ProjectConfigSaveReqBackendLanguage. +const ( + ProjectConfigSaveReqBackendLanguageGo ProjectConfigSaveReqBackendLanguage = "go" + ProjectConfigSaveReqBackendLanguageJavascript ProjectConfigSaveReqBackendLanguage = "javascript" + ProjectConfigSaveReqBackendLanguagePhp ProjectConfigSaveReqBackendLanguage = "php" +) + +// Defines values for ProjectConfigSaveReqEnvironment. +const ( + ProjectConfigSaveReqEnvironmentDev ProjectConfigSaveReqEnvironment = "dev" + ProjectConfigSaveReqEnvironmentProd ProjectConfigSaveReqEnvironment = "prod" +) + +// Defines values for ProjectConfigSaveReqExternalApplicationProtocolVersion. +const ( + V1 ProjectConfigSaveReqExternalApplicationProtocolVersion = "v1" + V2 ProjectConfigSaveReqExternalApplicationProtocolVersion = "v2" +) + +// Defines values for ProjectConfigSaveReqFrontendFramework. +const ( + ProjectConfigSaveReqFrontendFrameworkReact ProjectConfigSaveReqFrontendFramework = "react" + ProjectConfigSaveReqFrontendFrameworkVanillajs ProjectConfigSaveReqFrontendFramework = "vanillajs" + ProjectConfigSaveReqFrontendFrameworkVuejs ProjectConfigSaveReqFrontendFramework = "vuejs" +) + +// Defines values for ProjectConfigSaveReqPasskeyAppendInterval. +const ( + ProjectConfigSaveReqPasskeyAppendIntervalN0d ProjectConfigSaveReqPasskeyAppendInterval = "0d" + ProjectConfigSaveReqPasskeyAppendIntervalN1d ProjectConfigSaveReqPasskeyAppendInterval = "1d" + ProjectConfigSaveReqPasskeyAppendIntervalN1m ProjectConfigSaveReqPasskeyAppendInterval = "1m" + ProjectConfigSaveReqPasskeyAppendIntervalN1w ProjectConfigSaveReqPasskeyAppendInterval = "1w" + ProjectConfigSaveReqPasskeyAppendIntervalN3d ProjectConfigSaveReqPasskeyAppendInterval = "3d" + ProjectConfigSaveReqPasskeyAppendIntervalN3m ProjectConfigSaveReqPasskeyAppendInterval = "3m" + ProjectConfigSaveReqPasskeyAppendIntervalN3w ProjectConfigSaveReqPasskeyAppendInterval = "3w" +) + +// Defines values for ProjectConfigWebhookTestReqAction. +const ( + AuthMethods ProjectConfigWebhookTestReqAction = "authMethods" + PasswordVerify ProjectConfigWebhookTestReqAction = "passwordVerify" +) + +// Defines values for SessionConfigLongInactivityUnit. +const ( + SessionConfigLongInactivityUnitDay SessionConfigLongInactivityUnit = "day" + SessionConfigLongInactivityUnitHour SessionConfigLongInactivityUnit = "hour" + SessionConfigLongInactivityUnitMin SessionConfigLongInactivityUnit = "min" +) + +// Defines values for SessionConfigLongLifetimeUnit. +const ( + SessionConfigLongLifetimeUnitDay SessionConfigLongLifetimeUnit = "day" + SessionConfigLongLifetimeUnitHour SessionConfigLongLifetimeUnit = "hour" + SessionConfigLongLifetimeUnitMin SessionConfigLongLifetimeUnit = "min" +) + +// Defines values for SessionConfigShortCookieSameSite. +const ( + SessionConfigShortCookieSameSiteLax SessionConfigShortCookieSameSite = "lax" + SessionConfigShortCookieSameSiteNone SessionConfigShortCookieSameSite = "none" + SessionConfigShortCookieSameSiteStrict SessionConfigShortCookieSameSite = "strict" +) + +// Defines values for SessionConfigUpdateReqLongInactivityUnit. +const ( + SessionConfigUpdateReqLongInactivityUnitHour SessionConfigUpdateReqLongInactivityUnit = "hour" + SessionConfigUpdateReqLongInactivityUnitMin SessionConfigUpdateReqLongInactivityUnit = "min" +) + +// Defines values for SessionConfigUpdateReqLongLifetimeUnit. +const ( + SessionConfigUpdateReqLongLifetimeUnitHour SessionConfigUpdateReqLongLifetimeUnit = "hour" + SessionConfigUpdateReqLongLifetimeUnitMin SessionConfigUpdateReqLongLifetimeUnit = "min" +) + +// Defines values for SessionConfigUpdateReqShortCookieSameSite. +const ( + SessionConfigUpdateReqShortCookieSameSiteLax SessionConfigUpdateReqShortCookieSameSite = "lax" + SessionConfigUpdateReqShortCookieSameSiteNone SessionConfigUpdateReqShortCookieSameSite = "none" + SessionConfigUpdateReqShortCookieSameSiteStrict SessionConfigUpdateReqShortCookieSameSite = "strict" +) + +// Defines values for SmsTemplateCreateReqType. +const ( + SmsTemplateCreateReqTypePasskeyNotification SmsTemplateCreateReqType = "passkey_notification" + SmsTemplateCreateReqTypeSmsCode SmsTemplateCreateReqType = "sms_code" +) + +// Defines values for TrackingOSDetailedStatsOsPlatform. +const ( + Desktop TrackingOSDetailedStatsOsPlatform = "desktop" + Mobile TrackingOSDetailedStatsOsPlatform = "mobile" + Unknown TrackingOSDetailedStatsOsPlatform = "unknown" +) + +// Defines values for WebAuthnAssociateStartRspStatus. +const ( + WebAuthnAssociateStartRspStatusDuplicate WebAuthnAssociateStartRspStatus = "duplicate" + WebAuthnAssociateStartRspStatusSuccess WebAuthnAssociateStartRspStatus = "success" +) + +// Defines values for WebAuthnAuthenticateFinishRspStatus. +const ( + WebAuthnAuthenticateFinishRspStatusSuccess WebAuthnAuthenticateFinishRspStatus = "success" + WebAuthnAuthenticateFinishRspStatusUnconfirmedCredential WebAuthnAuthenticateFinishRspStatus = "unconfirmedCredential" +) + +// Defines values for WebAuthnAuthenticateStartRspStatus. +const ( + WebAuthnAuthenticateStartRspStatusSuccess WebAuthnAuthenticateStartRspStatus = "success" + WebAuthnAuthenticateStartRspStatusUnconfirmedDevice WebAuthnAuthenticateStartRspStatus = "unconfirmedDevice" + WebAuthnAuthenticateStartRspStatusUnknownDevice WebAuthnAuthenticateStartRspStatus = "unknownDevice" +) + +// Defines values for WebAuthnCredentialItemRspStatus. +const ( + WebAuthnCredentialItemRspStatusActive WebAuthnCredentialItemRspStatus = "active" + WebAuthnCredentialItemRspStatusPending WebAuthnCredentialItemRspStatus = "pending" +) + +// Defines values for WebAuthnCredentialItemRspTransport. +const ( + Ble WebAuthnCredentialItemRspTransport = "ble" + Hybrid WebAuthnCredentialItemRspTransport = "hybrid" + Internal WebAuthnCredentialItemRspTransport = "internal" + Nfc WebAuthnCredentialItemRspTransport = "nfc" + SmartCard WebAuthnCredentialItemRspTransport = "smart-card" + Usb WebAuthnCredentialItemRspTransport = "usb" +) + +// Defines values for WebAuthnCredentialReqStatus. +const ( + WebAuthnCredentialReqStatusActive WebAuthnCredentialReqStatus = "active" + WebAuthnCredentialReqStatusDeleted WebAuthnCredentialReqStatus = "deleted" + WebAuthnCredentialReqStatusPending WebAuthnCredentialReqStatus = "pending" +) + +// Defines values for WebAuthnCredentialRspStatus. +const ( + WebAuthnCredentialRspStatusActive WebAuthnCredentialRspStatus = "active" + WebAuthnCredentialRspStatusDeleted WebAuthnCredentialRspStatus = "deleted" + WebAuthnCredentialRspStatusPending WebAuthnCredentialRspStatus = "pending" +) + +// Defines values for WebAuthnRegisterFinishRspStatus. +const ( + WebAuthnRegisterFinishRspStatusDuplicate WebAuthnRegisterFinishRspStatus = "duplicate" + WebAuthnRegisterFinishRspStatusSuccess WebAuthnRegisterFinishRspStatus = "success" +) + +// Defines values for WebAuthnRegisterStartReqCredentialStatus. +const ( + WebAuthnRegisterStartReqCredentialStatusActive WebAuthnRegisterStartReqCredentialStatus = "active" + WebAuthnRegisterStartReqCredentialStatusPending WebAuthnRegisterStartReqCredentialStatus = "pending" +) + +// Defines values for WebAuthnRegisterStartRspStatus. +const ( + Duplicate WebAuthnRegisterStartRspStatus = "duplicate" + Success WebAuthnRegisterStartRspStatus = "success" +) + +// Defines values for ExampleGetParamsFileName. +const ( + WebcomponentPhpSymfonyTarGz ExampleGetParamsFileName = "webcomponent-php-symfony.tar.gz" + WebcomponentPhpSymfonyZip ExampleGetParamsFileName = "webcomponent-php-symfony.zip" +) + +// AndroidAppConfigDeleteReq defines model for androidAppConfigDeleteReq. +type AndroidAppConfigDeleteReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// AndroidAppConfigItem defines model for androidAppConfigItem. +type AndroidAppConfigItem struct { + Base64URL string `json:"base64URL"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + Fingerprint string `json:"fingerprint"` + + // Id ID of Android app configuration + Id string `json:"id"` + PackageName string `json:"packageName"` + + // ProjectID ID of project + ProjectID externalRef0.ProjectID `json:"projectID"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` +} + +// AndroidAppConfigListRsp defines model for androidAppConfigListRsp. +type AndroidAppConfigListRsp struct { + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + Paging externalRef0.Paging `json:"paging"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + Rows []AndroidAppConfigItem `json:"rows"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// AndroidAppConfigSaveReq defines model for androidAppConfigSaveReq. +type AndroidAppConfigSaveReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + Fingerprint string `json:"fingerprint"` + PackageName string `json:"packageName"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// AndroidAppConfigSaveRsp defines model for androidAppConfigSaveRsp. +type AndroidAppConfigSaveRsp struct { + Base64URL string `json:"base64URL"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + Fingerprint string `json:"fingerprint"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + + // Id ID of Android app configuration + Id string `json:"id"` + Message string `json:"message"` + PackageName string `json:"packageName"` + + // ProjectID ID of project + ProjectID externalRef0.ProjectID `json:"projectID"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` +} + +// AndroidAppConfigUpdateReq defines model for androidAppConfigUpdateReq. +type AndroidAppConfigUpdateReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + Fingerprint string `json:"fingerprint"` + PackageName string `json:"packageName"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// AndroidAppConfigUpdateRsp defines model for androidAppConfigUpdateRsp. +type AndroidAppConfigUpdateRsp struct { + Base64URL string `json:"base64URL"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + Fingerprint string `json:"fingerprint"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + + // Id ID of Android app configuration + Id string `json:"id"` + Message string `json:"message"` + PackageName string `json:"packageName"` + + // ProjectID ID of project + ProjectID externalRef0.ProjectID `json:"projectID"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` +} + +// AssociationTokenCreateReq defines model for associationTokenCreateReq. +type AssociationTokenCreateReq struct { + ClientInfo externalRef0.ClientInfo `json:"clientInfo"` + LoginIdentifier string `json:"loginIdentifier"` + + // LoginIdentifierType Login Identifier type + LoginIdentifierType externalRef0.LoginIdentifierType `json:"loginIdentifierType"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// AssociationTokenCreateRsp defines model for associationTokenCreateRsp. +type AssociationTokenCreateRsp struct { + Data struct { + RejectionReason *string `json:"rejectionReason,omitempty"` + Token *string `json:"token,omitempty"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// AuthMethodsListReq defines model for authMethodsListReq. +type AuthMethodsListReq struct { + ClientInfo externalRef0.ClientInfo `json:"clientInfo"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + + // Username Client's username + Username string `json:"username"` +} + +// AuthMethodsListRsp defines model for authMethodsListRsp. +type AuthMethodsListRsp struct { + Data struct { + Paging externalRef0.Paging `json:"paging"` + PossibleMethods externalRef0.AuthMethods `json:"possibleMethods"` + SelectMethods externalRef0.AuthMethods `json:"selectMethods"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// AuthTokenValidateReq defines model for authTokenValidateReq. +type AuthTokenValidateReq struct { + ClientInfo externalRef0.ClientInfo `json:"clientInfo"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + Token string `json:"token"` +} + +// AuthTokenValidateRsp defines model for authTokenValidateRsp. +type AuthTokenValidateRsp struct { + Data struct { + // User User entry with emails and phone numbers + User externalRef0.FullUser `json:"user"` + UserData string `json:"userData"` + + // UserID ID of the user + UserID externalRef0.UserID `json:"userID"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// CustomLoginIdentifier defines model for customLoginIdentifier. +type CustomLoginIdentifier struct { + // ID ID of the phone number + ID externalRef0.PhoneNumberID `json:"ID"` + AdditionalData *string `json:"additionalData,omitempty"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + Identifier string `json:"identifier"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` +} + +// Email defines model for email. +type Email struct { + // ID ID of the email + ID externalRef0.EmailID `json:"ID"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + + // Deleted Timestamp of when the entity was deleted in yyyy-MM-dd'T'HH:mm:ss format + Deleted *externalRef0.Deleted `json:"deleted,omitempty"` + Email string `json:"email"` + + // Status Generic status that can describe Corbado entities + Status externalRef0.Status `json:"status"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` +} + +// EmailCode defines model for emailCode. +type EmailCode struct { + // ID ID of the email OTP + ID externalRef0.EmailCodeID `json:"ID"` + + // AdditionalPayload Additional payload in JSON format + AdditionalPayload externalRef0.AdditionalPayload `json:"additionalPayload"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + Email string `json:"email"` + + // Status status values of an email OTP + Status EmailCodeStatus `json:"status"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` + UserFullName *string `json:"userFullName,omitempty"` + + // UserID ID of the user + UserID externalRef0.UserID `json:"userID"` +} + +// EmailCodeStatus status values of an email OTP +type EmailCodeStatus string + +// EmailCodeGetRsp defines model for emailCodeGetRsp. +type EmailCodeGetRsp struct { + Data struct { + EmailCode EmailCode `json:"emailCode"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// EmailCodeSendReq defines model for emailCodeSendReq. +type EmailCodeSendReq struct { + // AdditionalPayload Additional payload in JSON format + AdditionalPayload *externalRef0.AdditionalPayload `json:"additionalPayload,omitempty"` + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // Create Defines if user email should be created if not found + Create bool `json:"create"` + + // Email Recipient email address + Email string `json:"email"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + + // TemplateName Template name of email to send + TemplateName *string `json:"templateName,omitempty"` + + // TokenLifetime Defines the lifetime of the token that needs to be validated + TokenLifetime *string `json:"tokenLifetime,omitempty"` + + // UserFullName Optional user's full name to be used if the user wasn't found and needs to be created first + UserFullName *string `json:"userFullName,omitempty"` +} + +// EmailCodeSendRsp defines model for emailCodeSendRsp. +type EmailCodeSendRsp struct { + Data struct { + EmailCodeID string `json:"emailCodeID"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// EmailCodeValidateReq defines model for emailCodeValidateReq. +type EmailCodeValidateReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // Code Email OTP to validate + Code string `json:"code"` + CreateLoginToken *bool `json:"createLoginToken,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// EmailCodeValidateRsp defines model for emailCodeValidateRsp. +type EmailCodeValidateRsp struct { + // AdditionalPayload Additional payload in JSON format + AdditionalPayload *externalRef0.AdditionalPayload `json:"additionalPayload,omitempty"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + LoginToken *string `json:"loginToken,omitempty"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + UserEmail string `json:"userEmail"` + UserFullName string `json:"userFullName"` + + // UserID ID of the user + UserID externalRef0.UserID `json:"userID"` +} + +// EmailLink defines model for emailLink. +type EmailLink struct { + // ID ID of the email magic link + ID externalRef0.EmailLinkID `json:"ID"` + + // AdditionalPayload Additional payload in JSON format + AdditionalPayload externalRef0.AdditionalPayload `json:"additionalPayload"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + Email string `json:"email"` + Purpose *string `json:"purpose,omitempty"` + + // Status status values of an email link + Status EmailLinkStatus `json:"status"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` + UserFullName *string `json:"userFullName,omitempty"` + + // UserID ID of the user + UserID externalRef0.UserID `json:"userID"` +} + +// EmailLinkStatus status values of an email link +type EmailLinkStatus string + +// EmailLinkGetRsp defines model for emailLinkGetRsp. +type EmailLinkGetRsp struct { + Data struct { + EmailLink EmailLink `json:"emailLink"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// EmailLinkSendReq defines model for emailLinkSendReq. +type EmailLinkSendReq struct { + // AdditionalPayload Additional payload in JSON format + AdditionalPayload *externalRef0.AdditionalPayload `json:"additionalPayload,omitempty"` + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // Create Defines if user email should be created if not found + Create bool `json:"create"` + + // Email Recipient email address + Email string `json:"email"` + + // Purpose Purpose of the email link + Purpose *EmailLinkSendReqPurpose `json:"purpose,omitempty"` + + // Redirect Redirect target after user clicks on email magic link + Redirect string `json:"redirect"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + + // TemplateName Template name of email to send + TemplateName *string `json:"templateName,omitempty"` + + // TokenLifetime Defines the lifetime of the token that needs to be validated + TokenLifetime *string `json:"tokenLifetime,omitempty"` + + // UserFullName Optional user's full name to be used if the user wasn't found and needs to be created first + UserFullName *string `json:"userFullName,omitempty"` +} + +// EmailLinkSendReqPurpose Purpose of the email link +type EmailLinkSendReqPurpose string + +// EmailLinkSendRsp defines model for emailLinkSendRsp. +type EmailLinkSendRsp struct { + Data struct { + EmailLinkID string `json:"emailLinkID"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// EmailLinkValidateRsp defines model for emailLinkValidateRsp. +type EmailLinkValidateRsp struct { + // AdditionalPayload Additional payload in JSON format + AdditionalPayload *externalRef0.AdditionalPayload `json:"additionalPayload,omitempty"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + LoginToken *string `json:"loginToken,omitempty"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + UserEmail string `json:"userEmail"` + UserFullName string `json:"userFullName"` + + // UserID ID of the user + UserID externalRef0.UserID `json:"userID"` +} + +// EmailLinksDeleteReq defines model for emailLinksDeleteReq. +type EmailLinksDeleteReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID externalRef0.RequestID `json:"requestID"` +} + +// EmailLinksValidateReq defines model for emailLinksValidateReq. +type EmailLinksValidateReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + CreateLoginToken *bool `json:"createLoginToken,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + + // Token Token to validate + Token string `json:"token"` +} + +// EmailTemplateCreateReq defines model for emailTemplateCreateReq. +type EmailTemplateCreateReq struct { + Action *string `json:"action,omitempty"` + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + HtmlColorBackgroundInner string `json:"htmlColorBackgroundInner"` + HtmlColorBackgroundOuter string `json:"htmlColorBackgroundOuter"` + HtmlColorButton string `json:"htmlColorButton"` + HtmlColorButtonFont string `json:"htmlColorButtonFont"` + HtmlColorFont string `json:"htmlColorFont"` + HtmlTextBody string `json:"htmlTextBody"` + HtmlTextButton string `json:"htmlTextButton"` + HtmlTextTitle string `json:"htmlTextTitle"` + IsDefault bool `json:"isDefault"` + Lang EmailTemplateCreateReqLang `json:"lang"` + Name string `json:"name"` + PlainTextBody string `json:"plainTextBody"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + Subject string `json:"subject"` + Type EmailTemplateCreateReqType `json:"type"` +} + +// EmailTemplateCreateReqLang defines model for EmailTemplateCreateReq.Lang. +type EmailTemplateCreateReqLang string + +// EmailTemplateCreateReqType defines model for EmailTemplateCreateReq.Type. +type EmailTemplateCreateReqType string + +// EmailTemplateCreateRsp defines model for emailTemplateCreateRsp. +type EmailTemplateCreateRsp struct { + Data struct { + EmailTemplateID string `json:"emailTemplateID"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// EmailTemplateDeleteReq defines model for emailTemplateDeleteReq. +type EmailTemplateDeleteReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// EmailValidationResult defines model for emailValidationResult. +type EmailValidationResult struct { + Email *ValidationEmail `json:"email,omitempty"` + IsValid bool `json:"isValid"` + Suggestion *string `json:"suggestion,omitempty"` + ValidationCode EmailValidationResultValidationCode `json:"validationCode"` +} + +// EmailValidationResultValidationCode defines model for EmailValidationResult.ValidationCode. +type EmailValidationResultValidationCode string + +// EmptyReq defines model for emptyReq. +type EmptyReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// ExampleGetRsp defines model for exampleGetRsp. +type ExampleGetRsp struct { + // Data Base64 encoded data containing the compressed example file + Data string `json:"data"` + + // Extension The extension of the compressed example file + Extension ExampleGetRspExtension `json:"extension"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// ExampleGetRspExtension The extension of the compressed example file +type ExampleGetRspExtension string + +// IOSAppConfigDeleteReq defines model for iOSAppConfigDeleteReq. +type IOSAppConfigDeleteReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// IOSAppConfigItem defines model for iOSAppConfigItem. +type IOSAppConfigItem struct { + AppIDPrefix string `json:"appIDPrefix"` + BundleID string `json:"bundleID"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + + // Id ID of iOS app + Id string `json:"id"` + + // ProjectID ID of project + ProjectID externalRef0.ProjectID `json:"projectID"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` +} + +// IOSAppConfigListRsp defines model for iOSAppConfigListRsp. +type IOSAppConfigListRsp struct { + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + Paging externalRef0.Paging `json:"paging"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + Rows []IOSAppConfigItem `json:"rows"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// IOSAppConfigSaveReq defines model for iOSAppConfigSaveReq. +type IOSAppConfigSaveReq struct { + AppIDPrefix string `json:"appIDPrefix"` + BundleID string `json:"bundleID"` + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// IOSAppConfigSaveRsp defines model for iOSAppConfigSaveRsp. +type IOSAppConfigSaveRsp struct { + AppIDPrefix string `json:"appIDPrefix"` + BundleID string `json:"bundleID"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + + // Id ID of iOS app + Id string `json:"id"` + Message string `json:"message"` + + // ProjectID ID of project + ProjectID externalRef0.ProjectID `json:"projectID"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` +} + +// IOSAppConfigUpdateReq defines model for iOSAppConfigUpdateReq. +type IOSAppConfigUpdateReq struct { + AppIDPrefix string `json:"appIDPrefix"` + BundleID string `json:"bundleID"` + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// IOSAppConfigUpdateRsp defines model for iOSAppConfigUpdateRsp. +type IOSAppConfigUpdateRsp struct { + AppIDPrefix string `json:"appIDPrefix"` + BundleID string `json:"bundleID"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + + // Id ID of iOS app + Id string `json:"id"` + Message string `json:"message"` + + // ProjectID ID of project + ProjectID externalRef0.ProjectID `json:"projectID"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` +} + +// LongSession defines model for longSession. +type LongSession struct { + ID string `json:"ID"` + BrowserName string `json:"browserName"` + BrowserVersion string `json:"browserVersion"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + + // DeviceID ID of the device + DeviceID externalRef0.DeviceID `json:"deviceID"` + + // Expires Timestamp of when long session expires in yyyy-MM-dd'T'HH:mm:ss format + Expires string `json:"expires"` + + // LastAction Timestamp of when last action was done on long session in yyyy-MM-dd'T'HH:mm:ss format + LastAction string `json:"lastAction"` + OsName string `json:"osName"` + OsVersion string `json:"osVersion"` + + // Status status values of a long session + Status LongSessionStatus `json:"status"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` + UserFullName string `json:"userFullName"` + + // UserID ID of the user + UserID externalRef0.UserID `json:"userID"` + UserIdentifier string `json:"userIdentifier"` +} + +// LongSessionStatus status values of a long session +type LongSessionStatus string + +// LongSessionGetRsp defines model for longSessionGetRsp. +type LongSessionGetRsp struct { + Data struct { + LongSession LongSession `json:"longSession"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// LongSessionListRsp defines model for longSessionListRsp. +type LongSessionListRsp struct { + Data struct { + LongSessions []LongSession `json:"longSessions"` + Paging externalRef0.Paging `json:"paging"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// LongSessionRevokeReq defines model for longSessionRevokeReq. +type LongSessionRevokeReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// Origin External application address including protocol and port when not 80 or 443 +type Origin = string + +// OriginAllowedReq defines model for originAllowedReq. +type OriginAllowedReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + Origin string `json:"origin"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// OriginAllowedRsp defines model for originAllowedRsp. +type OriginAllowedRsp struct { + Allowed bool `json:"allowed"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// PhoneNumber defines model for phoneNumber. +type PhoneNumber struct { + // ID ID of the phone number + ID externalRef0.PhoneNumberID `json:"ID"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + PhoneNumber string `json:"phoneNumber"` + + // Status Generic status that can describe Corbado entities + Status externalRef0.Status `json:"status"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` +} + +// PhoneNumberValidationResult defines model for phoneNumberValidationResult. +type PhoneNumberValidationResult struct { + IsValid bool `json:"isValid"` + PhoneNumber *ValidationPhoneNumber `json:"phoneNumber,omitempty"` + ValidationCode PhoneNumberValidationResultValidationCode `json:"validationCode"` +} + +// PhoneNumberValidationResultValidationCode defines model for PhoneNumberValidationResult.ValidationCode. +type PhoneNumberValidationResultValidationCode string + +// ProjectConfig defines model for projectConfig. +type ProjectConfig struct { + AllowIPStickiness *bool `json:"allowIPStickiness,omitempty"` + AllowUserRegistration *bool `json:"allowUserRegistration,omitempty"` + AppType *ProjectConfigAppType `json:"appType,omitempty"` + ApplicationUrl string `json:"applicationUrl"` + AuthSuccessRedirectUrl *string `json:"authSuccessRedirectUrl,omitempty"` + AutoDetectLanguage bool `json:"autoDetectLanguage"` + BackendAPIUrl string `json:"backendAPIUrl"` + BackendLanguage *ProjectConfigBackendLanguage `json:"backendLanguage,omitempty"` + CliSecret *string `json:"cliSecret,omitempty"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + Domain *string `json:"domain,omitempty"` + DoubleOptIn bool `json:"doubleOptIn"` + EmailFrom string `json:"emailFrom"` + Environment *ProjectConfigEnvironment `json:"environment,omitempty"` + ExternalApplicationPassword *string `json:"externalApplicationPassword,omitempty"` + ExternalApplicationProtocolVersion *string `json:"externalApplicationProtocolVersion,omitempty"` + ExternalApplicationUsername *string `json:"externalApplicationUsername,omitempty"` + ExternalName string `json:"externalName"` + FallbackLanguage string `json:"fallbackLanguage"` + FrontendAPIUrl string `json:"frontendAPIUrl"` + FrontendFramework *ProjectConfigFrontendFramework `json:"frontendFramework,omitempty"` + HasExistingUsers bool `json:"hasExistingUsers"` + HasGeneratedSession bool `json:"hasGeneratedSession"` + HasStartedUsingPasskeys bool `json:"hasStartedUsingPasskeys"` + HasStartedUsingSessions bool `json:"hasStartedUsingSessions"` + HasVerifiedSession bool `json:"hasVerifiedSession"` + IntegrationModeAPI bool `json:"integrationModeAPI"` + IntegrationModeHosted bool `json:"integrationModeHosted"` + IntegrationModeWebComponent bool `json:"integrationModeWebComponent"` + LegacyAuthMethodsUrl *string `json:"legacyAuthMethodsUrl,omitempty"` + PasskeyAppendInterval *ProjectConfigPasskeyAppendInterval `json:"passkeyAppendInterval,omitempty"` + PasswordResetUrl *string `json:"passwordResetUrl,omitempty"` + PasswordVerifyUrl *string `json:"passwordVerifyUrl,omitempty"` + ProductKey *string `json:"productKey,omitempty"` + + // ProjectID ID of project + ProjectID externalRef0.ProjectID `json:"projectID"` + SmsFrom string `json:"smsFrom"` + SmtpHost *string `json:"smtpHost,omitempty"` + SmtpPassword *string `json:"smtpPassword,omitempty"` + SmtpPort *int `json:"smtpPort,omitempty"` + SmtpUseCustom *bool `json:"smtpUseCustom,omitempty"` + SmtpUsername *string `json:"smtpUsername,omitempty"` + Status ProjectConfigStatus `json:"status"` + SupportEmail *string `json:"supportEmail,omitempty"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` + UseCli bool `json:"useCli"` + UserFullNameRequired bool `json:"userFullNameRequired"` + WebComponentDebug bool `json:"webComponentDebug"` + WebauthnRPID string `json:"webauthnRPID"` + WebhookPassword *string `json:"webhookPassword,omitempty"` + WebhookTestInvalidUsername *string `json:"webhookTestInvalidUsername,omitempty"` + WebhookTestValidPassword *string `json:"webhookTestValidPassword,omitempty"` + WebhookTestValidUsername *string `json:"webhookTestValidUsername,omitempty"` + WebhookURL *string `json:"webhookURL,omitempty"` + WebhookUsername *string `json:"webhookUsername,omitempty"` +} + +// ProjectConfigAppType defines model for ProjectConfig.AppType. +type ProjectConfigAppType string + +// ProjectConfigBackendLanguage defines model for ProjectConfig.BackendLanguage. +type ProjectConfigBackendLanguage string + +// ProjectConfigEnvironment defines model for ProjectConfig.Environment. +type ProjectConfigEnvironment string + +// ProjectConfigFrontendFramework defines model for ProjectConfig.FrontendFramework. +type ProjectConfigFrontendFramework string + +// ProjectConfigPasskeyAppendInterval defines model for ProjectConfig.PasskeyAppendInterval. +type ProjectConfigPasskeyAppendInterval string + +// ProjectConfigStatus defines model for ProjectConfig.Status. +type ProjectConfigStatus string + +// ProjectConfigGetRsp defines model for projectConfigGetRsp. +type ProjectConfigGetRsp struct { + Data ProjectConfig `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// ProjectConfigSaveReq defines model for projectConfigSaveReq. +type ProjectConfigSaveReq struct { + AllowIPStickiness *bool `json:"allowIPStickiness,omitempty"` + AllowUserRegistration *bool `json:"allowUserRegistration,omitempty"` + AppType *ProjectConfigSaveReqAppType `json:"appType,omitempty"` + ApplicationUrl *string `json:"applicationUrl,omitempty"` + AuthSuccessRedirectUrl *string `json:"authSuccessRedirectUrl,omitempty"` + AutoDetectLanguage *bool `json:"autoDetectLanguage,omitempty"` + BackendLanguage *ProjectConfigSaveReqBackendLanguage `json:"backendLanguage,omitempty"` + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + Domain *string `json:"domain,omitempty"` + DoubleOptIn *bool `json:"doubleOptIn,omitempty"` + EmailFrom *string `json:"emailFrom,omitempty"` + Environment *ProjectConfigSaveReqEnvironment `json:"environment,omitempty"` + ExternalApplicationPassword *string `json:"externalApplicationPassword,omitempty"` + + // ExternalApplicationProtocolVersion Defines which version of webhook is used + ExternalApplicationProtocolVersion *ProjectConfigSaveReqExternalApplicationProtocolVersion `json:"externalApplicationProtocolVersion,omitempty"` + ExternalApplicationUsername *string `json:"externalApplicationUsername,omitempty"` + ExternalName *string `json:"externalName,omitempty"` + FallbackLanguage *string `json:"fallbackLanguage,omitempty"` + FrontendFramework *ProjectConfigSaveReqFrontendFramework `json:"frontendFramework,omitempty"` + HasExistingUsers *bool `json:"hasExistingUsers,omitempty"` + HasGeneratedSession *bool `json:"hasGeneratedSession,omitempty"` + HasStartedUsingPasskeys *bool `json:"hasStartedUsingPasskeys,omitempty"` + HasStartedUsingSessions *bool `json:"hasStartedUsingSessions,omitempty"` + HasVerifiedSession *bool `json:"hasVerifiedSession,omitempty"` + IntegrationModeAPI *bool `json:"integrationModeAPI,omitempty"` + IntegrationModeHosted *bool `json:"integrationModeHosted,omitempty"` + IntegrationModeWebComponent *bool `json:"integrationModeWebComponent,omitempty"` + LegacyAuthMethodsUrl *string `json:"legacyAuthMethodsUrl,omitempty"` + PasskeyAppendInterval *ProjectConfigSaveReqPasskeyAppendInterval `json:"passkeyAppendInterval,omitempty"` + PasswordResetUrl *string `json:"passwordResetUrl,omitempty"` + PasswordVerifyUrl *string `json:"passwordVerifyUrl,omitempty"` + ProductKey *string `json:"productKey,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + SmsFrom *string `json:"smsFrom,omitempty"` + SmtpHost *string `json:"smtpHost,omitempty"` + SmtpPassword *string `json:"smtpPassword,omitempty"` + SmtpPort *int `json:"smtpPort,omitempty"` + SmtpUseCustom *bool `json:"smtpUseCustom,omitempty"` + SmtpUsername *string `json:"smtpUsername,omitempty"` + SupportEmail *string `json:"supportEmail,omitempty"` + UseCli *bool `json:"useCli,omitempty"` + UserFullNameRequired *bool `json:"userFullNameRequired,omitempty"` + WebComponentDebug *bool `json:"webComponentDebug,omitempty"` + WebauthnRPID *string `json:"webauthnRPID,omitempty"` + WebhookPassword *string `json:"webhookPassword,omitempty"` + WebhookTestInvalidUsername *string `json:"webhookTestInvalidUsername,omitempty"` + WebhookTestValidPassword *string `json:"webhookTestValidPassword,omitempty"` + WebhookTestValidUsername *string `json:"webhookTestValidUsername,omitempty"` + WebhookURL *string `json:"webhookURL,omitempty"` + WebhookUsername *string `json:"webhookUsername,omitempty"` + Wizard *bool `json:"wizard,omitempty"` +} + +// ProjectConfigSaveReqAppType defines model for ProjectConfigSaveReq.AppType. +type ProjectConfigSaveReqAppType string + +// ProjectConfigSaveReqBackendLanguage defines model for ProjectConfigSaveReq.BackendLanguage. +type ProjectConfigSaveReqBackendLanguage string + +// ProjectConfigSaveReqEnvironment defines model for ProjectConfigSaveReq.Environment. +type ProjectConfigSaveReqEnvironment string + +// ProjectConfigSaveReqExternalApplicationProtocolVersion Defines which version of webhook is used +type ProjectConfigSaveReqExternalApplicationProtocolVersion string + +// ProjectConfigSaveReqFrontendFramework defines model for ProjectConfigSaveReq.FrontendFramework. +type ProjectConfigSaveReqFrontendFramework string + +// ProjectConfigSaveReqPasskeyAppendInterval defines model for ProjectConfigSaveReq.PasskeyAppendInterval. +type ProjectConfigSaveReqPasskeyAppendInterval string + +// ProjectConfigWebhookTestReq defines model for projectConfigWebhookTestReq. +type ProjectConfigWebhookTestReq struct { + Action ProjectConfigWebhookTestReqAction `json:"action"` + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// ProjectConfigWebhookTestReqAction defines model for ProjectConfigWebhookTestReq.Action. +type ProjectConfigWebhookTestReqAction string + +// ProjectConfigWebhookTestRsp defines model for projectConfigWebhookTestRsp. +type ProjectConfigWebhookTestRsp struct { + Data struct { + Code string `json:"code"` + Details string `json:"details"` + Runtime float32 `json:"runtime"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// ProjectSecretCreateReq defines model for projectSecretCreateReq. +type ProjectSecretCreateReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// ProjectSecretCreateRsp defines model for projectSecretCreateRsp. +type ProjectSecretCreateRsp struct { + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + + // Hint Hint of the server-side generated secret. First 3 characters and last 3 characters + Hint string `json:"hint"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + + // Id ID of project secret + Id string `json:"id"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Secret Server-side generated secret. Only filled on create + Secret *string `json:"secret,omitempty"` +} + +// ProjectSecretDeleteReq defines model for projectSecretDeleteReq. +type ProjectSecretDeleteReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// ProjectSecretItem defines model for projectSecretItem. +type ProjectSecretItem struct { + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + + // Hint Hint of the server-side generated secret. First 3 characters and last 3 characters + Hint string `json:"hint"` + + // Id ID of project secret + Id string `json:"id"` + + // Secret Server-side generated secret. Only filled on create + Secret *string `json:"secret,omitempty"` +} + +// ProjectSecretListRsp defines model for projectSecretListRsp. +type ProjectSecretListRsp struct { + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + Paging externalRef0.Paging `json:"paging"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + Rows []ProjectSecretItem `json:"rows"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// RequestLog Request log entry +type RequestLog struct { + // Application Application this request was processed with + Application string `json:"application"` + + // Created Timestamp of when the request was performed in RFC3339 format + Created string `json:"created"` + + // Details Any freetext additional information attached to this request. Additional logs, errors, etc. + Details []string `json:"details"` + + // Endpoint Endpoint that was requested + Endpoint string `json:"endpoint"` + + // Method HTTP method (such as GET and POST) + Method string `json:"method"` + + // ProjectID ID of project + ProjectID externalRef0.ProjectID `json:"projectID"` + + // QueryParams Request query parameters + QueryParams string `json:"queryParams"` + + // RemoteAddress Caller remote address + RemoteAddress string `json:"remoteAddress"` + + // Request Request JSON data + Request string `json:"request"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID externalRef0.RequestID `json:"requestID"` + + // Response Response JSON data + Response string `json:"response"` + + // ResponseStatus Response HTTP status + ResponseStatus float32 `json:"responseStatus"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Source Request source + Source string `json:"source"` + + // Tags Arbitrary tags attached to this request + Tags map[string]interface{} `json:"tags"` + + // UserID ID of the user + UserID externalRef0.UserID `json:"userID"` +} + +// RequestLogGetRsp defines model for requestLogGetRsp. +type RequestLogGetRsp struct { + // Data Request log entry + Data RequestLog `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// RequestLogsListRsp defines model for requestLogsListRsp. +type RequestLogsListRsp struct { + Data struct { + Logs []RequestLog `json:"logs"` + Paging externalRef0.Paging `json:"paging"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// SessionConfig defines model for sessionConfig. +type SessionConfig struct { + Active *bool `json:"active,omitempty"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + JwtAudience string `json:"jwtAudience"` + LongInactivityUnit SessionConfigLongInactivityUnit `json:"longInactivityUnit"` + LongInactivityValue int `json:"longInactivityValue"` + LongLifetimeUnit SessionConfigLongLifetimeUnit `json:"longLifetimeUnit"` + LongLifetimeValue int `json:"longLifetimeValue"` + + // ProjectID ID of project + ProjectID externalRef0.ProjectID `json:"projectID"` + ShortCookieDomain string `json:"shortCookieDomain"` + ShortCookieSameSite SessionConfigShortCookieSameSite `json:"shortCookieSameSite"` + ShortCookieSecure bool `json:"shortCookieSecure"` + ShortLifetimeMinutes int `json:"shortLifetimeMinutes"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` +} + +// SessionConfigLongInactivityUnit defines model for SessionConfig.LongInactivityUnit. +type SessionConfigLongInactivityUnit string + +// SessionConfigLongLifetimeUnit defines model for SessionConfig.LongLifetimeUnit. +type SessionConfigLongLifetimeUnit string + +// SessionConfigShortCookieSameSite defines model for SessionConfig.ShortCookieSameSite. +type SessionConfigShortCookieSameSite string + +// SessionConfigGetRsp defines model for sessionConfigGetRsp. +type SessionConfigGetRsp struct { + Data SessionConfig `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// SessionConfigUpdateReq defines model for sessionConfigUpdateReq. +type SessionConfigUpdateReq struct { + Active *bool `json:"active,omitempty"` + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + LongInactivityUnit *SessionConfigUpdateReqLongInactivityUnit `json:"longInactivityUnit,omitempty"` + LongInactivityValue *int `json:"longInactivityValue,omitempty"` + LongLifetimeUnit *SessionConfigUpdateReqLongLifetimeUnit `json:"longLifetimeUnit,omitempty"` + LongLifetimeValue *int `json:"longLifetimeValue,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + ShortCookieDomain *string `json:"shortCookieDomain,omitempty"` + ShortCookieSameSite *SessionConfigUpdateReqShortCookieSameSite `json:"shortCookieSameSite,omitempty"` + ShortCookieSecure *bool `json:"shortCookieSecure,omitempty"` + ShortLifetimeMinutes *int `json:"shortLifetimeMinutes,omitempty"` +} + +// SessionConfigUpdateReqLongInactivityUnit defines model for SessionConfigUpdateReq.LongInactivityUnit. +type SessionConfigUpdateReqLongInactivityUnit string + +// SessionConfigUpdateReqLongLifetimeUnit defines model for SessionConfigUpdateReq.LongLifetimeUnit. +type SessionConfigUpdateReqLongLifetimeUnit string + +// SessionConfigUpdateReqShortCookieSameSite defines model for SessionConfigUpdateReq.ShortCookieSameSite. +type SessionConfigUpdateReqShortCookieSameSite string + +// SessionTokenCreateReq defines model for sessionTokenCreateReq. +type SessionTokenCreateReq struct { + ClientInfo externalRef0.ClientInfo `json:"clientInfo"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + + // UserData Additional user data in JSON format + UserData string `json:"userData"` + + // UserID ID of the user + UserID externalRef0.UserID `json:"userID"` +} + +// SessionTokenCreateRsp defines model for sessionTokenCreateRsp. +type SessionTokenCreateRsp struct { + Data struct { + Token string `json:"token"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// SessionTokenVerifyReq defines model for sessionTokenVerifyReq. +type SessionTokenVerifyReq struct { + ClientInfo externalRef0.ClientInfo `json:"clientInfo"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + Token string `json:"token"` +} + +// SessionTokenVerifyRsp defines model for sessionTokenVerifyRsp. +type SessionTokenVerifyRsp struct { + Data struct { + // User User entry with emails and phone numbers + User externalRef0.FullUser `json:"user"` + UserData string `json:"userData"` + + // UserID ID of the user + UserID externalRef0.UserID `json:"userID"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// SmsCodeSendReq defines model for smsCodeSendReq. +type SmsCodeSendReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // Create Defines if user phone number should be created if not found + Create bool `json:"create"` + + // PhoneNumber Recipient phone number + PhoneNumber string `json:"phoneNumber"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + + // TemplateName Template name of SMS to send + TemplateName *string `json:"templateName,omitempty"` + + // UserFullName Optional user's full name to be used if the user wasn't found and needs to be created first + UserFullName *string `json:"userFullName,omitempty"` +} + +// SmsCodeSendRsp defines model for smsCodeSendRsp. +type SmsCodeSendRsp struct { + Data struct { + SmsCodeID string `json:"smsCodeID"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// SmsCodeValidateReq defines model for smsCodeValidateReq. +type SmsCodeValidateReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + CreateLoginToken *bool `json:"createLoginToken,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + + // SmsCode SMS OTP to validate + SmsCode string `json:"smsCode"` +} + +// SmsCodeValidateRsp defines model for smsCodeValidateRsp. +type SmsCodeValidateRsp struct { + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + LoginToken *string `json:"loginToken,omitempty"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// SmsTemplateCreateReq defines model for smsTemplateCreateReq. +type SmsTemplateCreateReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + IsDefault bool `json:"isDefault"` + Name string `json:"name"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + TextPlain string `json:"textPlain"` + Type SmsTemplateCreateReqType `json:"type"` +} + +// SmsTemplateCreateReqType defines model for SmsTemplateCreateReq.Type. +type SmsTemplateCreateReqType string + +// SmsTemplateCreateRsp defines model for smsTemplateCreateRsp. +type SmsTemplateCreateRsp struct { + Data struct { + SmsTemplateID string `json:"smsTemplateID"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// SmsTemplateDeleteReq defines model for smsTemplateDeleteReq. +type SmsTemplateDeleteReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// TrackingBackupState defines model for trackingBackupState. +type TrackingBackupState struct { + BackedUp int `json:"backedUp"` + NotBackedUp int `json:"notBackedUp"` +} + +// TrackingBackupStateGetRsp defines model for trackingBackupStateGetRsp. +type TrackingBackupStateGetRsp struct { + Data TrackingBackupState `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// TrackingBrowserDetailedStats defines model for trackingBrowserDetailedStats. +type TrackingBrowserDetailedStats struct { + BrowserName string `json:"browserName"` + BrowserVersion string `json:"browserVersion"` + Cnt int `json:"cnt"` + ConditionalUi int `json:"conditional_ui"` + Platform int `json:"platform"` + TimePoint string `json:"timePoint"` + Webauthn int `json:"webauthn"` +} + +// TrackingBrowserDetailedStatsListRsp defines model for trackingBrowserDetailedStatsListRsp. +type TrackingBrowserDetailedStatsListRsp struct { + Data struct { + Paging externalRef0.Paging `json:"paging"` + Stats []TrackingBrowserDetailedStats `json:"stats"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// TrackingBrowserStats defines model for trackingBrowserStats. +type TrackingBrowserStats struct { + Chrome int `json:"chrome"` + Edge int `json:"edge"` + Firefox int `json:"firefox"` + Other int `json:"other"` + Safari int `json:"safari"` + TimePoint string `json:"timePoint"` +} + +// TrackingBrowserStatsListRsp defines model for trackingBrowserStatsListRsp. +type TrackingBrowserStatsListRsp struct { + Data struct { + Paging externalRef0.Paging `json:"paging"` + Stats []TrackingBrowserStats `json:"stats"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// TrackingDetailedStats defines model for trackingDetailedStats. +type TrackingDetailedStats struct { + ConditionalUi int `json:"conditionalUi"` + Platform int `json:"platform"` + TimePoint string `json:"timePoint"` + Visits int `json:"visits"` + Webauthn int `json:"webauthn"` +} + +// TrackingDetailedStatsListRsp defines model for trackingDetailedStatsListRsp. +type TrackingDetailedStatsListRsp struct { + Data struct { + Paging externalRef0.Paging `json:"paging"` + Stats []TrackingDetailedStats `json:"stats"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// TrackingEnums defines model for trackingEnums. +type TrackingEnums struct { + BrowserNames []string `json:"browserNames"` + OsNames []string `json:"osNames"` + OsPlatforms []string `json:"osPlatforms"` +} + +// TrackingEnumsGetRsp defines model for trackingEnumsGetRsp. +type TrackingEnumsGetRsp struct { + Data TrackingEnums `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// TrackingOSDetailedStats defines model for trackingOSDetailedStats. +type TrackingOSDetailedStats struct { + Cnt int `json:"cnt"` + ConditionalUi int `json:"conditional_ui"` + OsName string `json:"osName"` + OsPlatform TrackingOSDetailedStatsOsPlatform `json:"osPlatform"` + OsVersion string `json:"osVersion"` + Platform int `json:"platform"` + TimePoint string `json:"timePoint"` + Webauthn int `json:"webauthn"` +} + +// TrackingOSDetailedStatsOsPlatform defines model for TrackingOSDetailedStats.OsPlatform. +type TrackingOSDetailedStatsOsPlatform string + +// TrackingOSDetailedStatsListRsp defines model for trackingOSDetailedStatsListRsp. +type TrackingOSDetailedStatsListRsp struct { + Data struct { + Paging externalRef0.Paging `json:"paging"` + Stats []TrackingOSDetailedStats `json:"stats"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// TrackingOSStats defines model for trackingOSStats. +type TrackingOSStats struct { + Android int `json:"android"` + Ios int `json:"ios"` + Macos int `json:"macos"` + Other int `json:"other"` + TimePoint string `json:"timePoint"` + Windows int `json:"windows"` +} + +// TrackingOSStatsListRsp defines model for trackingOSStatsListRsp. +type TrackingOSStatsListRsp struct { + Data struct { + Paging externalRef0.Paging `json:"paging"` + Stats []TrackingOSStats `json:"stats"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// TrackingRawListRow defines model for trackingRawListRow. +type TrackingRawListRow struct { + BrowserId string `json:"browserId"` + HasConditionalUi bool `json:"hasConditionalUi"` + HasPlatformAuth bool `json:"hasPlatformAuth"` + HasWebauthn bool `json:"hasWebauthn"` + OsId string `json:"osId"` + TimePoint string `json:"timePoint"` +} + +// TrackingRawListRsp defines model for trackingRawListRsp. +type TrackingRawListRsp struct { + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + Paging externalRef0.Paging `json:"paging"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + Rows []TrackingRawListRow `json:"rows"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// TrackingStats defines model for trackingStats. +type TrackingStats struct { + AggregateConditionalUi int `json:"aggregateConditionalUi"` + AggregatePlatform int `json:"aggregatePlatform"` + AggregateVisits int `json:"aggregateVisits"` + AggregateWebauthn int `json:"aggregateWebauthn"` + TimePoint string `json:"timePoint"` +} + +// TrackingStatsListRsp defines model for trackingStatsListRsp. +type TrackingStatsListRsp struct { + Data struct { + Paging externalRef0.Paging `json:"paging"` + Stats []TrackingStats `json:"stats"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// User User entry +type User struct { + // ID ID of the user + ID externalRef0.UserID `json:"ID"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + FullName string `json:"fullName"` + Name string `json:"name"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` +} + +// UserAuthLog defines model for userAuthLog. +type UserAuthLog struct { + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + EventType string `json:"eventType"` + Method string `json:"method"` + Status string `json:"status"` + + // UserID ID of the user + UserID externalRef0.UserID `json:"userID"` + UserName string `json:"userName"` +} + +// UserAuthLogListRsp defines model for userAuthLogListRsp. +type UserAuthLogListRsp struct { + Data struct { + Paging externalRef0.Paging `json:"paging"` + Rows []UserAuthLog `json:"rows"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// UserCreateReq defines model for userCreateReq. +type UserCreateReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + Email *string `json:"email,omitempty"` + FullName *string `json:"fullName,omitempty"` + Name string `json:"name"` + PhoneNumber *string `json:"phoneNumber,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// UserCreateRsp defines model for userCreateRsp. +type UserCreateRsp struct { + Data struct { + EmailID string `json:"emailID"` + PhoneNumberID string `json:"phoneNumberID"` + UserID string `json:"userID"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// UserCustomLoginIdentifierCreateReq defines model for userCustomLoginIdentifierCreateReq. +type UserCustomLoginIdentifierCreateReq struct { + AdditionalData *string `json:"additionalData,omitempty"` + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + CustomLoginIdentifier string `json:"customLoginIdentifier"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// UserCustomLoginIdentifierCreateRsp defines model for userCustomLoginIdentifierCreateRsp. +type UserCustomLoginIdentifierCreateRsp struct { + Data struct { + CustomLoginIdentifierID string `json:"customLoginIdentifierID"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// UserCustomLoginIdentifierDeleteReq defines model for userCustomLoginIdentifierDeleteReq. +type UserCustomLoginIdentifierDeleteReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// UserCustomLoginIdentifierGetRsp defines model for userCustomLoginIdentifierGetRsp. +type UserCustomLoginIdentifierGetRsp struct { + Data struct { + CustomLoginIdentifier CustomLoginIdentifier `json:"customLoginIdentifier"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// UserDeleteReq defines model for userDeleteReq. +type UserDeleteReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// UserDevice defines model for userDevice. +type UserDevice struct { + BrowserName string `json:"browserName"` + BrowserVersion string `json:"browserVersion"` + Created string `json:"created"` + Device string `json:"device"` + Fingerprint string `json:"fingerprint"` + Name string `json:"name"` + OsName string `json:"osName"` + OsVersion string `json:"osVersion"` + Status string `json:"status"` +} + +// UserDeviceListRsp defines model for userDeviceListRsp. +type UserDeviceListRsp struct { + Devices []UserDevice `json:"devices"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + Paging externalRef0.Paging `json:"paging"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// UserEmailCreateReq defines model for userEmailCreateReq. +type UserEmailCreateReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + Email string `json:"email"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// UserEmailCreateRsp defines model for userEmailCreateRsp. +type UserEmailCreateRsp struct { + Data struct { + EmailID string `json:"emailID"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// UserEmailDeleteReq defines model for userEmailDeleteReq. +type UserEmailDeleteReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// UserEmailGetRsp defines model for userEmailGetRsp. +type UserEmailGetRsp struct { + Data struct { + Email Email `json:"email"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// UserGetRsp defines model for userGetRsp. +type UserGetRsp struct { + // Data User entry with emails and phone numbers + Data externalRef0.FullUser `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// UserListRsp defines model for userListRsp. +type UserListRsp struct { + Data struct { + Paging externalRef0.Paging `json:"paging"` + Users []externalRef0.FullUser `json:"users"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// UserPhoneNumberCreateReq defines model for userPhoneNumberCreateReq. +type UserPhoneNumberCreateReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + PhoneNumber string `json:"phoneNumber"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// UserPhoneNumberCreateRsp defines model for userPhoneNumberCreateRsp. +type UserPhoneNumberCreateRsp struct { + Data struct { + PhoneNumberID string `json:"phoneNumberID"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// UserPhoneNumberDeleteReq defines model for userPhoneNumberDeleteReq. +type UserPhoneNumberDeleteReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// UserPhoneNumberGetRsp defines model for userPhoneNumberGetRsp. +type UserPhoneNumberGetRsp struct { + Data struct { + PhoneNumber PhoneNumber `json:"phoneNumber"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// UserStats defines model for userStats. +type UserStats struct { + ActiveUsers int `json:"activeUsers"` + CountEmailLogin int `json:"countEmailLogin"` + CountPasskeyLogin int `json:"countPasskeyLogin"` + CountPasswordLogin int `json:"countPasswordLogin"` + FailedLogins int `json:"failedLogins"` + SignUps int `json:"signUps"` + SuccessfulLogins int `json:"successfulLogins"` + TimePoint string `json:"timePoint"` + TotalUsers int `json:"totalUsers"` +} + +// UserStatsListRsp defines model for userStatsListRsp. +type UserStatsListRsp struct { + Data struct { + Paging externalRef0.Paging `json:"paging"` + Stats []UserStats `json:"stats"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// UserUpdateReq defines model for userUpdateReq. +type UserUpdateReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + FullName *string `json:"fullName,omitempty"` + Name *string `json:"name,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// UserUpdateRsp defines model for userUpdateRsp. +type UserUpdateRsp struct { + // Data User entry + Data User `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// ValidateEmailReq defines model for validateEmailReq. +type ValidateEmailReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // Email Email to validate + Email string `json:"email"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + + // SmtpCheck perform SMTP check for domain + SmtpCheck *bool `json:"smtpCheck,omitempty"` + + // SuggestDomain enables domain suggestion for misspelled domains + SuggestDomain *bool `json:"suggestDomain,omitempty"` +} + +// ValidateEmailRsp defines model for validateEmailRsp. +type ValidateEmailRsp struct { + Data EmailValidationResult `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// ValidatePhoneNumberReq defines model for validatePhoneNumberReq. +type ValidatePhoneNumberReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // PhoneNumber Phone number to validate + PhoneNumber string `json:"phoneNumber"` + + // RegionCode ISO country or region code + RegionCode *string `json:"regionCode,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// ValidatePhoneNumberRsp defines model for validatePhoneNumberRsp. +type ValidatePhoneNumberRsp struct { + Data PhoneNumberValidationResult `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// ValidationEmail defines model for validationEmail. +type ValidationEmail struct { + Disposable bool `json:"disposable"` + Domain string `json:"domain"` + Free bool `json:"free"` + HasMxRecords bool `json:"hasMxRecords"` + Reachable string `json:"reachable"` + Username string `json:"username"` +} + +// ValidationPhoneNumber defines model for validationPhoneNumber. +type ValidationPhoneNumber struct { + CountryCode int `json:"countryCode"` + InternationalFormatted string `json:"internationalFormatted"` + NationalFormatted string `json:"nationalFormatted"` + NationalNumber int `json:"nationalNumber"` + RegionCode string `json:"regionCode"` +} + +// WebAuthnAssociateStartReq defines model for webAuthnAssociateStartReq. +type WebAuthnAssociateStartReq struct { + AssociationToken string `json:"associationToken"` + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // Origin External application address including protocol and port when not 80 or 443 + Origin Origin `json:"origin"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// WebAuthnAssociateStartRsp defines model for webAuthnAssociateStartRsp. +type WebAuthnAssociateStartRsp struct { + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // PublicKeyCredentialCreationOptions Contains JSON payload data to start Passkeys (Biometrics) sign up challenge + PublicKeyCredentialCreationOptions string `json:"publicKeyCredentialCreationOptions"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Status Status represents information if user signup was successful or the user with its credentials already exists + Status WebAuthnAssociateStartRspStatus `json:"status"` +} + +// WebAuthnAssociateStartRspStatus Status represents information if user signup was successful or the user with its credentials already exists +type WebAuthnAssociateStartRspStatus string + +// WebAuthnAuthenticateFinishRsp defines model for webAuthnAuthenticateFinishRsp. +type WebAuthnAuthenticateFinishRsp struct { + // CredentialID Used credential ID + CredentialID string `json:"credentialID"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Status Status represents information if user signup was successful or the user with its credentials already exists + Status WebAuthnAuthenticateFinishRspStatus `json:"status"` + + // UserFullName Optional user's full name to be used if the user wasn't found and needs to be created first + UserFullName *string `json:"userFullName,omitempty"` + + // UserID ID of the user + UserID externalRef0.UserID `json:"userID"` + + // Username Username of current challenge + Username string `json:"username"` +} + +// WebAuthnAuthenticateFinishRspStatus Status represents information if user signup was successful or the user with its credentials already exists +type WebAuthnAuthenticateFinishRspStatus string + +// WebAuthnAuthenticateStartReq defines model for webAuthnAuthenticateStartReq. +type WebAuthnAuthenticateStartReq struct { + ClientInfo externalRef0.ClientInfo `json:"clientInfo"` + + // Origin External application address including protocol and port when not 80 or 443 + Origin Origin `json:"origin"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + Username string `json:"username"` +} + +// WebAuthnAuthenticateStartRsp defines model for webAuthnAuthenticateStartRsp. +type WebAuthnAuthenticateStartRsp struct { + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // PublicKeyCredentialRequestOptions Contains JSON payload data to start Passkeys (Biometrics) login challenge + PublicKeyCredentialRequestOptions string `json:"publicKeyCredentialRequestOptions"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Status Status represents information if authenticate start was successful or device is unknown + Status WebAuthnAuthenticateStartRspStatus `json:"status"` +} + +// WebAuthnAuthenticateStartRspStatus Status represents information if authenticate start was successful or device is unknown +type WebAuthnAuthenticateStartRspStatus string + +// WebAuthnAuthenticateSuccess defines model for webAuthnAuthenticateSuccess. +type WebAuthnAuthenticateSuccess struct { + // CredentialID Used credential ID + CredentialID string `json:"credentialID"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // UserFullName Optional user's full name to be used if the user wasn't found and needs to be created first + UserFullName *string `json:"userFullName,omitempty"` + + // UserID ID of the user + UserID externalRef0.UserID `json:"userID"` + + // Username Username of current challenge + Username string `json:"username"` +} + +// WebAuthnAuthenticatorUpdateReq defines model for webAuthnAuthenticatorUpdateReq. +type WebAuthnAuthenticatorUpdateReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + Name string `json:"name"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// WebAuthnCredentialExistsReq defines model for webAuthnCredentialExistsReq. +type WebAuthnCredentialExistsReq struct { + ClientInfo externalRef0.ClientInfo `json:"clientInfo"` + LoginIdentifier string `json:"loginIdentifier"` + + // LoginIdentifierType Login Identifier type + LoginIdentifierType externalRef0.LoginIdentifierType `json:"loginIdentifierType"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// WebAuthnCredentialExistsRsp defines model for webAuthnCredentialExistsRsp. +type WebAuthnCredentialExistsRsp struct { + Exists bool `json:"exists"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// WebAuthnCredentialItemRsp defines model for webAuthnCredentialItemRsp. +type WebAuthnCredentialItemRsp struct { + Aaguid string `json:"aaguid"` + AttestationType string `json:"attestationType"` + + // AuthenticatorID Authenticator ID + AuthenticatorID string `json:"authenticatorID"` + AuthenticatorName string `json:"authenticatorName"` + + // BackupEligible Backup eligible + BackupEligible bool `json:"backupEligible"` + + // BackupState Backup state + BackupState *bool `json:"backupState,omitempty"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + CredentialHash string `json:"credentialHash"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + + // Id Credential ID + Id string `json:"id"` + + // LastUsed Timestamp of when the passkey was last used in yyyy-MM-dd'T'HH:mm:ss format + LastUsed string `json:"lastUsed"` + LastUsedDeviceName string `json:"lastUsedDeviceName"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Status Status + Status WebAuthnCredentialItemRspStatus `json:"status"` + + // Transport Transport + Transport []WebAuthnCredentialItemRspTransport `json:"transport"` + + // UserAgent User agent + UserAgent string `json:"userAgent"` +} + +// WebAuthnCredentialItemRspStatus Status +type WebAuthnCredentialItemRspStatus string + +// WebAuthnCredentialItemRspTransport defines model for WebAuthnCredentialItemRsp.Transport. +type WebAuthnCredentialItemRspTransport string + +// WebAuthnCredentialListRsp defines model for webAuthnCredentialListRsp. +type WebAuthnCredentialListRsp struct { + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + Paging externalRef0.Paging `json:"paging"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + Rows []WebAuthnCredentialItemRsp `json:"rows"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// WebAuthnCredentialReq defines model for webAuthnCredentialReq. +type WebAuthnCredentialReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + Status WebAuthnCredentialReqStatus `json:"status"` +} + +// WebAuthnCredentialReqStatus defines model for WebAuthnCredentialReq.Status. +type WebAuthnCredentialReqStatus string + +// WebAuthnCredentialRsp defines model for webAuthnCredentialRsp. +type WebAuthnCredentialRsp struct { + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Status Status + Status WebAuthnCredentialRspStatus `json:"status"` +} + +// WebAuthnCredentialRspStatus Status +type WebAuthnCredentialRspStatus string + +// WebAuthnFinishReq defines model for webAuthnFinishReq. +type WebAuthnFinishReq struct { + ClientInfo externalRef0.ClientInfo `json:"clientInfo"` + + // Origin External application address including protocol and port when not 80 or 443 + Origin Origin `json:"origin"` + + // PublicKeyCredential Contains JSON payload data for Passkeys (Biometrics) login finish challenge + PublicKeyCredential string `json:"publicKeyCredential"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// WebAuthnMediationStartReq defines model for webAuthnMediationStartReq. +type WebAuthnMediationStartReq struct { + ClientInfo externalRef0.ClientInfo `json:"clientInfo"` + + // Origin External application address including protocol and port when not 80 or 443 + Origin Origin `json:"origin"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + + // Username Optional limits possible credentials matching to username + Username *string `json:"username,omitempty"` +} + +// WebAuthnMediationStartRsp defines model for webAuthnMediationStartRsp. +type WebAuthnMediationStartRsp struct { + // Challenge Contains JSON payload data to start Passkeys (Biometrics) login challenge + Challenge string `json:"challenge"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// WebAuthnRegisterFinishRsp defines model for webAuthnRegisterFinishRsp. +type WebAuthnRegisterFinishRsp struct { + // CredentialID Used credential ID + CredentialID string `json:"credentialID"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Status Status represents information if user sign up was successful or if the user with provided credentials already exists + Status WebAuthnRegisterFinishRspStatus `json:"status"` + + // UserFullName Optional user's full name to be used if the user wasn't found and needs to be created first + UserFullName *string `json:"userFullName,omitempty"` + + // UserID ID of the user + UserID externalRef0.UserID `json:"userID"` + + // Username Username of current challenge + Username string `json:"username"` +} + +// WebAuthnRegisterFinishRspStatus Status represents information if user sign up was successful or if the user with provided credentials already exists +type WebAuthnRegisterFinishRspStatus string + +// WebAuthnRegisterStartReq defines model for webAuthnRegisterStartReq. +type WebAuthnRegisterStartReq struct { + ClientInfo externalRef0.ClientInfo `json:"clientInfo"` + + // CredentialStatus Sets credential status into active and pending. Pending status dont allow a login until the credential gets confirmed by an api call. + CredentialStatus *WebAuthnRegisterStartReqCredentialStatus `json:"credentialStatus,omitempty"` + + // Origin External application address including protocol and port when not 80 or 443 + Origin Origin `json:"origin"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` + + // UserFullName Optional user's full name to be used if the user wasn't found and needs to be created first + UserFullName *string `json:"userFullName,omitempty"` + Username string `json:"username"` +} + +// WebAuthnRegisterStartReqCredentialStatus Sets credential status into active and pending. Pending status dont allow a login until the credential gets confirmed by an api call. +type WebAuthnRegisterStartReqCredentialStatus string + +// WebAuthnRegisterStartRsp defines model for webAuthnRegisterStartRsp. +type WebAuthnRegisterStartRsp struct { + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // PublicKeyCredentialCreationOptions Contains JSON payload data to start Passkeys (Biometrics) sign up challenge + PublicKeyCredentialCreationOptions string `json:"publicKeyCredentialCreationOptions"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Status Status represents information if user signup was successful or the user with its credentials already exists + Status WebAuthnRegisterStartRspStatus `json:"status"` +} + +// WebAuthnRegisterStartRspStatus Status represents information if user signup was successful or the user with its credentials already exists +type WebAuthnRegisterStartRspStatus string + +// WebauthnSettingCreate defines model for webauthnSettingCreate. +type WebauthnSettingCreate struct { + // Name Name of this setting + Name string `json:"name"` + + // Origin Define here either a url incl. schema or an android-apk-key-hash + Origin string `json:"origin"` +} + +// WebauthnSettingCreateReq defines model for webauthnSettingCreateReq. +type WebauthnSettingCreateReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // Name Name of this setting + Name string `json:"name"` + + // Origin Define here either a url incl. schema or an android-apk-key-hash + Origin string `json:"origin"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// WebauthnSettingCreateRsp defines model for webauthnSettingCreateRsp. +type WebauthnSettingCreateRsp struct { + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + + // Id ID of WebAuthn setting + Id string `json:"id"` + Message string `json:"message"` + + // Name Name of this setting + Name string `json:"name"` + + // Origin Define here either a url incl. schema or an android-apk-key-hash + Origin string `json:"origin"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` +} + +// WebauthnSettingDeleteReq defines model for webauthnSettingDeleteReq. +type WebauthnSettingDeleteReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// WebauthnSettingGetRsp defines model for webauthnSettingGetRsp. +type WebauthnSettingGetRsp struct { + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + + // Id ID of WebAuthn setting + Id string `json:"id"` + Message string `json:"message"` + + // Name Name of this setting + Name string `json:"name"` + + // Origin Define here either a url incl. schema or an android-apk-key-hash + Origin string `json:"origin"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` +} + +// WebauthnSettingItem defines model for webauthnSettingItem. +type WebauthnSettingItem struct { + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + + // Id ID of WebAuthn setting + Id string `json:"id"` + + // Name Name of this setting + Name string `json:"name"` + + // Origin Define here either a url incl. schema or an android-apk-key-hash + Origin string `json:"origin"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` +} + +// WebauthnSettingListRsp defines model for webauthnSettingListRsp. +type WebauthnSettingListRsp struct { + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + Paging externalRef0.Paging `json:"paging"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + Rows []WebauthnSettingItem `json:"rows"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// WebauthnSettingUpdateReq defines model for webauthnSettingUpdateReq. +type WebauthnSettingUpdateReq struct { + ClientInfo *externalRef0.ClientInfo `json:"clientInfo,omitempty"` + + // Name Name of this setting + Name string `json:"name"` + + // Origin Define here either a url incl. schema or an android-apk-key-hash + Origin string `json:"origin"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID *externalRef0.RequestID `json:"requestID,omitempty"` +} + +// WebauthnSettingUpdateRsp defines model for webauthnSettingUpdateRsp. +type WebauthnSettingUpdateRsp struct { + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created externalRef0.Created `json:"created"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + + // Id ID of WebAuthn setting + Id string `json:"id"` + Message string `json:"message"` + + // Name Name of this setting + Name string `json:"name"` + + // Origin Define here either a url incl. schema or an android-apk-key-hash + Origin string `json:"origin"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated externalRef0.Updated `json:"updated"` +} + +// WebhookID Unique ID of webhook request which will be randomly generated on server side +type WebhookID = string + +// WebhookLog Webhook log entry +type WebhookLog struct { + // Action Webhook action + Action string `json:"action"` + + // Created Timestamp of when the request was performed in RFC3339 format + Created string `json:"created"` + + // ProjectID ID of project + ProjectID externalRef0.ProjectID `json:"projectID"` + + // RequestBody Request contents that were sent to webhook backend + RequestBody string `json:"requestBody"` + + // RequestURL Absolute request URL of webhook backend + RequestURL string `json:"requestURL"` + + // ResponseBody Response body JSON data that was returned by webhook backend + ResponseBody string `json:"responseBody"` + + // ResponseError Response error if present + ResponseError string `json:"responseError"` + + // ResponseHeaders Response HTTP headers that were returned by webhook backend + ResponseHeaders map[string]interface{} `json:"responseHeaders"` + + // ResponseID Unique ID of response, you can provide your own while responding to the webhook, if not the ID will be randomly generated on server side. + // This has the same meaning as overriding requestID for API requests. + ResponseID string `json:"responseID"` + + // ResponseStatus Response HTTP status that was returned by webhook backend + ResponseStatus int `json:"responseStatus"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` + + // WebhookID Unique ID of webhook request which will be randomly generated on server side + WebhookID WebhookID `json:"webhookID"` +} + +// WebhookLogsListRsp defines model for webhookLogsListRsp. +type WebhookLogsListRsp struct { + Data struct { + Logs []WebhookLog `json:"logs"` + Paging externalRef0.Paging `json:"paging"` + } `json:"data"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData externalRef0.RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// CustomLoginIdentifierID defines model for customLoginIdentifierID. +type CustomLoginIdentifierID = string + +// EmailCodeID defines model for emailCodeID. +type EmailCodeID = string + +// EmailID defines model for emailID. +type EmailID = string + +// EmailLinkID defines model for emailLinkID. +type EmailLinkID = string + +// EmailTemplateID defines model for emailTemplateID. +type EmailTemplateID = string + +// Granularity defines model for granularity. +type Granularity = string + +// PhoneNumberID defines model for phoneNumberID. +type PhoneNumberID = string + +// RemoteAddress defines model for remoteAddress. +type RemoteAddress = string + +// RequestID defines model for requestID. +type RequestID = string + +// SmsCodeID defines model for smsCodeID. +type SmsCodeID = string + +// SmsTemplateID defines model for smsTemplateID. +type SmsTemplateID = string + +// UserAgent defines model for userAgent. +type UserAgent = string + +// UserID defines model for userID. +type UserID = string + +// N200 defines model for 200. +type N200 = externalRef0.GenericRsp + +// Error defines model for error. +type Error = externalRef0.ErrorRsp + +// ExampleGetParamsFileName defines parameters for ExampleGet. +type ExampleGetParamsFileName string + +// LongSessionListParams defines parameters for LongSessionList. +type LongSessionListParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` +} + +// RequestLogsListParams defines parameters for RequestLogsList. +type RequestLogsListParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` +} + +// RequestLogGetParams defines parameters for RequestLogGet. +type RequestLogGetParams struct { + // RemoteAddress Client's remote address + RemoteAddress *RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` +} + +// TrackingAllRequestParams defines parameters for TrackingAllRequest. +type TrackingAllRequestParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` +} + +// TrackingBackupStateGetParams defines parameters for TrackingBackupStateGet. +type TrackingBackupStateGetParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` +} + +// TrackingBrowserStatsListParams defines parameters for TrackingBrowserStatsList. +type TrackingBrowserStatsListParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` + + // Granularity Data granularity + Granularity Granularity `form:"granularity" json:"granularity"` +} + +// TrackingBrowserDetailedStatsListParams defines parameters for TrackingBrowserDetailedStatsList. +type TrackingBrowserDetailedStatsListParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` + + // Granularity Data granularity + Granularity Granularity `form:"granularity" json:"granularity"` +} + +// TrackingEnumsGetParams defines parameters for TrackingEnumsGet. +type TrackingEnumsGetParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` +} + +// TrackingOSStatsListParams defines parameters for TrackingOSStatsList. +type TrackingOSStatsListParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` + + // Granularity Data granularity + Granularity Granularity `form:"granularity" json:"granularity"` +} + +// TrackingOSDetailedStatsListParams defines parameters for TrackingOSDetailedStatsList. +type TrackingOSDetailedStatsListParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` + + // Granularity Data granularity + Granularity Granularity `form:"granularity" json:"granularity"` +} + +// TrackingStatsListParams defines parameters for TrackingStatsList. +type TrackingStatsListParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` + + // Granularity Data granularity + Granularity Granularity `form:"granularity" json:"granularity"` +} + +// TrackingDetailedStatsListParams defines parameters for TrackingDetailedStatsList. +type TrackingDetailedStatsListParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` + + // Granularity Data granularity + Granularity Granularity `form:"granularity" json:"granularity"` +} + +// UserAuthLogListParams defines parameters for UserAuthLogList. +type UserAuthLogListParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` +} + +// UserListParams defines parameters for UserList. +type UserListParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` +} + +// UserStatsListParams defines parameters for UserStatsList. +type UserStatsListParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` + + // Granularity Data granularity + Granularity Granularity `form:"granularity" json:"granularity"` +} + +// UserGetParams defines parameters for UserGet. +type UserGetParams struct { + // RemoteAddress Client's remote address + RemoteAddress *RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` +} + +// UserCustomLoginIdentifierGetParams defines parameters for UserCustomLoginIdentifierGet. +type UserCustomLoginIdentifierGetParams struct { + // RemoteAddress Client's remote address + RemoteAddress *RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` +} + +// UserDeviceListParams defines parameters for UserDeviceList. +type UserDeviceListParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` +} + +// UserEmailGetParams defines parameters for UserEmailGet. +type UserEmailGetParams struct { + // RemoteAddress Client's remote address + RemoteAddress *RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` +} + +// UserPhoneNumberGetParams defines parameters for UserPhoneNumberGet. +type UserPhoneNumberGetParams struct { + // RemoteAddress Client's remote address + RemoteAddress *RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` +} + +// WebAuthnCredentialListParams defines parameters for WebAuthnCredentialList. +type WebAuthnCredentialListParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` +} + +// WebAuthnSettingListParams defines parameters for WebAuthnSettingList. +type WebAuthnSettingListParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` +} + +// WebhookLogsListParams defines parameters for WebhookLogsList. +type WebhookLogsListParams struct { + // RemoteAddress Client's remote address + RemoteAddress *externalRef0.RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *externalRef0.UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *externalRef0.Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *externalRef0.Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *externalRef0.Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *externalRef0.PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` +} + +// AndroidAppConfigCreateJSONRequestBody defines body for AndroidAppConfigCreate for application/json ContentType. +type AndroidAppConfigCreateJSONRequestBody = AndroidAppConfigSaveReq + +// AndroidAppConfigDeleteJSONRequestBody defines body for AndroidAppConfigDelete for application/json ContentType. +type AndroidAppConfigDeleteJSONRequestBody = AndroidAppConfigDeleteReq + +// AndroidAppConfigPutJSONRequestBody defines body for AndroidAppConfigPut for application/json ContentType. +type AndroidAppConfigPutJSONRequestBody = AndroidAppConfigUpdateReq + +// AssociationTokenCreateJSONRequestBody defines body for AssociationTokenCreate for application/json ContentType. +type AssociationTokenCreateJSONRequestBody = AssociationTokenCreateReq + +// AuthMethodsListJSONRequestBody defines body for AuthMethodsList for application/json ContentType. +type AuthMethodsListJSONRequestBody = AuthMethodsListReq + +// AuthTokenValidateJSONRequestBody defines body for AuthTokenValidate for application/json ContentType. +type AuthTokenValidateJSONRequestBody = AuthTokenValidateReq + +// EmailCodeSendJSONRequestBody defines body for EmailCodeSend for application/json ContentType. +type EmailCodeSendJSONRequestBody = EmailCodeSendReq + +// EmailCodeValidateJSONRequestBody defines body for EmailCodeValidate for application/json ContentType. +type EmailCodeValidateJSONRequestBody = EmailCodeValidateReq + +// EmailLinkSendJSONRequestBody defines body for EmailLinkSend for application/json ContentType. +type EmailLinkSendJSONRequestBody = EmailLinkSendReq + +// EmailLinkDeleteJSONRequestBody defines body for EmailLinkDelete for application/json ContentType. +type EmailLinkDeleteJSONRequestBody = EmailLinksDeleteReq + +// EmailLinkValidateJSONRequestBody defines body for EmailLinkValidate for application/json ContentType. +type EmailLinkValidateJSONRequestBody = EmailLinksValidateReq + +// EmailTemplateCreateJSONRequestBody defines body for EmailTemplateCreate for application/json ContentType. +type EmailTemplateCreateJSONRequestBody = EmailTemplateCreateReq + +// EmailTemplateDeleteJSONRequestBody defines body for EmailTemplateDelete for application/json ContentType. +type EmailTemplateDeleteJSONRequestBody = EmailTemplateDeleteReq + +// IOSAppConfigCreateJSONRequestBody defines body for IOSAppConfigCreate for application/json ContentType. +type IOSAppConfigCreateJSONRequestBody = IOSAppConfigSaveReq + +// IOSAppConfigDeleteJSONRequestBody defines body for IOSAppConfigDelete for application/json ContentType. +type IOSAppConfigDeleteJSONRequestBody = IOSAppConfigDeleteReq + +// IOSAppConfigPutJSONRequestBody defines body for IOSAppConfigPut for application/json ContentType. +type IOSAppConfigPutJSONRequestBody = IOSAppConfigUpdateReq + +// LongSessionRevokeJSONRequestBody defines body for LongSessionRevoke for application/json ContentType. +type LongSessionRevokeJSONRequestBody = LongSessionRevokeReq + +// OriginAllowedJSONRequestBody defines body for OriginAllowed for application/json ContentType. +type OriginAllowedJSONRequestBody = OriginAllowedReq + +// ProjectConfigSaveJSONRequestBody defines body for ProjectConfigSave for application/json ContentType. +type ProjectConfigSaveJSONRequestBody = ProjectConfigSaveReq + +// ProjectConfigWebhookTestJSONRequestBody defines body for ProjectConfigWebhookTest for application/json ContentType. +type ProjectConfigWebhookTestJSONRequestBody = ProjectConfigWebhookTestReq + +// ProjectSecretCreateJSONRequestBody defines body for ProjectSecretCreate for application/json ContentType. +type ProjectSecretCreateJSONRequestBody = ProjectSecretCreateReq + +// ProjectSecretDeleteJSONRequestBody defines body for ProjectSecretDelete for application/json ContentType. +type ProjectSecretDeleteJSONRequestBody = ProjectSecretDeleteReq + +// ProjectActivateJSONRequestBody defines body for ProjectActivate for application/json ContentType. +type ProjectActivateJSONRequestBody = EmptyReq + +// SessionConfigUpdateJSONRequestBody defines body for SessionConfigUpdate for application/json ContentType. +type SessionConfigUpdateJSONRequestBody = SessionConfigUpdateReq + +// SessionTokenCreateJSONRequestBody defines body for SessionTokenCreate for application/json ContentType. +type SessionTokenCreateJSONRequestBody = SessionTokenCreateReq + +// SessionTokenVerifyJSONRequestBody defines body for SessionTokenVerify for application/json ContentType. +type SessionTokenVerifyJSONRequestBody = SessionTokenVerifyReq + +// SmsCodeSendJSONRequestBody defines body for SmsCodeSend for application/json ContentType. +type SmsCodeSendJSONRequestBody = SmsCodeSendReq + +// SmsCodeValidateJSONRequestBody defines body for SmsCodeValidate for application/json ContentType. +type SmsCodeValidateJSONRequestBody = SmsCodeValidateReq + +// SmsTemplateCreateJSONRequestBody defines body for SmsTemplateCreate for application/json ContentType. +type SmsTemplateCreateJSONRequestBody = SmsTemplateCreateReq + +// SmsTemplateDeleteJSONRequestBody defines body for SmsTemplateDelete for application/json ContentType. +type SmsTemplateDeleteJSONRequestBody = SmsTemplateDeleteReq + +// UserCreateJSONRequestBody defines body for UserCreate for application/json ContentType. +type UserCreateJSONRequestBody = UserCreateReq + +// UserDeleteJSONRequestBody defines body for UserDelete for application/json ContentType. +type UserDeleteJSONRequestBody = UserDeleteReq + +// UserUpdateJSONRequestBody defines body for UserUpdate for application/json ContentType. +type UserUpdateJSONRequestBody = UserUpdateReq + +// WebAuthnCredentialDeleteJSONRequestBody defines body for WebAuthnCredentialDelete for application/json ContentType. +type WebAuthnCredentialDeleteJSONRequestBody = EmptyReq + +// UserCustomLoginIdentifierCreateJSONRequestBody defines body for UserCustomLoginIdentifierCreate for application/json ContentType. +type UserCustomLoginIdentifierCreateJSONRequestBody = UserCustomLoginIdentifierCreateReq + +// UserCustomLoginIdentifierDeleteJSONRequestBody defines body for UserCustomLoginIdentifierDelete for application/json ContentType. +type UserCustomLoginIdentifierDeleteJSONRequestBody = UserCustomLoginIdentifierDeleteReq + +// UserEmailCreateJSONRequestBody defines body for UserEmailCreate for application/json ContentType. +type UserEmailCreateJSONRequestBody = UserEmailCreateReq + +// UserEmailDeleteJSONRequestBody defines body for UserEmailDelete for application/json ContentType. +type UserEmailDeleteJSONRequestBody = UserEmailDeleteReq + +// UserPhoneNumberCreateJSONRequestBody defines body for UserPhoneNumberCreate for application/json ContentType. +type UserPhoneNumberCreateJSONRequestBody = UserPhoneNumberCreateReq + +// UserPhoneNumberDeleteJSONRequestBody defines body for UserPhoneNumberDelete for application/json ContentType. +type UserPhoneNumberDeleteJSONRequestBody = UserPhoneNumberDeleteReq + +// ValidateEmailJSONRequestBody defines body for ValidateEmail for application/json ContentType. +type ValidateEmailJSONRequestBody = ValidateEmailReq + +// ValidatePhoneNumberJSONRequestBody defines body for ValidatePhoneNumber for application/json ContentType. +type ValidatePhoneNumberJSONRequestBody = ValidatePhoneNumberReq + +// WebAuthnAssociateStartJSONRequestBody defines body for WebAuthnAssociateStart for application/json ContentType. +type WebAuthnAssociateStartJSONRequestBody = WebAuthnAssociateStartReq + +// WebAuthnAuthenticateFinishJSONRequestBody defines body for WebAuthnAuthenticateFinish for application/json ContentType. +type WebAuthnAuthenticateFinishJSONRequestBody = WebAuthnFinishReq + +// WebAuthnAuthenticateStartJSONRequestBody defines body for WebAuthnAuthenticateStart for application/json ContentType. +type WebAuthnAuthenticateStartJSONRequestBody = WebAuthnAuthenticateStartReq + +// WebAuthnAuthenticatorUpdateJSONRequestBody defines body for WebAuthnAuthenticatorUpdate for application/json ContentType. +type WebAuthnAuthenticatorUpdateJSONRequestBody = WebAuthnAuthenticatorUpdateReq + +// WebAuthnCredentialExistsJSONRequestBody defines body for WebAuthnCredentialExists for application/json ContentType. +type WebAuthnCredentialExistsJSONRequestBody = WebAuthnCredentialExistsReq + +// WebAuthnCredentialUpdateJSONRequestBody defines body for WebAuthnCredentialUpdate for application/json ContentType. +type WebAuthnCredentialUpdateJSONRequestBody = WebAuthnCredentialReq + +// WebAuthnMediationStartJSONRequestBody defines body for WebAuthnMediationStart for application/json ContentType. +type WebAuthnMediationStartJSONRequestBody = WebAuthnMediationStartReq + +// WebAuthnRegisterFinishJSONRequestBody defines body for WebAuthnRegisterFinish for application/json ContentType. +type WebAuthnRegisterFinishJSONRequestBody = WebAuthnFinishReq + +// WebAuthnRegisterStartJSONRequestBody defines body for WebAuthnRegisterStart for application/json ContentType. +type WebAuthnRegisterStartJSONRequestBody = WebAuthnRegisterStartReq + +// WebAuthnSettingCreateJSONRequestBody defines body for WebAuthnSettingCreate for application/json ContentType. +type WebAuthnSettingCreateJSONRequestBody = WebauthnSettingCreateReq + +// WebAuthnSettingDeleteJSONRequestBody defines body for WebAuthnSettingDelete for application/json ContentType. +type WebAuthnSettingDeleteJSONRequestBody = WebauthnSettingDeleteReq + +// WebAuthnSettingPutJSONRequestBody defines body for WebAuthnSettingPut for application/json ContentType. +type WebAuthnSettingPutJSONRequestBody = WebauthnSettingUpdateReq + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +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 +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // AndroidAppConfigGet request + AndroidAppConfigGet(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AndroidAppConfigCreateWithBody request with any body + AndroidAppConfigCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AndroidAppConfigCreate(ctx context.Context, body AndroidAppConfigCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AndroidAppConfigDeleteWithBody request with any body + AndroidAppConfigDeleteWithBody(ctx context.Context, androidAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AndroidAppConfigDelete(ctx context.Context, androidAppConfigID string, body AndroidAppConfigDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AndroidAppConfigPutWithBody request with any body + AndroidAppConfigPutWithBody(ctx context.Context, androidAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AndroidAppConfigPut(ctx context.Context, androidAppConfigID string, body AndroidAppConfigPutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AssociationTokenCreateWithBody request with any body + AssociationTokenCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AssociationTokenCreate(ctx context.Context, body AssociationTokenCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AuthMethodsListWithBody request with any body + AuthMethodsListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AuthMethodsList(ctx context.Context, body AuthMethodsListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AuthTokenValidateWithBody request with any body + AuthTokenValidateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AuthTokenValidate(ctx context.Context, body AuthTokenValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // EmailCodeSendWithBody request with any body + EmailCodeSendWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + EmailCodeSend(ctx context.Context, body EmailCodeSendJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // EmailCodeGet request + EmailCodeGet(ctx context.Context, emailCodeID EmailCodeID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // EmailCodeValidateWithBody request with any body + EmailCodeValidateWithBody(ctx context.Context, emailCodeID EmailCodeID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + EmailCodeValidate(ctx context.Context, emailCodeID EmailCodeID, body EmailCodeValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // EmailLinkSendWithBody request with any body + EmailLinkSendWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + EmailLinkSend(ctx context.Context, body EmailLinkSendJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // EmailLinkDeleteWithBody request with any body + EmailLinkDeleteWithBody(ctx context.Context, emailLinkID EmailLinkID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + EmailLinkDelete(ctx context.Context, emailLinkID EmailLinkID, body EmailLinkDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // EmailLinkGet request + EmailLinkGet(ctx context.Context, emailLinkID EmailLinkID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // EmailLinkValidateWithBody request with any body + EmailLinkValidateWithBody(ctx context.Context, emailLinkID EmailLinkID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + EmailLinkValidate(ctx context.Context, emailLinkID EmailLinkID, body EmailLinkValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // EmailTemplateCreateWithBody request with any body + EmailTemplateCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + EmailTemplateCreate(ctx context.Context, body EmailTemplateCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // EmailTemplateDeleteWithBody request with any body + EmailTemplateDeleteWithBody(ctx context.Context, emailTemplateID EmailTemplateID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + EmailTemplateDelete(ctx context.Context, emailTemplateID EmailTemplateID, body EmailTemplateDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ExampleGet request + ExampleGet(ctx context.Context, fileName ExampleGetParamsFileName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // IOSAppConfigGet request + IOSAppConfigGet(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // IOSAppConfigCreateWithBody request with any body + IOSAppConfigCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + IOSAppConfigCreate(ctx context.Context, body IOSAppConfigCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // IOSAppConfigDeleteWithBody request with any body + IOSAppConfigDeleteWithBody(ctx context.Context, iosAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + IOSAppConfigDelete(ctx context.Context, iosAppConfigID string, body IOSAppConfigDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // IOSAppConfigPutWithBody request with any body + IOSAppConfigPutWithBody(ctx context.Context, iosAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + IOSAppConfigPut(ctx context.Context, iosAppConfigID string, body IOSAppConfigPutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // LongSessionList request + LongSessionList(ctx context.Context, params *LongSessionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // LongSessionGet request + LongSessionGet(ctx context.Context, sessionID externalRef0.SessionID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // LongSessionRevokeWithBody request with any body + LongSessionRevokeWithBody(ctx context.Context, sessionID externalRef0.SessionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + LongSessionRevoke(ctx context.Context, sessionID externalRef0.SessionID, body LongSessionRevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // OriginAllowedWithBody request with any body + OriginAllowedWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + OriginAllowed(ctx context.Context, body OriginAllowedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ProjectConfigGet request + ProjectConfigGet(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ProjectConfigSaveWithBody request with any body + ProjectConfigSaveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ProjectConfigSave(ctx context.Context, body ProjectConfigSaveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ProjectConfigWebhookTestWithBody request with any body + ProjectConfigWebhookTestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ProjectConfigWebhookTest(ctx context.Context, body ProjectConfigWebhookTestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ProjectSecretList request + ProjectSecretList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ProjectSecretCreateWithBody request with any body + ProjectSecretCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ProjectSecretCreate(ctx context.Context, body ProjectSecretCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ProjectSecretDeleteWithBody request with any body + ProjectSecretDeleteWithBody(ctx context.Context, secretID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ProjectSecretDelete(ctx context.Context, secretID string, body ProjectSecretDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ProjectActivateWithBody request with any body + ProjectActivateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ProjectActivate(ctx context.Context, body ProjectActivateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // RequestLogsList request + RequestLogsList(ctx context.Context, params *RequestLogsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // RequestLogGet request + RequestLogGet(ctx context.Context, requestID RequestID, params *RequestLogGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SessionConfigGet request + SessionConfigGet(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SessionConfigUpdateWithBody request with any body + SessionConfigUpdateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SessionConfigUpdate(ctx context.Context, body SessionConfigUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SessionTokenCreateWithBody request with any body + SessionTokenCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SessionTokenCreate(ctx context.Context, body SessionTokenCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SessionTokenVerifyWithBody request with any body + SessionTokenVerifyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SessionTokenVerify(ctx context.Context, body SessionTokenVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SmsCodeSendWithBody request with any body + SmsCodeSendWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SmsCodeSend(ctx context.Context, body SmsCodeSendJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SmsCodeValidateWithBody request with any body + SmsCodeValidateWithBody(ctx context.Context, smsCodeID SmsCodeID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SmsCodeValidate(ctx context.Context, smsCodeID SmsCodeID, body SmsCodeValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SmsTemplateCreateWithBody request with any body + SmsTemplateCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SmsTemplateCreate(ctx context.Context, body SmsTemplateCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SmsTemplateDeleteWithBody request with any body + SmsTemplateDeleteWithBody(ctx context.Context, smsTemplateID SmsTemplateID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SmsTemplateDelete(ctx context.Context, smsTemplateID SmsTemplateID, body SmsTemplateDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // TrackingAllRequest request + TrackingAllRequest(ctx context.Context, params *TrackingAllRequestParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // TrackingBackupStateGet request + TrackingBackupStateGet(ctx context.Context, params *TrackingBackupStateGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // TrackingBrowserStatsList request + TrackingBrowserStatsList(ctx context.Context, params *TrackingBrowserStatsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // TrackingBrowserDetailedStatsList request + TrackingBrowserDetailedStatsList(ctx context.Context, params *TrackingBrowserDetailedStatsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // TrackingEnumsGet request + TrackingEnumsGet(ctx context.Context, params *TrackingEnumsGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // TrackingOSStatsList request + TrackingOSStatsList(ctx context.Context, params *TrackingOSStatsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // TrackingOSDetailedStatsList request + TrackingOSDetailedStatsList(ctx context.Context, params *TrackingOSDetailedStatsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // TrackingStatsList request + TrackingStatsList(ctx context.Context, params *TrackingStatsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // TrackingDetailedStatsList request + TrackingDetailedStatsList(ctx context.Context, params *TrackingDetailedStatsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserAuthLogList request + UserAuthLogList(ctx context.Context, params *UserAuthLogListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserList request + UserList(ctx context.Context, params *UserListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserCreateWithBody request with any body + UserCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UserCreate(ctx context.Context, body UserCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserStatsList request + UserStatsList(ctx context.Context, params *UserStatsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserDeleteWithBody request with any body + UserDeleteWithBody(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UserDelete(ctx context.Context, userID UserID, body UserDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserGet request + UserGet(ctx context.Context, userID UserID, params *UserGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserUpdateWithBody request with any body + UserUpdateWithBody(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UserUpdate(ctx context.Context, userID UserID, body UserUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnCredentialDeleteWithBody request with any body + WebAuthnCredentialDeleteWithBody(ctx context.Context, userID UserID, credentialID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + WebAuthnCredentialDelete(ctx context.Context, userID UserID, credentialID string, body WebAuthnCredentialDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserCustomLoginIdentifierCreateWithBody request with any body + UserCustomLoginIdentifierCreateWithBody(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UserCustomLoginIdentifierCreate(ctx context.Context, userID UserID, body UserCustomLoginIdentifierCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserCustomLoginIdentifierDeleteWithBody request with any body + UserCustomLoginIdentifierDeleteWithBody(ctx context.Context, userID UserID, customLoginIdentifierID CustomLoginIdentifierID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UserCustomLoginIdentifierDelete(ctx context.Context, userID UserID, customLoginIdentifierID CustomLoginIdentifierID, body UserCustomLoginIdentifierDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserCustomLoginIdentifierGet request + UserCustomLoginIdentifierGet(ctx context.Context, userID UserID, customLoginIdentifierID CustomLoginIdentifierID, params *UserCustomLoginIdentifierGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserDeviceList request + UserDeviceList(ctx context.Context, userID UserID, params *UserDeviceListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserEmailCreateWithBody request with any body + UserEmailCreateWithBody(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UserEmailCreate(ctx context.Context, userID UserID, body UserEmailCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserEmailDeleteWithBody request with any body + UserEmailDeleteWithBody(ctx context.Context, userID UserID, emailID EmailID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UserEmailDelete(ctx context.Context, userID UserID, emailID EmailID, body UserEmailDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserEmailGet request + UserEmailGet(ctx context.Context, userID UserID, emailID EmailID, params *UserEmailGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserPhoneNumberCreateWithBody request with any body + UserPhoneNumberCreateWithBody(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UserPhoneNumberCreate(ctx context.Context, userID UserID, body UserPhoneNumberCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserPhoneNumberDeleteWithBody request with any body + UserPhoneNumberDeleteWithBody(ctx context.Context, userID UserID, phoneNumberID PhoneNumberID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UserPhoneNumberDelete(ctx context.Context, userID UserID, phoneNumberID PhoneNumberID, body UserPhoneNumberDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserPhoneNumberGet request + UserPhoneNumberGet(ctx context.Context, userID UserID, phoneNumberID PhoneNumberID, params *UserPhoneNumberGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ValidateEmailWithBody request with any body + ValidateEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ValidateEmail(ctx context.Context, body ValidateEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ValidatePhoneNumberWithBody request with any body + ValidatePhoneNumberWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ValidatePhoneNumber(ctx context.Context, body ValidatePhoneNumberJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnAssociateStartWithBody request with any body + WebAuthnAssociateStartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + WebAuthnAssociateStart(ctx context.Context, body WebAuthnAssociateStartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnAuthenticateFinishWithBody request with any body + WebAuthnAuthenticateFinishWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + WebAuthnAuthenticateFinish(ctx context.Context, body WebAuthnAuthenticateFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnAuthenticateStartWithBody request with any body + WebAuthnAuthenticateStartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + WebAuthnAuthenticateStart(ctx context.Context, body WebAuthnAuthenticateStartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnAuthenticatorUpdateWithBody request with any body + WebAuthnAuthenticatorUpdateWithBody(ctx context.Context, authenticatorID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + WebAuthnAuthenticatorUpdate(ctx context.Context, authenticatorID string, body WebAuthnAuthenticatorUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnCredentialList request + WebAuthnCredentialList(ctx context.Context, params *WebAuthnCredentialListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnCredentialExistsWithBody request with any body + WebAuthnCredentialExistsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + WebAuthnCredentialExists(ctx context.Context, body WebAuthnCredentialExistsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnCredentialUpdateWithBody request with any body + WebAuthnCredentialUpdateWithBody(ctx context.Context, credentialID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + WebAuthnCredentialUpdate(ctx context.Context, credentialID string, body WebAuthnCredentialUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnMediationStartWithBody request with any body + WebAuthnMediationStartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + WebAuthnMediationStart(ctx context.Context, body WebAuthnMediationStartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnRegisterFinishWithBody request with any body + WebAuthnRegisterFinishWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + WebAuthnRegisterFinish(ctx context.Context, body WebAuthnRegisterFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnRegisterStartWithBody request with any body + WebAuthnRegisterStartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + WebAuthnRegisterStart(ctx context.Context, body WebAuthnRegisterStartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnSettingList request + WebAuthnSettingList(ctx context.Context, params *WebAuthnSettingListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnSettingCreateWithBody request with any body + WebAuthnSettingCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + WebAuthnSettingCreate(ctx context.Context, body WebAuthnSettingCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnSettingDeleteWithBody request with any body + WebAuthnSettingDeleteWithBody(ctx context.Context, settingID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + WebAuthnSettingDelete(ctx context.Context, settingID string, body WebAuthnSettingDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnSettingGet request + WebAuthnSettingGet(ctx context.Context, settingID string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebAuthnSettingPutWithBody request with any body + WebAuthnSettingPutWithBody(ctx context.Context, settingID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + WebAuthnSettingPut(ctx context.Context, settingID string, body WebAuthnSettingPutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // WebhookLogsList request + WebhookLogsList(ctx context.Context, params *WebhookLogsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) AndroidAppConfigGet(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAndroidAppConfigGetRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AndroidAppConfigCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAndroidAppConfigCreateRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AndroidAppConfigCreate(ctx context.Context, body AndroidAppConfigCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAndroidAppConfigCreateRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AndroidAppConfigDeleteWithBody(ctx context.Context, androidAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAndroidAppConfigDeleteRequestWithBody(c.Server, androidAppConfigID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AndroidAppConfigDelete(ctx context.Context, androidAppConfigID string, body AndroidAppConfigDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAndroidAppConfigDeleteRequest(c.Server, androidAppConfigID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AndroidAppConfigPutWithBody(ctx context.Context, androidAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAndroidAppConfigPutRequestWithBody(c.Server, androidAppConfigID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AndroidAppConfigPut(ctx context.Context, androidAppConfigID string, body AndroidAppConfigPutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAndroidAppConfigPutRequest(c.Server, androidAppConfigID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AssociationTokenCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAssociationTokenCreateRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AssociationTokenCreate(ctx context.Context, body AssociationTokenCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAssociationTokenCreateRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AuthMethodsListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthMethodsListRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AuthMethodsList(ctx context.Context, body AuthMethodsListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthMethodsListRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AuthTokenValidateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthTokenValidateRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AuthTokenValidate(ctx context.Context, body AuthTokenValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthTokenValidateRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailCodeSendWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailCodeSendRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailCodeSend(ctx context.Context, body EmailCodeSendJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailCodeSendRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailCodeGet(ctx context.Context, emailCodeID EmailCodeID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailCodeGetRequest(c.Server, emailCodeID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailCodeValidateWithBody(ctx context.Context, emailCodeID EmailCodeID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailCodeValidateRequestWithBody(c.Server, emailCodeID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailCodeValidate(ctx context.Context, emailCodeID EmailCodeID, body EmailCodeValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailCodeValidateRequest(c.Server, emailCodeID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailLinkSendWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailLinkSendRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailLinkSend(ctx context.Context, body EmailLinkSendJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailLinkSendRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailLinkDeleteWithBody(ctx context.Context, emailLinkID EmailLinkID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailLinkDeleteRequestWithBody(c.Server, emailLinkID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailLinkDelete(ctx context.Context, emailLinkID EmailLinkID, body EmailLinkDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailLinkDeleteRequest(c.Server, emailLinkID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailLinkGet(ctx context.Context, emailLinkID EmailLinkID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailLinkGetRequest(c.Server, emailLinkID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailLinkValidateWithBody(ctx context.Context, emailLinkID EmailLinkID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailLinkValidateRequestWithBody(c.Server, emailLinkID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailLinkValidate(ctx context.Context, emailLinkID EmailLinkID, body EmailLinkValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailLinkValidateRequest(c.Server, emailLinkID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailTemplateCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailTemplateCreateRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailTemplateCreate(ctx context.Context, body EmailTemplateCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailTemplateCreateRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailTemplateDeleteWithBody(ctx context.Context, emailTemplateID EmailTemplateID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailTemplateDeleteRequestWithBody(c.Server, emailTemplateID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) EmailTemplateDelete(ctx context.Context, emailTemplateID EmailTemplateID, body EmailTemplateDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailTemplateDeleteRequest(c.Server, emailTemplateID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ExampleGet(ctx context.Context, fileName ExampleGetParamsFileName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewExampleGetRequest(c.Server, fileName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IOSAppConfigGet(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIOSAppConfigGetRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IOSAppConfigCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIOSAppConfigCreateRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IOSAppConfigCreate(ctx context.Context, body IOSAppConfigCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIOSAppConfigCreateRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IOSAppConfigDeleteWithBody(ctx context.Context, iosAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIOSAppConfigDeleteRequestWithBody(c.Server, iosAppConfigID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IOSAppConfigDelete(ctx context.Context, iosAppConfigID string, body IOSAppConfigDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIOSAppConfigDeleteRequest(c.Server, iosAppConfigID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IOSAppConfigPutWithBody(ctx context.Context, iosAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIOSAppConfigPutRequestWithBody(c.Server, iosAppConfigID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IOSAppConfigPut(ctx context.Context, iosAppConfigID string, body IOSAppConfigPutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIOSAppConfigPutRequest(c.Server, iosAppConfigID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) LongSessionList(ctx context.Context, params *LongSessionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLongSessionListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) LongSessionGet(ctx context.Context, sessionID externalRef0.SessionID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLongSessionGetRequest(c.Server, sessionID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) LongSessionRevokeWithBody(ctx context.Context, sessionID externalRef0.SessionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLongSessionRevokeRequestWithBody(c.Server, sessionID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) LongSessionRevoke(ctx context.Context, sessionID externalRef0.SessionID, body LongSessionRevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLongSessionRevokeRequest(c.Server, sessionID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) OriginAllowedWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewOriginAllowedRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) OriginAllowed(ctx context.Context, body OriginAllowedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewOriginAllowedRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ProjectConfigGet(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewProjectConfigGetRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ProjectConfigSaveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewProjectConfigSaveRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ProjectConfigSave(ctx context.Context, body ProjectConfigSaveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewProjectConfigSaveRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ProjectConfigWebhookTestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewProjectConfigWebhookTestRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ProjectConfigWebhookTest(ctx context.Context, body ProjectConfigWebhookTestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewProjectConfigWebhookTestRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ProjectSecretList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewProjectSecretListRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ProjectSecretCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewProjectSecretCreateRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ProjectSecretCreate(ctx context.Context, body ProjectSecretCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewProjectSecretCreateRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ProjectSecretDeleteWithBody(ctx context.Context, secretID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewProjectSecretDeleteRequestWithBody(c.Server, secretID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ProjectSecretDelete(ctx context.Context, secretID string, body ProjectSecretDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewProjectSecretDeleteRequest(c.Server, secretID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ProjectActivateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewProjectActivateRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ProjectActivate(ctx context.Context, body ProjectActivateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewProjectActivateRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) RequestLogsList(ctx context.Context, params *RequestLogsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRequestLogsListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) RequestLogGet(ctx context.Context, requestID RequestID, params *RequestLogGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRequestLogGetRequest(c.Server, requestID, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SessionConfigGet(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSessionConfigGetRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SessionConfigUpdateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSessionConfigUpdateRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SessionConfigUpdate(ctx context.Context, body SessionConfigUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSessionConfigUpdateRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SessionTokenCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSessionTokenCreateRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SessionTokenCreate(ctx context.Context, body SessionTokenCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSessionTokenCreateRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SessionTokenVerifyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSessionTokenVerifyRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SessionTokenVerify(ctx context.Context, body SessionTokenVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSessionTokenVerifyRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SmsCodeSendWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSmsCodeSendRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SmsCodeSend(ctx context.Context, body SmsCodeSendJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSmsCodeSendRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SmsCodeValidateWithBody(ctx context.Context, smsCodeID SmsCodeID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSmsCodeValidateRequestWithBody(c.Server, smsCodeID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SmsCodeValidate(ctx context.Context, smsCodeID SmsCodeID, body SmsCodeValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSmsCodeValidateRequest(c.Server, smsCodeID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SmsTemplateCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSmsTemplateCreateRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SmsTemplateCreate(ctx context.Context, body SmsTemplateCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSmsTemplateCreateRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SmsTemplateDeleteWithBody(ctx context.Context, smsTemplateID SmsTemplateID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSmsTemplateDeleteRequestWithBody(c.Server, smsTemplateID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SmsTemplateDelete(ctx context.Context, smsTemplateID SmsTemplateID, body SmsTemplateDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSmsTemplateDeleteRequest(c.Server, smsTemplateID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) TrackingAllRequest(ctx context.Context, params *TrackingAllRequestParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTrackingAllRequestRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) TrackingBackupStateGet(ctx context.Context, params *TrackingBackupStateGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTrackingBackupStateGetRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) TrackingBrowserStatsList(ctx context.Context, params *TrackingBrowserStatsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTrackingBrowserStatsListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) TrackingBrowserDetailedStatsList(ctx context.Context, params *TrackingBrowserDetailedStatsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTrackingBrowserDetailedStatsListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) TrackingEnumsGet(ctx context.Context, params *TrackingEnumsGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTrackingEnumsGetRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) TrackingOSStatsList(ctx context.Context, params *TrackingOSStatsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTrackingOSStatsListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) TrackingOSDetailedStatsList(ctx context.Context, params *TrackingOSDetailedStatsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTrackingOSDetailedStatsListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) TrackingStatsList(ctx context.Context, params *TrackingStatsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTrackingStatsListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) TrackingDetailedStatsList(ctx context.Context, params *TrackingDetailedStatsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTrackingDetailedStatsListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserAuthLogList(ctx context.Context, params *UserAuthLogListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserAuthLogListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserList(ctx context.Context, params *UserListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserCreateRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserCreate(ctx context.Context, body UserCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserCreateRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserStatsList(ctx context.Context, params *UserStatsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserStatsListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserDeleteWithBody(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserDeleteRequestWithBody(c.Server, userID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserDelete(ctx context.Context, userID UserID, body UserDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserDeleteRequest(c.Server, userID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserGet(ctx context.Context, userID UserID, params *UserGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserGetRequest(c.Server, userID, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserUpdateWithBody(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserUpdateRequestWithBody(c.Server, userID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserUpdate(ctx context.Context, userID UserID, body UserUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserUpdateRequest(c.Server, userID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnCredentialDeleteWithBody(ctx context.Context, userID UserID, credentialID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnCredentialDeleteRequestWithBody(c.Server, userID, credentialID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnCredentialDelete(ctx context.Context, userID UserID, credentialID string, body WebAuthnCredentialDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnCredentialDeleteRequest(c.Server, userID, credentialID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserCustomLoginIdentifierCreateWithBody(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserCustomLoginIdentifierCreateRequestWithBody(c.Server, userID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserCustomLoginIdentifierCreate(ctx context.Context, userID UserID, body UserCustomLoginIdentifierCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserCustomLoginIdentifierCreateRequest(c.Server, userID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserCustomLoginIdentifierDeleteWithBody(ctx context.Context, userID UserID, customLoginIdentifierID CustomLoginIdentifierID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserCustomLoginIdentifierDeleteRequestWithBody(c.Server, userID, customLoginIdentifierID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserCustomLoginIdentifierDelete(ctx context.Context, userID UserID, customLoginIdentifierID CustomLoginIdentifierID, body UserCustomLoginIdentifierDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserCustomLoginIdentifierDeleteRequest(c.Server, userID, customLoginIdentifierID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserCustomLoginIdentifierGet(ctx context.Context, userID UserID, customLoginIdentifierID CustomLoginIdentifierID, params *UserCustomLoginIdentifierGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserCustomLoginIdentifierGetRequest(c.Server, userID, customLoginIdentifierID, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserDeviceList(ctx context.Context, userID UserID, params *UserDeviceListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserDeviceListRequest(c.Server, userID, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserEmailCreateWithBody(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserEmailCreateRequestWithBody(c.Server, userID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserEmailCreate(ctx context.Context, userID UserID, body UserEmailCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserEmailCreateRequest(c.Server, userID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserEmailDeleteWithBody(ctx context.Context, userID UserID, emailID EmailID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserEmailDeleteRequestWithBody(c.Server, userID, emailID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserEmailDelete(ctx context.Context, userID UserID, emailID EmailID, body UserEmailDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserEmailDeleteRequest(c.Server, userID, emailID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserEmailGet(ctx context.Context, userID UserID, emailID EmailID, params *UserEmailGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserEmailGetRequest(c.Server, userID, emailID, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserPhoneNumberCreateWithBody(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserPhoneNumberCreateRequestWithBody(c.Server, userID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserPhoneNumberCreate(ctx context.Context, userID UserID, body UserPhoneNumberCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserPhoneNumberCreateRequest(c.Server, userID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserPhoneNumberDeleteWithBody(ctx context.Context, userID UserID, phoneNumberID PhoneNumberID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserPhoneNumberDeleteRequestWithBody(c.Server, userID, phoneNumberID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserPhoneNumberDelete(ctx context.Context, userID UserID, phoneNumberID PhoneNumberID, body UserPhoneNumberDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserPhoneNumberDeleteRequest(c.Server, userID, phoneNumberID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserPhoneNumberGet(ctx context.Context, userID UserID, phoneNumberID PhoneNumberID, params *UserPhoneNumberGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserPhoneNumberGetRequest(c.Server, userID, phoneNumberID, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ValidateEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewValidateEmailRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ValidateEmail(ctx context.Context, body ValidateEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewValidateEmailRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ValidatePhoneNumberWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewValidatePhoneNumberRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ValidatePhoneNumber(ctx context.Context, body ValidatePhoneNumberJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewValidatePhoneNumberRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnAssociateStartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnAssociateStartRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnAssociateStart(ctx context.Context, body WebAuthnAssociateStartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnAssociateStartRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnAuthenticateFinishWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnAuthenticateFinishRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnAuthenticateFinish(ctx context.Context, body WebAuthnAuthenticateFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnAuthenticateFinishRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnAuthenticateStartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnAuthenticateStartRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnAuthenticateStart(ctx context.Context, body WebAuthnAuthenticateStartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnAuthenticateStartRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnAuthenticatorUpdateWithBody(ctx context.Context, authenticatorID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnAuthenticatorUpdateRequestWithBody(c.Server, authenticatorID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnAuthenticatorUpdate(ctx context.Context, authenticatorID string, body WebAuthnAuthenticatorUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnAuthenticatorUpdateRequest(c.Server, authenticatorID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnCredentialList(ctx context.Context, params *WebAuthnCredentialListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnCredentialListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnCredentialExistsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnCredentialExistsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnCredentialExists(ctx context.Context, body WebAuthnCredentialExistsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnCredentialExistsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnCredentialUpdateWithBody(ctx context.Context, credentialID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnCredentialUpdateRequestWithBody(c.Server, credentialID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnCredentialUpdate(ctx context.Context, credentialID string, body WebAuthnCredentialUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnCredentialUpdateRequest(c.Server, credentialID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnMediationStartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnMediationStartRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnMediationStart(ctx context.Context, body WebAuthnMediationStartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnMediationStartRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnRegisterFinishWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnRegisterFinishRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnRegisterFinish(ctx context.Context, body WebAuthnRegisterFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnRegisterFinishRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnRegisterStartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnRegisterStartRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnRegisterStart(ctx context.Context, body WebAuthnRegisterStartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnRegisterStartRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnSettingList(ctx context.Context, params *WebAuthnSettingListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnSettingListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnSettingCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnSettingCreateRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnSettingCreate(ctx context.Context, body WebAuthnSettingCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnSettingCreateRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnSettingDeleteWithBody(ctx context.Context, settingID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnSettingDeleteRequestWithBody(c.Server, settingID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnSettingDelete(ctx context.Context, settingID string, body WebAuthnSettingDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnSettingDeleteRequest(c.Server, settingID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnSettingGet(ctx context.Context, settingID string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnSettingGetRequest(c.Server, settingID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnSettingPutWithBody(ctx context.Context, settingID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnSettingPutRequestWithBody(c.Server, settingID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebAuthnSettingPut(ctx context.Context, settingID string, body WebAuthnSettingPutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebAuthnSettingPutRequest(c.Server, settingID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) WebhookLogsList(ctx context.Context, params *WebhookLogsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWebhookLogsListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewAndroidAppConfigGetRequest generates requests for AndroidAppConfigGet +func NewAndroidAppConfigGetRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/androidappconfig") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewAndroidAppConfigCreateRequest calls the generic AndroidAppConfigCreate builder with application/json body +func NewAndroidAppConfigCreateRequest(server string, body AndroidAppConfigCreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAndroidAppConfigCreateRequestWithBody(server, "application/json", bodyReader) +} + +// NewAndroidAppConfigCreateRequestWithBody generates requests for AndroidAppConfigCreate with any type of body +func NewAndroidAppConfigCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/androidappconfig") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewAndroidAppConfigDeleteRequest calls the generic AndroidAppConfigDelete builder with application/json body +func NewAndroidAppConfigDeleteRequest(server string, androidAppConfigID string, body AndroidAppConfigDeleteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAndroidAppConfigDeleteRequestWithBody(server, androidAppConfigID, "application/json", bodyReader) +} + +// NewAndroidAppConfigDeleteRequestWithBody generates requests for AndroidAppConfigDelete with any type of body +func NewAndroidAppConfigDeleteRequestWithBody(server string, androidAppConfigID string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "androidAppConfigID", runtime.ParamLocationPath, androidAppConfigID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/androidappconfig/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewAndroidAppConfigPutRequest calls the generic AndroidAppConfigPut builder with application/json body +func NewAndroidAppConfigPutRequest(server string, androidAppConfigID string, body AndroidAppConfigPutJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAndroidAppConfigPutRequestWithBody(server, androidAppConfigID, "application/json", bodyReader) +} + +// NewAndroidAppConfigPutRequestWithBody generates requests for AndroidAppConfigPut with any type of body +func NewAndroidAppConfigPutRequestWithBody(server string, androidAppConfigID string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "androidAppConfigID", runtime.ParamLocationPath, androidAppConfigID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/androidappconfig/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewAssociationTokenCreateRequest calls the generic AssociationTokenCreate builder with application/json body +func NewAssociationTokenCreateRequest(server string, body AssociationTokenCreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAssociationTokenCreateRequestWithBody(server, "application/json", bodyReader) +} + +// NewAssociationTokenCreateRequestWithBody generates requests for AssociationTokenCreate with any type of body +func NewAssociationTokenCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/associationTokens") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewAuthMethodsListRequest calls the generic AuthMethodsList builder with application/json body +func NewAuthMethodsListRequest(server string, body AuthMethodsListJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAuthMethodsListRequestWithBody(server, "application/json", bodyReader) +} + +// NewAuthMethodsListRequestWithBody generates requests for AuthMethodsList with any type of body +func NewAuthMethodsListRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/authMethods") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewAuthTokenValidateRequest calls the generic AuthTokenValidate builder with application/json body +func NewAuthTokenValidateRequest(server string, body AuthTokenValidateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAuthTokenValidateRequestWithBody(server, "application/json", bodyReader) +} + +// NewAuthTokenValidateRequestWithBody generates requests for AuthTokenValidate with any type of body +func NewAuthTokenValidateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/authTokens/validate") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewEmailCodeSendRequest calls the generic EmailCodeSend builder with application/json body +func NewEmailCodeSendRequest(server string, body EmailCodeSendJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewEmailCodeSendRequestWithBody(server, "application/json", bodyReader) +} + +// NewEmailCodeSendRequestWithBody generates requests for EmailCodeSend with any type of body +func NewEmailCodeSendRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/emailCodes") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewEmailCodeGetRequest generates requests for EmailCodeGet +func NewEmailCodeGetRequest(server string, emailCodeID EmailCodeID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "emailCodeID", runtime.ParamLocationPath, emailCodeID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/emailCodes/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewEmailCodeValidateRequest calls the generic EmailCodeValidate builder with application/json body +func NewEmailCodeValidateRequest(server string, emailCodeID EmailCodeID, body EmailCodeValidateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewEmailCodeValidateRequestWithBody(server, emailCodeID, "application/json", bodyReader) +} + +// NewEmailCodeValidateRequestWithBody generates requests for EmailCodeValidate with any type of body +func NewEmailCodeValidateRequestWithBody(server string, emailCodeID EmailCodeID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "emailCodeID", runtime.ParamLocationPath, emailCodeID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/emailCodes/%s/validate", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewEmailLinkSendRequest calls the generic EmailLinkSend builder with application/json body +func NewEmailLinkSendRequest(server string, body EmailLinkSendJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewEmailLinkSendRequestWithBody(server, "application/json", bodyReader) +} + +// NewEmailLinkSendRequestWithBody generates requests for EmailLinkSend with any type of body +func NewEmailLinkSendRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/emailLinks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewEmailLinkDeleteRequest calls the generic EmailLinkDelete builder with application/json body +func NewEmailLinkDeleteRequest(server string, emailLinkID EmailLinkID, body EmailLinkDeleteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewEmailLinkDeleteRequestWithBody(server, emailLinkID, "application/json", bodyReader) +} + +// NewEmailLinkDeleteRequestWithBody generates requests for EmailLinkDelete with any type of body +func NewEmailLinkDeleteRequestWithBody(server string, emailLinkID EmailLinkID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "emailLinkID", runtime.ParamLocationPath, emailLinkID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/emailLinks/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewEmailLinkGetRequest generates requests for EmailLinkGet +func NewEmailLinkGetRequest(server string, emailLinkID EmailLinkID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "emailLinkID", runtime.ParamLocationPath, emailLinkID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/emailLinks/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewEmailLinkValidateRequest calls the generic EmailLinkValidate builder with application/json body +func NewEmailLinkValidateRequest(server string, emailLinkID EmailLinkID, body EmailLinkValidateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewEmailLinkValidateRequestWithBody(server, emailLinkID, "application/json", bodyReader) +} + +// NewEmailLinkValidateRequestWithBody generates requests for EmailLinkValidate with any type of body +func NewEmailLinkValidateRequestWithBody(server string, emailLinkID EmailLinkID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "emailLinkID", runtime.ParamLocationPath, emailLinkID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/emailLinks/%s/validate", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewEmailTemplateCreateRequest calls the generic EmailTemplateCreate builder with application/json body +func NewEmailTemplateCreateRequest(server string, body EmailTemplateCreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewEmailTemplateCreateRequestWithBody(server, "application/json", bodyReader) +} + +// NewEmailTemplateCreateRequestWithBody generates requests for EmailTemplateCreate with any type of body +func NewEmailTemplateCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/emailTemplates") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewEmailTemplateDeleteRequest calls the generic EmailTemplateDelete builder with application/json body +func NewEmailTemplateDeleteRequest(server string, emailTemplateID EmailTemplateID, body EmailTemplateDeleteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewEmailTemplateDeleteRequestWithBody(server, emailTemplateID, "application/json", bodyReader) +} + +// NewEmailTemplateDeleteRequestWithBody generates requests for EmailTemplateDelete with any type of body +func NewEmailTemplateDeleteRequestWithBody(server string, emailTemplateID EmailTemplateID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "emailTemplateID", runtime.ParamLocationPath, emailTemplateID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/emailTemplates/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewExampleGetRequest generates requests for ExampleGet +func NewExampleGetRequest(server string, fileName ExampleGetParamsFileName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "fileName", runtime.ParamLocationPath, fileName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/examples/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewIOSAppConfigGetRequest generates requests for IOSAppConfigGet +func NewIOSAppConfigGetRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/iosappconfig") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewIOSAppConfigCreateRequest calls the generic IOSAppConfigCreate builder with application/json body +func NewIOSAppConfigCreateRequest(server string, body IOSAppConfigCreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewIOSAppConfigCreateRequestWithBody(server, "application/json", bodyReader) +} + +// NewIOSAppConfigCreateRequestWithBody generates requests for IOSAppConfigCreate with any type of body +func NewIOSAppConfigCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/iosappconfig") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewIOSAppConfigDeleteRequest calls the generic IOSAppConfigDelete builder with application/json body +func NewIOSAppConfigDeleteRequest(server string, iosAppConfigID string, body IOSAppConfigDeleteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewIOSAppConfigDeleteRequestWithBody(server, iosAppConfigID, "application/json", bodyReader) +} + +// NewIOSAppConfigDeleteRequestWithBody generates requests for IOSAppConfigDelete with any type of body +func NewIOSAppConfigDeleteRequestWithBody(server string, iosAppConfigID string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "iosAppConfigID", runtime.ParamLocationPath, iosAppConfigID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/iosappconfig/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewIOSAppConfigPutRequest calls the generic IOSAppConfigPut builder with application/json body +func NewIOSAppConfigPutRequest(server string, iosAppConfigID string, body IOSAppConfigPutJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewIOSAppConfigPutRequestWithBody(server, iosAppConfigID, "application/json", bodyReader) +} + +// NewIOSAppConfigPutRequestWithBody generates requests for IOSAppConfigPut with any type of body +func NewIOSAppConfigPutRequestWithBody(server string, iosAppConfigID string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "iosAppConfigID", runtime.ParamLocationPath, iosAppConfigID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/iosappconfig/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewLongSessionListRequest generates requests for LongSessionList +func NewLongSessionListRequest(server string, params *LongSessionListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/longSessions") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewLongSessionGetRequest generates requests for LongSessionGet +func NewLongSessionGetRequest(server string, sessionID externalRef0.SessionID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/longSessions/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewLongSessionRevokeRequest calls the generic LongSessionRevoke builder with application/json body +func NewLongSessionRevokeRequest(server string, sessionID externalRef0.SessionID, body LongSessionRevokeJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewLongSessionRevokeRequestWithBody(server, sessionID, "application/json", bodyReader) +} + +// NewLongSessionRevokeRequestWithBody generates requests for LongSessionRevoke with any type of body +func NewLongSessionRevokeRequestWithBody(server string, sessionID externalRef0.SessionID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "sessionID", runtime.ParamLocationPath, sessionID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/longSessions/%s/revoke", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewOriginAllowedRequest calls the generic OriginAllowed builder with application/json body +func NewOriginAllowedRequest(server string, body OriginAllowedJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewOriginAllowedRequestWithBody(server, "application/json", bodyReader) +} + +// NewOriginAllowedRequestWithBody generates requests for OriginAllowed with any type of body +func NewOriginAllowedRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/origin/allowed") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewProjectConfigGetRequest generates requests for ProjectConfigGet +func NewProjectConfigGetRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/projectConfig") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewProjectConfigSaveRequest calls the generic ProjectConfigSave builder with application/json body +func NewProjectConfigSaveRequest(server string, body ProjectConfigSaveJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewProjectConfigSaveRequestWithBody(server, "application/json", bodyReader) +} + +// NewProjectConfigSaveRequestWithBody generates requests for ProjectConfigSave with any type of body +func NewProjectConfigSaveRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/projectConfig") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewProjectConfigWebhookTestRequest calls the generic ProjectConfigWebhookTest builder with application/json body +func NewProjectConfigWebhookTestRequest(server string, body ProjectConfigWebhookTestJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewProjectConfigWebhookTestRequestWithBody(server, "application/json", bodyReader) +} + +// NewProjectConfigWebhookTestRequestWithBody generates requests for ProjectConfigWebhookTest with any type of body +func NewProjectConfigWebhookTestRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/projectConfig/testWebhook") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewProjectSecretListRequest generates requests for ProjectSecretList +func NewProjectSecretListRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/projectSecrets") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewProjectSecretCreateRequest calls the generic ProjectSecretCreate builder with application/json body +func NewProjectSecretCreateRequest(server string, body ProjectSecretCreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewProjectSecretCreateRequestWithBody(server, "application/json", bodyReader) +} + +// NewProjectSecretCreateRequestWithBody generates requests for ProjectSecretCreate with any type of body +func NewProjectSecretCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/projectSecrets") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewProjectSecretDeleteRequest calls the generic ProjectSecretDelete builder with application/json body +func NewProjectSecretDeleteRequest(server string, secretID string, body ProjectSecretDeleteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewProjectSecretDeleteRequestWithBody(server, secretID, "application/json", bodyReader) +} + +// NewProjectSecretDeleteRequestWithBody generates requests for ProjectSecretDelete with any type of body +func NewProjectSecretDeleteRequestWithBody(server string, secretID string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "secretID", runtime.ParamLocationPath, secretID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/projectSecrets/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewProjectActivateRequest calls the generic ProjectActivate builder with application/json body +func NewProjectActivateRequest(server string, body ProjectActivateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewProjectActivateRequestWithBody(server, "application/json", bodyReader) +} + +// NewProjectActivateRequestWithBody generates requests for ProjectActivate with any type of body +func NewProjectActivateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/projects/activate") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewRequestLogsListRequest generates requests for RequestLogsList +func NewRequestLogsListRequest(server string, params *RequestLogsListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/requestLogs") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewRequestLogGetRequest generates requests for RequestLogGet +func NewRequestLogGetRequest(server string, requestID RequestID, params *RequestLogGetParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "requestID", runtime.ParamLocationPath, requestID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/requestLogs/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewSessionConfigGetRequest generates requests for SessionConfigGet +func NewSessionConfigGetRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/sessionConfig") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewSessionConfigUpdateRequest calls the generic SessionConfigUpdate builder with application/json body +func NewSessionConfigUpdateRequest(server string, body SessionConfigUpdateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSessionConfigUpdateRequestWithBody(server, "application/json", bodyReader) +} + +// NewSessionConfigUpdateRequestWithBody generates requests for SessionConfigUpdate with any type of body +func NewSessionConfigUpdateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/sessionConfig") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewSessionTokenCreateRequest calls the generic SessionTokenCreate builder with application/json body +func NewSessionTokenCreateRequest(server string, body SessionTokenCreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSessionTokenCreateRequestWithBody(server, "application/json", bodyReader) +} + +// NewSessionTokenCreateRequestWithBody generates requests for SessionTokenCreate with any type of body +func NewSessionTokenCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/sessions") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewSessionTokenVerifyRequest calls the generic SessionTokenVerify builder with application/json body +func NewSessionTokenVerifyRequest(server string, body SessionTokenVerifyJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSessionTokenVerifyRequestWithBody(server, "application/json", bodyReader) +} + +// NewSessionTokenVerifyRequestWithBody generates requests for SessionTokenVerify with any type of body +func NewSessionTokenVerifyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/sessions/verify") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewSmsCodeSendRequest calls the generic SmsCodeSend builder with application/json body +func NewSmsCodeSendRequest(server string, body SmsCodeSendJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSmsCodeSendRequestWithBody(server, "application/json", bodyReader) +} + +// NewSmsCodeSendRequestWithBody generates requests for SmsCodeSend with any type of body +func NewSmsCodeSendRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/smsCodes") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewSmsCodeValidateRequest calls the generic SmsCodeValidate builder with application/json body +func NewSmsCodeValidateRequest(server string, smsCodeID SmsCodeID, body SmsCodeValidateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSmsCodeValidateRequestWithBody(server, smsCodeID, "application/json", bodyReader) +} + +// NewSmsCodeValidateRequestWithBody generates requests for SmsCodeValidate with any type of body +func NewSmsCodeValidateRequestWithBody(server string, smsCodeID SmsCodeID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "smsCodeID", runtime.ParamLocationPath, smsCodeID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/smsCodes/%s/validate", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewSmsTemplateCreateRequest calls the generic SmsTemplateCreate builder with application/json body +func NewSmsTemplateCreateRequest(server string, body SmsTemplateCreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSmsTemplateCreateRequestWithBody(server, "application/json", bodyReader) +} + +// NewSmsTemplateCreateRequestWithBody generates requests for SmsTemplateCreate with any type of body +func NewSmsTemplateCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/smsTemplates") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewSmsTemplateDeleteRequest calls the generic SmsTemplateDelete builder with application/json body +func NewSmsTemplateDeleteRequest(server string, smsTemplateID SmsTemplateID, body SmsTemplateDeleteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSmsTemplateDeleteRequestWithBody(server, smsTemplateID, "application/json", bodyReader) +} + +// NewSmsTemplateDeleteRequestWithBody generates requests for SmsTemplateDelete with any type of body +func NewSmsTemplateDeleteRequestWithBody(server string, smsTemplateID SmsTemplateID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "smsTemplateID", runtime.ParamLocationPath, smsTemplateID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/smsTemplates/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewTrackingAllRequestRequest generates requests for TrackingAllRequest +func NewTrackingAllRequestRequest(server string, params *TrackingAllRequestParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/tracking") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewTrackingBackupStateGetRequest generates requests for TrackingBackupStateGet +func NewTrackingBackupStateGetRequest(server string, params *TrackingBackupStateGetParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/tracking/backupState") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewTrackingBrowserStatsListRequest generates requests for TrackingBrowserStatsList +func NewTrackingBrowserStatsListRequest(server string, params *TrackingBrowserStatsListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/tracking/browser/stats") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "granularity", runtime.ParamLocationQuery, params.Granularity); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewTrackingBrowserDetailedStatsListRequest generates requests for TrackingBrowserDetailedStatsList +func NewTrackingBrowserDetailedStatsListRequest(server string, params *TrackingBrowserDetailedStatsListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/tracking/browser/stats/detailed") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "granularity", runtime.ParamLocationQuery, params.Granularity); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewTrackingEnumsGetRequest generates requests for TrackingEnumsGet +func NewTrackingEnumsGetRequest(server string, params *TrackingEnumsGetParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/tracking/enums") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewTrackingOSStatsListRequest generates requests for TrackingOSStatsList +func NewTrackingOSStatsListRequest(server string, params *TrackingOSStatsListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/tracking/os/stats") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "granularity", runtime.ParamLocationQuery, params.Granularity); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewTrackingOSDetailedStatsListRequest generates requests for TrackingOSDetailedStatsList +func NewTrackingOSDetailedStatsListRequest(server string, params *TrackingOSDetailedStatsListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/tracking/os/stats/detailed") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "granularity", runtime.ParamLocationQuery, params.Granularity); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewTrackingStatsListRequest generates requests for TrackingStatsList +func NewTrackingStatsListRequest(server string, params *TrackingStatsListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/tracking/stats") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "granularity", runtime.ParamLocationQuery, params.Granularity); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewTrackingDetailedStatsListRequest generates requests for TrackingDetailedStatsList +func NewTrackingDetailedStatsListRequest(server string, params *TrackingDetailedStatsListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/tracking/stats/detailed") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "granularity", runtime.ParamLocationQuery, params.Granularity); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUserAuthLogListRequest generates requests for UserAuthLogList +func NewUserAuthLogListRequest(server string, params *UserAuthLogListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/userauthlogs") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUserListRequest generates requests for UserList +func NewUserListRequest(server string, params *UserListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUserCreateRequest calls the generic UserCreate builder with application/json body +func NewUserCreateRequest(server string, body UserCreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUserCreateRequestWithBody(server, "application/json", bodyReader) +} + +// NewUserCreateRequestWithBody generates requests for UserCreate with any type of body +func NewUserCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewUserStatsListRequest generates requests for UserStatsList +func NewUserStatsListRequest(server string, params *UserStatsListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users/stats") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "granularity", runtime.ParamLocationQuery, params.Granularity); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUserDeleteRequest calls the generic UserDelete builder with application/json body +func NewUserDeleteRequest(server string, userID UserID, body UserDeleteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUserDeleteRequestWithBody(server, userID, "application/json", bodyReader) +} + +// NewUserDeleteRequestWithBody generates requests for UserDelete with any type of body +func NewUserDeleteRequestWithBody(server string, userID UserID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewUserGetRequest generates requests for UserGet +func NewUserGetRequest(server string, userID UserID, params *UserGetParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUserUpdateRequest calls the generic UserUpdate builder with application/json body +func NewUserUpdateRequest(server string, userID UserID, body UserUpdateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUserUpdateRequestWithBody(server, userID, "application/json", bodyReader) +} + +// NewUserUpdateRequestWithBody generates requests for UserUpdate with any type of body +func NewUserUpdateRequestWithBody(server string, userID UserID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewWebAuthnCredentialDeleteRequest calls the generic WebAuthnCredentialDelete builder with application/json body +func NewWebAuthnCredentialDeleteRequest(server string, userID UserID, credentialID string, body WebAuthnCredentialDeleteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWebAuthnCredentialDeleteRequestWithBody(server, userID, credentialID, "application/json", bodyReader) +} + +// NewWebAuthnCredentialDeleteRequestWithBody generates requests for WebAuthnCredentialDelete with any type of body +func NewWebAuthnCredentialDeleteRequestWithBody(server string, userID UserID, credentialID string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "credentialID", runtime.ParamLocationPath, credentialID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users/%s/credentials/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewUserCustomLoginIdentifierCreateRequest calls the generic UserCustomLoginIdentifierCreate builder with application/json body +func NewUserCustomLoginIdentifierCreateRequest(server string, userID UserID, body UserCustomLoginIdentifierCreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUserCustomLoginIdentifierCreateRequestWithBody(server, userID, "application/json", bodyReader) +} + +// NewUserCustomLoginIdentifierCreateRequestWithBody generates requests for UserCustomLoginIdentifierCreate with any type of body +func NewUserCustomLoginIdentifierCreateRequestWithBody(server string, userID UserID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users/%s/customLoginIdentifiers", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewUserCustomLoginIdentifierDeleteRequest calls the generic UserCustomLoginIdentifierDelete builder with application/json body +func NewUserCustomLoginIdentifierDeleteRequest(server string, userID UserID, customLoginIdentifierID CustomLoginIdentifierID, body UserCustomLoginIdentifierDeleteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUserCustomLoginIdentifierDeleteRequestWithBody(server, userID, customLoginIdentifierID, "application/json", bodyReader) +} + +// NewUserCustomLoginIdentifierDeleteRequestWithBody generates requests for UserCustomLoginIdentifierDelete with any type of body +func NewUserCustomLoginIdentifierDeleteRequestWithBody(server string, userID UserID, customLoginIdentifierID CustomLoginIdentifierID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "customLoginIdentifierID", runtime.ParamLocationPath, customLoginIdentifierID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users/%s/customLoginIdentifiers/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewUserCustomLoginIdentifierGetRequest generates requests for UserCustomLoginIdentifierGet +func NewUserCustomLoginIdentifierGetRequest(server string, userID UserID, customLoginIdentifierID CustomLoginIdentifierID, params *UserCustomLoginIdentifierGetParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "customLoginIdentifierID", runtime.ParamLocationPath, customLoginIdentifierID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users/%s/customLoginIdentifiers/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUserDeviceListRequest generates requests for UserDeviceList +func NewUserDeviceListRequest(server string, userID UserID, params *UserDeviceListParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users/%s/devices", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUserEmailCreateRequest calls the generic UserEmailCreate builder with application/json body +func NewUserEmailCreateRequest(server string, userID UserID, body UserEmailCreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUserEmailCreateRequestWithBody(server, userID, "application/json", bodyReader) +} + +// NewUserEmailCreateRequestWithBody generates requests for UserEmailCreate with any type of body +func NewUserEmailCreateRequestWithBody(server string, userID UserID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users/%s/emails", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewUserEmailDeleteRequest calls the generic UserEmailDelete builder with application/json body +func NewUserEmailDeleteRequest(server string, userID UserID, emailID EmailID, body UserEmailDeleteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUserEmailDeleteRequestWithBody(server, userID, emailID, "application/json", bodyReader) +} + +// NewUserEmailDeleteRequestWithBody generates requests for UserEmailDelete with any type of body +func NewUserEmailDeleteRequestWithBody(server string, userID UserID, emailID EmailID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "emailID", runtime.ParamLocationPath, emailID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users/%s/emails/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewUserEmailGetRequest generates requests for UserEmailGet +func NewUserEmailGetRequest(server string, userID UserID, emailID EmailID, params *UserEmailGetParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "emailID", runtime.ParamLocationPath, emailID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users/%s/emails/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUserPhoneNumberCreateRequest calls the generic UserPhoneNumberCreate builder with application/json body +func NewUserPhoneNumberCreateRequest(server string, userID UserID, body UserPhoneNumberCreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUserPhoneNumberCreateRequestWithBody(server, userID, "application/json", bodyReader) +} + +// NewUserPhoneNumberCreateRequestWithBody generates requests for UserPhoneNumberCreate with any type of body +func NewUserPhoneNumberCreateRequestWithBody(server string, userID UserID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users/%s/phoneNumbers", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewUserPhoneNumberDeleteRequest calls the generic UserPhoneNumberDelete builder with application/json body +func NewUserPhoneNumberDeleteRequest(server string, userID UserID, phoneNumberID PhoneNumberID, body UserPhoneNumberDeleteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUserPhoneNumberDeleteRequestWithBody(server, userID, phoneNumberID, "application/json", bodyReader) +} + +// NewUserPhoneNumberDeleteRequestWithBody generates requests for UserPhoneNumberDelete with any type of body +func NewUserPhoneNumberDeleteRequestWithBody(server string, userID UserID, phoneNumberID PhoneNumberID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "phoneNumberID", runtime.ParamLocationPath, phoneNumberID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users/%s/phoneNumbers/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewUserPhoneNumberGetRequest generates requests for UserPhoneNumberGet +func NewUserPhoneNumberGetRequest(server string, userID UserID, phoneNumberID PhoneNumberID, params *UserPhoneNumberGetParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "phoneNumberID", runtime.ParamLocationPath, phoneNumberID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/users/%s/phoneNumbers/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewValidateEmailRequest calls the generic ValidateEmail builder with application/json body +func NewValidateEmailRequest(server string, body ValidateEmailJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewValidateEmailRequestWithBody(server, "application/json", bodyReader) +} + +// NewValidateEmailRequestWithBody generates requests for ValidateEmail with any type of body +func NewValidateEmailRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/validate/email") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewValidatePhoneNumberRequest calls the generic ValidatePhoneNumber builder with application/json body +func NewValidatePhoneNumberRequest(server string, body ValidatePhoneNumberJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewValidatePhoneNumberRequestWithBody(server, "application/json", bodyReader) +} + +// NewValidatePhoneNumberRequestWithBody generates requests for ValidatePhoneNumber with any type of body +func NewValidatePhoneNumberRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/validate/phoneNumber") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewWebAuthnAssociateStartRequest calls the generic WebAuthnAssociateStart builder with application/json body +func NewWebAuthnAssociateStartRequest(server string, body WebAuthnAssociateStartJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWebAuthnAssociateStartRequestWithBody(server, "application/json", bodyReader) +} + +// NewWebAuthnAssociateStartRequestWithBody generates requests for WebAuthnAssociateStart with any type of body +func NewWebAuthnAssociateStartRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webauthn/associate/start") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewWebAuthnAuthenticateFinishRequest calls the generic WebAuthnAuthenticateFinish builder with application/json body +func NewWebAuthnAuthenticateFinishRequest(server string, body WebAuthnAuthenticateFinishJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWebAuthnAuthenticateFinishRequestWithBody(server, "application/json", bodyReader) +} + +// NewWebAuthnAuthenticateFinishRequestWithBody generates requests for WebAuthnAuthenticateFinish with any type of body +func NewWebAuthnAuthenticateFinishRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webauthn/authenticate/finish") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewWebAuthnAuthenticateStartRequest calls the generic WebAuthnAuthenticateStart builder with application/json body +func NewWebAuthnAuthenticateStartRequest(server string, body WebAuthnAuthenticateStartJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWebAuthnAuthenticateStartRequestWithBody(server, "application/json", bodyReader) +} + +// NewWebAuthnAuthenticateStartRequestWithBody generates requests for WebAuthnAuthenticateStart with any type of body +func NewWebAuthnAuthenticateStartRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webauthn/authenticate/start") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewWebAuthnAuthenticatorUpdateRequest calls the generic WebAuthnAuthenticatorUpdate builder with application/json body +func NewWebAuthnAuthenticatorUpdateRequest(server string, authenticatorID string, body WebAuthnAuthenticatorUpdateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWebAuthnAuthenticatorUpdateRequestWithBody(server, authenticatorID, "application/json", bodyReader) +} + +// NewWebAuthnAuthenticatorUpdateRequestWithBody generates requests for WebAuthnAuthenticatorUpdate with any type of body +func NewWebAuthnAuthenticatorUpdateRequestWithBody(server string, authenticatorID string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "authenticatorID", runtime.ParamLocationPath, authenticatorID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webauthn/authenticator/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewWebAuthnCredentialListRequest generates requests for WebAuthnCredentialList +func NewWebAuthnCredentialListRequest(server string, params *WebAuthnCredentialListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webauthn/credential") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewWebAuthnCredentialExistsRequest calls the generic WebAuthnCredentialExists builder with application/json body +func NewWebAuthnCredentialExistsRequest(server string, body WebAuthnCredentialExistsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWebAuthnCredentialExistsRequestWithBody(server, "application/json", bodyReader) +} + +// NewWebAuthnCredentialExistsRequestWithBody generates requests for WebAuthnCredentialExists with any type of body +func NewWebAuthnCredentialExistsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webauthn/credential/exists") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewWebAuthnCredentialUpdateRequest calls the generic WebAuthnCredentialUpdate builder with application/json body +func NewWebAuthnCredentialUpdateRequest(server string, credentialID string, body WebAuthnCredentialUpdateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWebAuthnCredentialUpdateRequestWithBody(server, credentialID, "application/json", bodyReader) +} + +// NewWebAuthnCredentialUpdateRequestWithBody generates requests for WebAuthnCredentialUpdate with any type of body +func NewWebAuthnCredentialUpdateRequestWithBody(server string, credentialID string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "credentialID", runtime.ParamLocationPath, credentialID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webauthn/credential/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewWebAuthnMediationStartRequest calls the generic WebAuthnMediationStart builder with application/json body +func NewWebAuthnMediationStartRequest(server string, body WebAuthnMediationStartJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWebAuthnMediationStartRequestWithBody(server, "application/json", bodyReader) +} + +// NewWebAuthnMediationStartRequestWithBody generates requests for WebAuthnMediationStart with any type of body +func NewWebAuthnMediationStartRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webauthn/mediation/start") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewWebAuthnRegisterFinishRequest calls the generic WebAuthnRegisterFinish builder with application/json body +func NewWebAuthnRegisterFinishRequest(server string, body WebAuthnRegisterFinishJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWebAuthnRegisterFinishRequestWithBody(server, "application/json", bodyReader) +} + +// NewWebAuthnRegisterFinishRequestWithBody generates requests for WebAuthnRegisterFinish with any type of body +func NewWebAuthnRegisterFinishRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webauthn/register/finish") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewWebAuthnRegisterStartRequest calls the generic WebAuthnRegisterStart builder with application/json body +func NewWebAuthnRegisterStartRequest(server string, body WebAuthnRegisterStartJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWebAuthnRegisterStartRequestWithBody(server, "application/json", bodyReader) +} + +// NewWebAuthnRegisterStartRequestWithBody generates requests for WebAuthnRegisterStart with any type of body +func NewWebAuthnRegisterStartRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webauthn/register/start") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewWebAuthnSettingListRequest generates requests for WebAuthnSettingList +func NewWebAuthnSettingListRequest(server string, params *WebAuthnSettingListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webauthn/settings") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewWebAuthnSettingCreateRequest calls the generic WebAuthnSettingCreate builder with application/json body +func NewWebAuthnSettingCreateRequest(server string, body WebAuthnSettingCreateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWebAuthnSettingCreateRequestWithBody(server, "application/json", bodyReader) +} + +// NewWebAuthnSettingCreateRequestWithBody generates requests for WebAuthnSettingCreate with any type of body +func NewWebAuthnSettingCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webauthn/settings") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewWebAuthnSettingDeleteRequest calls the generic WebAuthnSettingDelete builder with application/json body +func NewWebAuthnSettingDeleteRequest(server string, settingID string, body WebAuthnSettingDeleteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWebAuthnSettingDeleteRequestWithBody(server, settingID, "application/json", bodyReader) +} + +// NewWebAuthnSettingDeleteRequestWithBody generates requests for WebAuthnSettingDelete with any type of body +func NewWebAuthnSettingDeleteRequestWithBody(server string, settingID string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "settingID", runtime.ParamLocationPath, settingID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webauthn/settings/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewWebAuthnSettingGetRequest generates requests for WebAuthnSettingGet +func NewWebAuthnSettingGetRequest(server string, settingID string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "settingID", runtime.ParamLocationPath, settingID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webauthn/settings/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewWebAuthnSettingPutRequest calls the generic WebAuthnSettingPut builder with application/json body +func NewWebAuthnSettingPutRequest(server string, settingID string, body WebAuthnSettingPutJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewWebAuthnSettingPutRequestWithBody(server, settingID, "application/json", bodyReader) +} + +// NewWebAuthnSettingPutRequestWithBody generates requests for WebAuthnSettingPut with any type of body +func NewWebAuthnSettingPutRequestWithBody(server string, settingID string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "settingID", runtime.ParamLocationPath, settingID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webauthn/settings/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewWebhookLogsListRequest generates requests for WebhookLogsList +func NewWebhookLogsListRequest(server string, params *WebhookLogsListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/webhookLogs") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.RemoteAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "remoteAddress", runtime.ParamLocationQuery, *params.RemoteAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.UserAgent != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "userAgent", runtime.ParamLocationQuery, *params.UserAgent); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Sort != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort", runtime.ParamLocationQuery, *params.Sort); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Filter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter[]", runtime.ParamLocationQuery, *params.Filter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // AndroidAppConfigGetWithResponse request + AndroidAppConfigGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AndroidAppConfigGetResponse, error) + + // AndroidAppConfigCreateWithBodyWithResponse request with any body + AndroidAppConfigCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AndroidAppConfigCreateResponse, error) + + AndroidAppConfigCreateWithResponse(ctx context.Context, body AndroidAppConfigCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*AndroidAppConfigCreateResponse, error) + + // AndroidAppConfigDeleteWithBodyWithResponse request with any body + AndroidAppConfigDeleteWithBodyWithResponse(ctx context.Context, androidAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AndroidAppConfigDeleteResponse, error) + + AndroidAppConfigDeleteWithResponse(ctx context.Context, androidAppConfigID string, body AndroidAppConfigDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*AndroidAppConfigDeleteResponse, error) + + // AndroidAppConfigPutWithBodyWithResponse request with any body + AndroidAppConfigPutWithBodyWithResponse(ctx context.Context, androidAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AndroidAppConfigPutResponse, error) + + AndroidAppConfigPutWithResponse(ctx context.Context, androidAppConfigID string, body AndroidAppConfigPutJSONRequestBody, reqEditors ...RequestEditorFn) (*AndroidAppConfigPutResponse, error) + + // AssociationTokenCreateWithBodyWithResponse request with any body + AssociationTokenCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AssociationTokenCreateResponse, error) + + AssociationTokenCreateWithResponse(ctx context.Context, body AssociationTokenCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*AssociationTokenCreateResponse, error) + + // AuthMethodsListWithBodyWithResponse request with any body + AuthMethodsListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthMethodsListResponse, error) + + AuthMethodsListWithResponse(ctx context.Context, body AuthMethodsListJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthMethodsListResponse, error) + + // AuthTokenValidateWithBodyWithResponse request with any body + AuthTokenValidateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthTokenValidateResponse, error) + + AuthTokenValidateWithResponse(ctx context.Context, body AuthTokenValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthTokenValidateResponse, error) + + // EmailCodeSendWithBodyWithResponse request with any body + EmailCodeSendWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailCodeSendResponse, error) + + EmailCodeSendWithResponse(ctx context.Context, body EmailCodeSendJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailCodeSendResponse, error) + + // EmailCodeGetWithResponse request + EmailCodeGetWithResponse(ctx context.Context, emailCodeID EmailCodeID, reqEditors ...RequestEditorFn) (*EmailCodeGetResponse, error) + + // EmailCodeValidateWithBodyWithResponse request with any body + EmailCodeValidateWithBodyWithResponse(ctx context.Context, emailCodeID EmailCodeID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailCodeValidateResponse, error) + + EmailCodeValidateWithResponse(ctx context.Context, emailCodeID EmailCodeID, body EmailCodeValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailCodeValidateResponse, error) + + // EmailLinkSendWithBodyWithResponse request with any body + EmailLinkSendWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailLinkSendResponse, error) + + EmailLinkSendWithResponse(ctx context.Context, body EmailLinkSendJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailLinkSendResponse, error) + + // EmailLinkDeleteWithBodyWithResponse request with any body + EmailLinkDeleteWithBodyWithResponse(ctx context.Context, emailLinkID EmailLinkID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailLinkDeleteResponse, error) + + EmailLinkDeleteWithResponse(ctx context.Context, emailLinkID EmailLinkID, body EmailLinkDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailLinkDeleteResponse, error) + + // EmailLinkGetWithResponse request + EmailLinkGetWithResponse(ctx context.Context, emailLinkID EmailLinkID, reqEditors ...RequestEditorFn) (*EmailLinkGetResponse, error) + + // EmailLinkValidateWithBodyWithResponse request with any body + EmailLinkValidateWithBodyWithResponse(ctx context.Context, emailLinkID EmailLinkID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailLinkValidateResponse, error) + + EmailLinkValidateWithResponse(ctx context.Context, emailLinkID EmailLinkID, body EmailLinkValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailLinkValidateResponse, error) + + // EmailTemplateCreateWithBodyWithResponse request with any body + EmailTemplateCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTemplateCreateResponse, error) + + EmailTemplateCreateWithResponse(ctx context.Context, body EmailTemplateCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTemplateCreateResponse, error) + + // EmailTemplateDeleteWithBodyWithResponse request with any body + EmailTemplateDeleteWithBodyWithResponse(ctx context.Context, emailTemplateID EmailTemplateID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTemplateDeleteResponse, error) + + EmailTemplateDeleteWithResponse(ctx context.Context, emailTemplateID EmailTemplateID, body EmailTemplateDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTemplateDeleteResponse, error) + + // ExampleGetWithResponse request + ExampleGetWithResponse(ctx context.Context, fileName ExampleGetParamsFileName, reqEditors ...RequestEditorFn) (*ExampleGetResponse, error) + + // IOSAppConfigGetWithResponse request + IOSAppConfigGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IOSAppConfigGetResponse, error) + + // IOSAppConfigCreateWithBodyWithResponse request with any body + IOSAppConfigCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IOSAppConfigCreateResponse, error) + + IOSAppConfigCreateWithResponse(ctx context.Context, body IOSAppConfigCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IOSAppConfigCreateResponse, error) + + // IOSAppConfigDeleteWithBodyWithResponse request with any body + IOSAppConfigDeleteWithBodyWithResponse(ctx context.Context, iosAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IOSAppConfigDeleteResponse, error) + + IOSAppConfigDeleteWithResponse(ctx context.Context, iosAppConfigID string, body IOSAppConfigDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*IOSAppConfigDeleteResponse, error) + + // IOSAppConfigPutWithBodyWithResponse request with any body + IOSAppConfigPutWithBodyWithResponse(ctx context.Context, iosAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IOSAppConfigPutResponse, error) + + IOSAppConfigPutWithResponse(ctx context.Context, iosAppConfigID string, body IOSAppConfigPutJSONRequestBody, reqEditors ...RequestEditorFn) (*IOSAppConfigPutResponse, error) + + // LongSessionListWithResponse request + LongSessionListWithResponse(ctx context.Context, params *LongSessionListParams, reqEditors ...RequestEditorFn) (*LongSessionListResponse, error) + + // LongSessionGetWithResponse request + LongSessionGetWithResponse(ctx context.Context, sessionID externalRef0.SessionID, reqEditors ...RequestEditorFn) (*LongSessionGetResponse, error) + + // LongSessionRevokeWithBodyWithResponse request with any body + LongSessionRevokeWithBodyWithResponse(ctx context.Context, sessionID externalRef0.SessionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LongSessionRevokeResponse, error) + + LongSessionRevokeWithResponse(ctx context.Context, sessionID externalRef0.SessionID, body LongSessionRevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*LongSessionRevokeResponse, error) + + // OriginAllowedWithBodyWithResponse request with any body + OriginAllowedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OriginAllowedResponse, error) + + OriginAllowedWithResponse(ctx context.Context, body OriginAllowedJSONRequestBody, reqEditors ...RequestEditorFn) (*OriginAllowedResponse, error) + + // ProjectConfigGetWithResponse request + ProjectConfigGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ProjectConfigGetResponse, error) + + // ProjectConfigSaveWithBodyWithResponse request with any body + ProjectConfigSaveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectConfigSaveResponse, error) + + ProjectConfigSaveWithResponse(ctx context.Context, body ProjectConfigSaveJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectConfigSaveResponse, error) + + // ProjectConfigWebhookTestWithBodyWithResponse request with any body + ProjectConfigWebhookTestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectConfigWebhookTestResponse, error) + + ProjectConfigWebhookTestWithResponse(ctx context.Context, body ProjectConfigWebhookTestJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectConfigWebhookTestResponse, error) + + // ProjectSecretListWithResponse request + ProjectSecretListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ProjectSecretListResponse, error) + + // ProjectSecretCreateWithBodyWithResponse request with any body + ProjectSecretCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectSecretCreateResponse, error) + + ProjectSecretCreateWithResponse(ctx context.Context, body ProjectSecretCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectSecretCreateResponse, error) + + // ProjectSecretDeleteWithBodyWithResponse request with any body + ProjectSecretDeleteWithBodyWithResponse(ctx context.Context, secretID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectSecretDeleteResponse, error) + + ProjectSecretDeleteWithResponse(ctx context.Context, secretID string, body ProjectSecretDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectSecretDeleteResponse, error) + + // ProjectActivateWithBodyWithResponse request with any body + ProjectActivateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectActivateResponse, error) + + ProjectActivateWithResponse(ctx context.Context, body ProjectActivateJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectActivateResponse, error) + + // RequestLogsListWithResponse request + RequestLogsListWithResponse(ctx context.Context, params *RequestLogsListParams, reqEditors ...RequestEditorFn) (*RequestLogsListResponse, error) + + // RequestLogGetWithResponse request + RequestLogGetWithResponse(ctx context.Context, requestID RequestID, params *RequestLogGetParams, reqEditors ...RequestEditorFn) (*RequestLogGetResponse, error) + + // SessionConfigGetWithResponse request + SessionConfigGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*SessionConfigGetResponse, error) + + // SessionConfigUpdateWithBodyWithResponse request with any body + SessionConfigUpdateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionConfigUpdateResponse, error) + + SessionConfigUpdateWithResponse(ctx context.Context, body SessionConfigUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionConfigUpdateResponse, error) + + // SessionTokenCreateWithBodyWithResponse request with any body + SessionTokenCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionTokenCreateResponse, error) + + SessionTokenCreateWithResponse(ctx context.Context, body SessionTokenCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionTokenCreateResponse, error) + + // SessionTokenVerifyWithBodyWithResponse request with any body + SessionTokenVerifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionTokenVerifyResponse, error) + + SessionTokenVerifyWithResponse(ctx context.Context, body SessionTokenVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionTokenVerifyResponse, error) + + // SmsCodeSendWithBodyWithResponse request with any body + SmsCodeSendWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SmsCodeSendResponse, error) + + SmsCodeSendWithResponse(ctx context.Context, body SmsCodeSendJSONRequestBody, reqEditors ...RequestEditorFn) (*SmsCodeSendResponse, error) + + // SmsCodeValidateWithBodyWithResponse request with any body + SmsCodeValidateWithBodyWithResponse(ctx context.Context, smsCodeID SmsCodeID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SmsCodeValidateResponse, error) + + SmsCodeValidateWithResponse(ctx context.Context, smsCodeID SmsCodeID, body SmsCodeValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*SmsCodeValidateResponse, error) + + // SmsTemplateCreateWithBodyWithResponse request with any body + SmsTemplateCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SmsTemplateCreateResponse, error) + + SmsTemplateCreateWithResponse(ctx context.Context, body SmsTemplateCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SmsTemplateCreateResponse, error) + + // SmsTemplateDeleteWithBodyWithResponse request with any body + SmsTemplateDeleteWithBodyWithResponse(ctx context.Context, smsTemplateID SmsTemplateID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SmsTemplateDeleteResponse, error) + + SmsTemplateDeleteWithResponse(ctx context.Context, smsTemplateID SmsTemplateID, body SmsTemplateDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*SmsTemplateDeleteResponse, error) + + // TrackingAllRequestWithResponse request + TrackingAllRequestWithResponse(ctx context.Context, params *TrackingAllRequestParams, reqEditors ...RequestEditorFn) (*TrackingAllRequestResponse, error) + + // TrackingBackupStateGetWithResponse request + TrackingBackupStateGetWithResponse(ctx context.Context, params *TrackingBackupStateGetParams, reqEditors ...RequestEditorFn) (*TrackingBackupStateGetResponse, error) + + // TrackingBrowserStatsListWithResponse request + TrackingBrowserStatsListWithResponse(ctx context.Context, params *TrackingBrowserStatsListParams, reqEditors ...RequestEditorFn) (*TrackingBrowserStatsListResponse, error) + + // TrackingBrowserDetailedStatsListWithResponse request + TrackingBrowserDetailedStatsListWithResponse(ctx context.Context, params *TrackingBrowserDetailedStatsListParams, reqEditors ...RequestEditorFn) (*TrackingBrowserDetailedStatsListResponse, error) + + // TrackingEnumsGetWithResponse request + TrackingEnumsGetWithResponse(ctx context.Context, params *TrackingEnumsGetParams, reqEditors ...RequestEditorFn) (*TrackingEnumsGetResponse, error) + + // TrackingOSStatsListWithResponse request + TrackingOSStatsListWithResponse(ctx context.Context, params *TrackingOSStatsListParams, reqEditors ...RequestEditorFn) (*TrackingOSStatsListResponse, error) + + // TrackingOSDetailedStatsListWithResponse request + TrackingOSDetailedStatsListWithResponse(ctx context.Context, params *TrackingOSDetailedStatsListParams, reqEditors ...RequestEditorFn) (*TrackingOSDetailedStatsListResponse, error) + + // TrackingStatsListWithResponse request + TrackingStatsListWithResponse(ctx context.Context, params *TrackingStatsListParams, reqEditors ...RequestEditorFn) (*TrackingStatsListResponse, error) + + // TrackingDetailedStatsListWithResponse request + TrackingDetailedStatsListWithResponse(ctx context.Context, params *TrackingDetailedStatsListParams, reqEditors ...RequestEditorFn) (*TrackingDetailedStatsListResponse, error) + + // UserAuthLogListWithResponse request + UserAuthLogListWithResponse(ctx context.Context, params *UserAuthLogListParams, reqEditors ...RequestEditorFn) (*UserAuthLogListResponse, error) + + // UserListWithResponse request + UserListWithResponse(ctx context.Context, params *UserListParams, reqEditors ...RequestEditorFn) (*UserListResponse, error) + + // UserCreateWithBodyWithResponse request with any body + UserCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserCreateResponse, error) + + UserCreateWithResponse(ctx context.Context, body UserCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*UserCreateResponse, error) + + // UserStatsListWithResponse request + UserStatsListWithResponse(ctx context.Context, params *UserStatsListParams, reqEditors ...RequestEditorFn) (*UserStatsListResponse, error) + + // UserDeleteWithBodyWithResponse request with any body + UserDeleteWithBodyWithResponse(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserDeleteResponse, error) + + UserDeleteWithResponse(ctx context.Context, userID UserID, body UserDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*UserDeleteResponse, error) + + // UserGetWithResponse request + UserGetWithResponse(ctx context.Context, userID UserID, params *UserGetParams, reqEditors ...RequestEditorFn) (*UserGetResponse, error) + + // UserUpdateWithBodyWithResponse request with any body + UserUpdateWithBodyWithResponse(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserUpdateResponse, error) + + UserUpdateWithResponse(ctx context.Context, userID UserID, body UserUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*UserUpdateResponse, error) + + // WebAuthnCredentialDeleteWithBodyWithResponse request with any body + WebAuthnCredentialDeleteWithBodyWithResponse(ctx context.Context, userID UserID, credentialID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnCredentialDeleteResponse, error) + + WebAuthnCredentialDeleteWithResponse(ctx context.Context, userID UserID, credentialID string, body WebAuthnCredentialDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnCredentialDeleteResponse, error) + + // UserCustomLoginIdentifierCreateWithBodyWithResponse request with any body + UserCustomLoginIdentifierCreateWithBodyWithResponse(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserCustomLoginIdentifierCreateResponse, error) + + UserCustomLoginIdentifierCreateWithResponse(ctx context.Context, userID UserID, body UserCustomLoginIdentifierCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*UserCustomLoginIdentifierCreateResponse, error) + + // UserCustomLoginIdentifierDeleteWithBodyWithResponse request with any body + UserCustomLoginIdentifierDeleteWithBodyWithResponse(ctx context.Context, userID UserID, customLoginIdentifierID CustomLoginIdentifierID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserCustomLoginIdentifierDeleteResponse, error) + + UserCustomLoginIdentifierDeleteWithResponse(ctx context.Context, userID UserID, customLoginIdentifierID CustomLoginIdentifierID, body UserCustomLoginIdentifierDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*UserCustomLoginIdentifierDeleteResponse, error) + + // UserCustomLoginIdentifierGetWithResponse request + UserCustomLoginIdentifierGetWithResponse(ctx context.Context, userID UserID, customLoginIdentifierID CustomLoginIdentifierID, params *UserCustomLoginIdentifierGetParams, reqEditors ...RequestEditorFn) (*UserCustomLoginIdentifierGetResponse, error) + + // UserDeviceListWithResponse request + UserDeviceListWithResponse(ctx context.Context, userID UserID, params *UserDeviceListParams, reqEditors ...RequestEditorFn) (*UserDeviceListResponse, error) + + // UserEmailCreateWithBodyWithResponse request with any body + UserEmailCreateWithBodyWithResponse(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserEmailCreateResponse, error) + + UserEmailCreateWithResponse(ctx context.Context, userID UserID, body UserEmailCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*UserEmailCreateResponse, error) + + // UserEmailDeleteWithBodyWithResponse request with any body + UserEmailDeleteWithBodyWithResponse(ctx context.Context, userID UserID, emailID EmailID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserEmailDeleteResponse, error) + + UserEmailDeleteWithResponse(ctx context.Context, userID UserID, emailID EmailID, body UserEmailDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*UserEmailDeleteResponse, error) + + // UserEmailGetWithResponse request + UserEmailGetWithResponse(ctx context.Context, userID UserID, emailID EmailID, params *UserEmailGetParams, reqEditors ...RequestEditorFn) (*UserEmailGetResponse, error) + + // UserPhoneNumberCreateWithBodyWithResponse request with any body + UserPhoneNumberCreateWithBodyWithResponse(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserPhoneNumberCreateResponse, error) + + UserPhoneNumberCreateWithResponse(ctx context.Context, userID UserID, body UserPhoneNumberCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*UserPhoneNumberCreateResponse, error) + + // UserPhoneNumberDeleteWithBodyWithResponse request with any body + UserPhoneNumberDeleteWithBodyWithResponse(ctx context.Context, userID UserID, phoneNumberID PhoneNumberID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserPhoneNumberDeleteResponse, error) + + UserPhoneNumberDeleteWithResponse(ctx context.Context, userID UserID, phoneNumberID PhoneNumberID, body UserPhoneNumberDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*UserPhoneNumberDeleteResponse, error) + + // UserPhoneNumberGetWithResponse request + UserPhoneNumberGetWithResponse(ctx context.Context, userID UserID, phoneNumberID PhoneNumberID, params *UserPhoneNumberGetParams, reqEditors ...RequestEditorFn) (*UserPhoneNumberGetResponse, error) + + // ValidateEmailWithBodyWithResponse request with any body + ValidateEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidateEmailResponse, error) + + ValidateEmailWithResponse(ctx context.Context, body ValidateEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidateEmailResponse, error) + + // ValidatePhoneNumberWithBodyWithResponse request with any body + ValidatePhoneNumberWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidatePhoneNumberResponse, error) + + ValidatePhoneNumberWithResponse(ctx context.Context, body ValidatePhoneNumberJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidatePhoneNumberResponse, error) + + // WebAuthnAssociateStartWithBodyWithResponse request with any body + WebAuthnAssociateStartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnAssociateStartResponse, error) + + WebAuthnAssociateStartWithResponse(ctx context.Context, body WebAuthnAssociateStartJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnAssociateStartResponse, error) + + // WebAuthnAuthenticateFinishWithBodyWithResponse request with any body + WebAuthnAuthenticateFinishWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnAuthenticateFinishResponse, error) + + WebAuthnAuthenticateFinishWithResponse(ctx context.Context, body WebAuthnAuthenticateFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnAuthenticateFinishResponse, error) + + // WebAuthnAuthenticateStartWithBodyWithResponse request with any body + WebAuthnAuthenticateStartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnAuthenticateStartResponse, error) + + WebAuthnAuthenticateStartWithResponse(ctx context.Context, body WebAuthnAuthenticateStartJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnAuthenticateStartResponse, error) + + // WebAuthnAuthenticatorUpdateWithBodyWithResponse request with any body + WebAuthnAuthenticatorUpdateWithBodyWithResponse(ctx context.Context, authenticatorID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnAuthenticatorUpdateResponse, error) + + WebAuthnAuthenticatorUpdateWithResponse(ctx context.Context, authenticatorID string, body WebAuthnAuthenticatorUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnAuthenticatorUpdateResponse, error) + + // WebAuthnCredentialListWithResponse request + WebAuthnCredentialListWithResponse(ctx context.Context, params *WebAuthnCredentialListParams, reqEditors ...RequestEditorFn) (*WebAuthnCredentialListResponse, error) + + // WebAuthnCredentialExistsWithBodyWithResponse request with any body + WebAuthnCredentialExistsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnCredentialExistsResponse, error) + + WebAuthnCredentialExistsWithResponse(ctx context.Context, body WebAuthnCredentialExistsJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnCredentialExistsResponse, error) + + // WebAuthnCredentialUpdateWithBodyWithResponse request with any body + WebAuthnCredentialUpdateWithBodyWithResponse(ctx context.Context, credentialID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnCredentialUpdateResponse, error) + + WebAuthnCredentialUpdateWithResponse(ctx context.Context, credentialID string, body WebAuthnCredentialUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnCredentialUpdateResponse, error) + + // WebAuthnMediationStartWithBodyWithResponse request with any body + WebAuthnMediationStartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnMediationStartResponse, error) + + WebAuthnMediationStartWithResponse(ctx context.Context, body WebAuthnMediationStartJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnMediationStartResponse, error) + + // WebAuthnRegisterFinishWithBodyWithResponse request with any body + WebAuthnRegisterFinishWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnRegisterFinishResponse, error) + + WebAuthnRegisterFinishWithResponse(ctx context.Context, body WebAuthnRegisterFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnRegisterFinishResponse, error) + + // WebAuthnRegisterStartWithBodyWithResponse request with any body + WebAuthnRegisterStartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnRegisterStartResponse, error) + + WebAuthnRegisterStartWithResponse(ctx context.Context, body WebAuthnRegisterStartJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnRegisterStartResponse, error) + + // WebAuthnSettingListWithResponse request + WebAuthnSettingListWithResponse(ctx context.Context, params *WebAuthnSettingListParams, reqEditors ...RequestEditorFn) (*WebAuthnSettingListResponse, error) + + // WebAuthnSettingCreateWithBodyWithResponse request with any body + WebAuthnSettingCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnSettingCreateResponse, error) + + WebAuthnSettingCreateWithResponse(ctx context.Context, body WebAuthnSettingCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnSettingCreateResponse, error) + + // WebAuthnSettingDeleteWithBodyWithResponse request with any body + WebAuthnSettingDeleteWithBodyWithResponse(ctx context.Context, settingID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnSettingDeleteResponse, error) + + WebAuthnSettingDeleteWithResponse(ctx context.Context, settingID string, body WebAuthnSettingDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnSettingDeleteResponse, error) + + // WebAuthnSettingGetWithResponse request + WebAuthnSettingGetWithResponse(ctx context.Context, settingID string, reqEditors ...RequestEditorFn) (*WebAuthnSettingGetResponse, error) + + // WebAuthnSettingPutWithBodyWithResponse request with any body + WebAuthnSettingPutWithBodyWithResponse(ctx context.Context, settingID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnSettingPutResponse, error) + + WebAuthnSettingPutWithResponse(ctx context.Context, settingID string, body WebAuthnSettingPutJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnSettingPutResponse, error) + + // WebhookLogsListWithResponse request + WebhookLogsListWithResponse(ctx context.Context, params *WebhookLogsListParams, reqEditors ...RequestEditorFn) (*WebhookLogsListResponse, error) +} + +type AndroidAppConfigGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AndroidAppConfigListRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r AndroidAppConfigGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AndroidAppConfigGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AndroidAppConfigCreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AndroidAppConfigSaveRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r AndroidAppConfigCreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AndroidAppConfigCreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AndroidAppConfigDeleteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *N200 + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r AndroidAppConfigDeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AndroidAppConfigDeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AndroidAppConfigPutResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AndroidAppConfigUpdateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r AndroidAppConfigPutResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AndroidAppConfigPutResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AssociationTokenCreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AssociationTokenCreateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r AssociationTokenCreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AssociationTokenCreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AuthMethodsListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AuthMethodsListRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r AuthMethodsListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AuthMethodsListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AuthTokenValidateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AuthTokenValidateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r AuthTokenValidateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AuthTokenValidateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type EmailCodeSendResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EmailCodeSendRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r EmailCodeSendResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r EmailCodeSendResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type EmailCodeGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EmailCodeGetRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r EmailCodeGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r EmailCodeGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type EmailCodeValidateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EmailCodeValidateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r EmailCodeValidateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r EmailCodeValidateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type EmailLinkSendResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EmailLinkSendRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r EmailLinkSendResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r EmailLinkSendResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type EmailLinkDeleteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EmailLinkValidateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r EmailLinkDeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r EmailLinkDeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type EmailLinkGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EmailLinkGetRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r EmailLinkGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r EmailLinkGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type EmailLinkValidateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EmailLinkValidateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r EmailLinkValidateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r EmailLinkValidateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type EmailTemplateCreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EmailTemplateCreateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r EmailTemplateCreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r EmailTemplateCreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type EmailTemplateDeleteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *N200 + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r EmailTemplateDeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r EmailTemplateDeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ExampleGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ExampleGetRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r ExampleGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ExampleGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IOSAppConfigGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *IOSAppConfigListRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r IOSAppConfigGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r IOSAppConfigGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IOSAppConfigCreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *IOSAppConfigSaveRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r IOSAppConfigCreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r IOSAppConfigCreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IOSAppConfigDeleteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *N200 + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r IOSAppConfigDeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r IOSAppConfigDeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IOSAppConfigPutResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *IOSAppConfigUpdateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r IOSAppConfigPutResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r IOSAppConfigPutResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type LongSessionListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *LongSessionListRsp +} + +// Status returns HTTPResponse.Status +func (r LongSessionListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LongSessionListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type LongSessionGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *LongSessionGetRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r LongSessionGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LongSessionGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type LongSessionRevokeResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *N200 + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r LongSessionRevokeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LongSessionRevokeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type OriginAllowedResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *OriginAllowedRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r OriginAllowedResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r OriginAllowedResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ProjectConfigGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ProjectConfigGetRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r ProjectConfigGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ProjectConfigGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ProjectConfigSaveResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *externalRef0.GenericRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r ProjectConfigSaveResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ProjectConfigSaveResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ProjectConfigWebhookTestResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ProjectConfigWebhookTestRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r ProjectConfigWebhookTestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ProjectConfigWebhookTestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ProjectSecretListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ProjectSecretListRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r ProjectSecretListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ProjectSecretListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ProjectSecretCreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ProjectSecretCreateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r ProjectSecretCreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ProjectSecretCreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ProjectSecretDeleteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *N200 + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r ProjectSecretDeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ProjectSecretDeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ProjectActivateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *N200 + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r ProjectActivateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ProjectActivateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type RequestLogsListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *RequestLogsListRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r RequestLogsListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r RequestLogsListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type RequestLogGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *RequestLogGetRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r RequestLogGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r RequestLogGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type SessionConfigGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SessionConfigGetRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r SessionConfigGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SessionConfigGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type SessionConfigUpdateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *externalRef0.GenericRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r SessionConfigUpdateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SessionConfigUpdateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type SessionTokenCreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SessionTokenCreateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r SessionTokenCreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SessionTokenCreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type SessionTokenVerifyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SessionTokenVerifyRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r SessionTokenVerifyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SessionTokenVerifyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type SmsCodeSendResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SmsCodeSendRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r SmsCodeSendResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SmsCodeSendResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type SmsCodeValidateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SmsCodeValidateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r SmsCodeValidateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SmsCodeValidateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type SmsTemplateCreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SmsTemplateCreateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r SmsTemplateCreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SmsTemplateCreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type SmsTemplateDeleteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *N200 + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r SmsTemplateDeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SmsTemplateDeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type TrackingAllRequestResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TrackingRawListRsp +} + +// Status returns HTTPResponse.Status +func (r TrackingAllRequestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r TrackingAllRequestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type TrackingBackupStateGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TrackingBackupStateGetRsp +} + +// Status returns HTTPResponse.Status +func (r TrackingBackupStateGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r TrackingBackupStateGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type TrackingBrowserStatsListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TrackingBrowserStatsListRsp +} + +// Status returns HTTPResponse.Status +func (r TrackingBrowserStatsListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r TrackingBrowserStatsListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type TrackingBrowserDetailedStatsListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TrackingBrowserDetailedStatsListRsp +} + +// Status returns HTTPResponse.Status +func (r TrackingBrowserDetailedStatsListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r TrackingBrowserDetailedStatsListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type TrackingEnumsGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TrackingEnumsGetRsp +} + +// Status returns HTTPResponse.Status +func (r TrackingEnumsGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r TrackingEnumsGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type TrackingOSStatsListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TrackingOSStatsListRsp +} + +// Status returns HTTPResponse.Status +func (r TrackingOSStatsListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r TrackingOSStatsListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type TrackingOSDetailedStatsListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TrackingOSDetailedStatsListRsp +} + +// Status returns HTTPResponse.Status +func (r TrackingOSDetailedStatsListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r TrackingOSDetailedStatsListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type TrackingStatsListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TrackingStatsListRsp +} + +// Status returns HTTPResponse.Status +func (r TrackingStatsListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r TrackingStatsListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type TrackingDetailedStatsListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TrackingDetailedStatsListRsp +} + +// Status returns HTTPResponse.Status +func (r TrackingDetailedStatsListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r TrackingDetailedStatsListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserAuthLogListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserAuthLogListRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UserAuthLogListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserAuthLogListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserListRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UserListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserCreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserCreateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UserCreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserCreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserStatsListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserStatsListRsp +} + +// Status returns HTTPResponse.Status +func (r UserStatsListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserStatsListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserDeleteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *N200 + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UserDeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserDeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserGetRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UserGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserUpdateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserUpdateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UserUpdateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserUpdateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnCredentialDeleteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *N200 + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnCredentialDeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnCredentialDeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserCustomLoginIdentifierCreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserCustomLoginIdentifierCreateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UserCustomLoginIdentifierCreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserCustomLoginIdentifierCreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserCustomLoginIdentifierDeleteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *N200 + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UserCustomLoginIdentifierDeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserCustomLoginIdentifierDeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserCustomLoginIdentifierGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserCustomLoginIdentifierGetRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UserCustomLoginIdentifierGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserCustomLoginIdentifierGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserDeviceListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserDeviceListRsp +} + +// Status returns HTTPResponse.Status +func (r UserDeviceListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserDeviceListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserEmailCreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserEmailCreateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UserEmailCreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserEmailCreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserEmailDeleteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *N200 + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UserEmailDeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserEmailDeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserEmailGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserEmailGetRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UserEmailGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserEmailGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserPhoneNumberCreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserPhoneNumberCreateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UserPhoneNumberCreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserPhoneNumberCreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserPhoneNumberDeleteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *N200 + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UserPhoneNumberDeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserPhoneNumberDeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserPhoneNumberGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserPhoneNumberGetRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UserPhoneNumberGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserPhoneNumberGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ValidateEmailResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ValidateEmailRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r ValidateEmailResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ValidateEmailResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ValidatePhoneNumberResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ValidatePhoneNumberRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r ValidatePhoneNumberResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ValidatePhoneNumberResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnAssociateStartResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *WebAuthnAssociateStartRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnAssociateStartResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnAssociateStartResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnAuthenticateFinishResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *WebAuthnAuthenticateFinishRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnAuthenticateFinishResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnAuthenticateFinishResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnAuthenticateStartResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *WebAuthnAuthenticateStartRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnAuthenticateStartResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnAuthenticateStartResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnAuthenticatorUpdateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *N200 + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnAuthenticatorUpdateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnAuthenticatorUpdateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnCredentialListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *WebAuthnCredentialListRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnCredentialListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnCredentialListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnCredentialExistsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *WebAuthnCredentialExistsRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnCredentialExistsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnCredentialExistsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnCredentialUpdateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *WebAuthnCredentialRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnCredentialUpdateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnCredentialUpdateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnMediationStartResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *WebAuthnMediationStartRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnMediationStartResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnMediationStartResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnRegisterFinishResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *WebAuthnRegisterFinishRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnRegisterFinishResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnRegisterFinishResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnRegisterStartResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *WebAuthnRegisterStartRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnRegisterStartResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnRegisterStartResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnSettingListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *WebauthnSettingListRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnSettingListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnSettingListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnSettingCreateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *WebauthnSettingCreateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnSettingCreateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnSettingCreateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnSettingDeleteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *N200 + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnSettingDeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnSettingDeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnSettingGetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *WebauthnSettingGetRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnSettingGetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnSettingGetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebAuthnSettingPutResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *WebauthnSettingUpdateRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebAuthnSettingPutResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebAuthnSettingPutResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type WebhookLogsListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *WebhookLogsListRsp + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r WebhookLogsListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WebhookLogsListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// AndroidAppConfigGetWithResponse request returning *AndroidAppConfigGetResponse +func (c *ClientWithResponses) AndroidAppConfigGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AndroidAppConfigGetResponse, error) { + rsp, err := c.AndroidAppConfigGet(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseAndroidAppConfigGetResponse(rsp) +} + +// AndroidAppConfigCreateWithBodyWithResponse request with arbitrary body returning *AndroidAppConfigCreateResponse +func (c *ClientWithResponses) AndroidAppConfigCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AndroidAppConfigCreateResponse, error) { + rsp, err := c.AndroidAppConfigCreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAndroidAppConfigCreateResponse(rsp) +} + +func (c *ClientWithResponses) AndroidAppConfigCreateWithResponse(ctx context.Context, body AndroidAppConfigCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*AndroidAppConfigCreateResponse, error) { + rsp, err := c.AndroidAppConfigCreate(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAndroidAppConfigCreateResponse(rsp) +} + +// AndroidAppConfigDeleteWithBodyWithResponse request with arbitrary body returning *AndroidAppConfigDeleteResponse +func (c *ClientWithResponses) AndroidAppConfigDeleteWithBodyWithResponse(ctx context.Context, androidAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AndroidAppConfigDeleteResponse, error) { + rsp, err := c.AndroidAppConfigDeleteWithBody(ctx, androidAppConfigID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAndroidAppConfigDeleteResponse(rsp) +} + +func (c *ClientWithResponses) AndroidAppConfigDeleteWithResponse(ctx context.Context, androidAppConfigID string, body AndroidAppConfigDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*AndroidAppConfigDeleteResponse, error) { + rsp, err := c.AndroidAppConfigDelete(ctx, androidAppConfigID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAndroidAppConfigDeleteResponse(rsp) +} + +// AndroidAppConfigPutWithBodyWithResponse request with arbitrary body returning *AndroidAppConfigPutResponse +func (c *ClientWithResponses) AndroidAppConfigPutWithBodyWithResponse(ctx context.Context, androidAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AndroidAppConfigPutResponse, error) { + rsp, err := c.AndroidAppConfigPutWithBody(ctx, androidAppConfigID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAndroidAppConfigPutResponse(rsp) +} + +func (c *ClientWithResponses) AndroidAppConfigPutWithResponse(ctx context.Context, androidAppConfigID string, body AndroidAppConfigPutJSONRequestBody, reqEditors ...RequestEditorFn) (*AndroidAppConfigPutResponse, error) { + rsp, err := c.AndroidAppConfigPut(ctx, androidAppConfigID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAndroidAppConfigPutResponse(rsp) +} + +// AssociationTokenCreateWithBodyWithResponse request with arbitrary body returning *AssociationTokenCreateResponse +func (c *ClientWithResponses) AssociationTokenCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AssociationTokenCreateResponse, error) { + rsp, err := c.AssociationTokenCreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAssociationTokenCreateResponse(rsp) +} + +func (c *ClientWithResponses) AssociationTokenCreateWithResponse(ctx context.Context, body AssociationTokenCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*AssociationTokenCreateResponse, error) { + rsp, err := c.AssociationTokenCreate(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAssociationTokenCreateResponse(rsp) +} + +// AuthMethodsListWithBodyWithResponse request with arbitrary body returning *AuthMethodsListResponse +func (c *ClientWithResponses) AuthMethodsListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthMethodsListResponse, error) { + rsp, err := c.AuthMethodsListWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthMethodsListResponse(rsp) +} + +func (c *ClientWithResponses) AuthMethodsListWithResponse(ctx context.Context, body AuthMethodsListJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthMethodsListResponse, error) { + rsp, err := c.AuthMethodsList(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthMethodsListResponse(rsp) +} + +// AuthTokenValidateWithBodyWithResponse request with arbitrary body returning *AuthTokenValidateResponse +func (c *ClientWithResponses) AuthTokenValidateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthTokenValidateResponse, error) { + rsp, err := c.AuthTokenValidateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthTokenValidateResponse(rsp) +} + +func (c *ClientWithResponses) AuthTokenValidateWithResponse(ctx context.Context, body AuthTokenValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthTokenValidateResponse, error) { + rsp, err := c.AuthTokenValidate(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthTokenValidateResponse(rsp) +} + +// EmailCodeSendWithBodyWithResponse request with arbitrary body returning *EmailCodeSendResponse +func (c *ClientWithResponses) EmailCodeSendWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailCodeSendResponse, error) { + rsp, err := c.EmailCodeSendWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailCodeSendResponse(rsp) +} + +func (c *ClientWithResponses) EmailCodeSendWithResponse(ctx context.Context, body EmailCodeSendJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailCodeSendResponse, error) { + rsp, err := c.EmailCodeSend(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailCodeSendResponse(rsp) +} + +// EmailCodeGetWithResponse request returning *EmailCodeGetResponse +func (c *ClientWithResponses) EmailCodeGetWithResponse(ctx context.Context, emailCodeID EmailCodeID, reqEditors ...RequestEditorFn) (*EmailCodeGetResponse, error) { + rsp, err := c.EmailCodeGet(ctx, emailCodeID, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailCodeGetResponse(rsp) +} + +// EmailCodeValidateWithBodyWithResponse request with arbitrary body returning *EmailCodeValidateResponse +func (c *ClientWithResponses) EmailCodeValidateWithBodyWithResponse(ctx context.Context, emailCodeID EmailCodeID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailCodeValidateResponse, error) { + rsp, err := c.EmailCodeValidateWithBody(ctx, emailCodeID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailCodeValidateResponse(rsp) +} + +func (c *ClientWithResponses) EmailCodeValidateWithResponse(ctx context.Context, emailCodeID EmailCodeID, body EmailCodeValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailCodeValidateResponse, error) { + rsp, err := c.EmailCodeValidate(ctx, emailCodeID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailCodeValidateResponse(rsp) +} + +// EmailLinkSendWithBodyWithResponse request with arbitrary body returning *EmailLinkSendResponse +func (c *ClientWithResponses) EmailLinkSendWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailLinkSendResponse, error) { + rsp, err := c.EmailLinkSendWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailLinkSendResponse(rsp) +} + +func (c *ClientWithResponses) EmailLinkSendWithResponse(ctx context.Context, body EmailLinkSendJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailLinkSendResponse, error) { + rsp, err := c.EmailLinkSend(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailLinkSendResponse(rsp) +} + +// EmailLinkDeleteWithBodyWithResponse request with arbitrary body returning *EmailLinkDeleteResponse +func (c *ClientWithResponses) EmailLinkDeleteWithBodyWithResponse(ctx context.Context, emailLinkID EmailLinkID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailLinkDeleteResponse, error) { + rsp, err := c.EmailLinkDeleteWithBody(ctx, emailLinkID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailLinkDeleteResponse(rsp) +} + +func (c *ClientWithResponses) EmailLinkDeleteWithResponse(ctx context.Context, emailLinkID EmailLinkID, body EmailLinkDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailLinkDeleteResponse, error) { + rsp, err := c.EmailLinkDelete(ctx, emailLinkID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailLinkDeleteResponse(rsp) +} + +// EmailLinkGetWithResponse request returning *EmailLinkGetResponse +func (c *ClientWithResponses) EmailLinkGetWithResponse(ctx context.Context, emailLinkID EmailLinkID, reqEditors ...RequestEditorFn) (*EmailLinkGetResponse, error) { + rsp, err := c.EmailLinkGet(ctx, emailLinkID, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailLinkGetResponse(rsp) +} + +// EmailLinkValidateWithBodyWithResponse request with arbitrary body returning *EmailLinkValidateResponse +func (c *ClientWithResponses) EmailLinkValidateWithBodyWithResponse(ctx context.Context, emailLinkID EmailLinkID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailLinkValidateResponse, error) { + rsp, err := c.EmailLinkValidateWithBody(ctx, emailLinkID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailLinkValidateResponse(rsp) +} + +func (c *ClientWithResponses) EmailLinkValidateWithResponse(ctx context.Context, emailLinkID EmailLinkID, body EmailLinkValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailLinkValidateResponse, error) { + rsp, err := c.EmailLinkValidate(ctx, emailLinkID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailLinkValidateResponse(rsp) +} + +// EmailTemplateCreateWithBodyWithResponse request with arbitrary body returning *EmailTemplateCreateResponse +func (c *ClientWithResponses) EmailTemplateCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTemplateCreateResponse, error) { + rsp, err := c.EmailTemplateCreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailTemplateCreateResponse(rsp) +} + +func (c *ClientWithResponses) EmailTemplateCreateWithResponse(ctx context.Context, body EmailTemplateCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTemplateCreateResponse, error) { + rsp, err := c.EmailTemplateCreate(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailTemplateCreateResponse(rsp) +} + +// EmailTemplateDeleteWithBodyWithResponse request with arbitrary body returning *EmailTemplateDeleteResponse +func (c *ClientWithResponses) EmailTemplateDeleteWithBodyWithResponse(ctx context.Context, emailTemplateID EmailTemplateID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTemplateDeleteResponse, error) { + rsp, err := c.EmailTemplateDeleteWithBody(ctx, emailTemplateID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailTemplateDeleteResponse(rsp) +} + +func (c *ClientWithResponses) EmailTemplateDeleteWithResponse(ctx context.Context, emailTemplateID EmailTemplateID, body EmailTemplateDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTemplateDeleteResponse, error) { + rsp, err := c.EmailTemplateDelete(ctx, emailTemplateID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailTemplateDeleteResponse(rsp) +} + +// ExampleGetWithResponse request returning *ExampleGetResponse +func (c *ClientWithResponses) ExampleGetWithResponse(ctx context.Context, fileName ExampleGetParamsFileName, reqEditors ...RequestEditorFn) (*ExampleGetResponse, error) { + rsp, err := c.ExampleGet(ctx, fileName, reqEditors...) + if err != nil { + return nil, err + } + return ParseExampleGetResponse(rsp) +} + +// IOSAppConfigGetWithResponse request returning *IOSAppConfigGetResponse +func (c *ClientWithResponses) IOSAppConfigGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*IOSAppConfigGetResponse, error) { + rsp, err := c.IOSAppConfigGet(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseIOSAppConfigGetResponse(rsp) +} + +// IOSAppConfigCreateWithBodyWithResponse request with arbitrary body returning *IOSAppConfigCreateResponse +func (c *ClientWithResponses) IOSAppConfigCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IOSAppConfigCreateResponse, error) { + rsp, err := c.IOSAppConfigCreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIOSAppConfigCreateResponse(rsp) +} + +func (c *ClientWithResponses) IOSAppConfigCreateWithResponse(ctx context.Context, body IOSAppConfigCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*IOSAppConfigCreateResponse, error) { + rsp, err := c.IOSAppConfigCreate(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIOSAppConfigCreateResponse(rsp) +} + +// IOSAppConfigDeleteWithBodyWithResponse request with arbitrary body returning *IOSAppConfigDeleteResponse +func (c *ClientWithResponses) IOSAppConfigDeleteWithBodyWithResponse(ctx context.Context, iosAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IOSAppConfigDeleteResponse, error) { + rsp, err := c.IOSAppConfigDeleteWithBody(ctx, iosAppConfigID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIOSAppConfigDeleteResponse(rsp) +} + +func (c *ClientWithResponses) IOSAppConfigDeleteWithResponse(ctx context.Context, iosAppConfigID string, body IOSAppConfigDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*IOSAppConfigDeleteResponse, error) { + rsp, err := c.IOSAppConfigDelete(ctx, iosAppConfigID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIOSAppConfigDeleteResponse(rsp) +} + +// IOSAppConfigPutWithBodyWithResponse request with arbitrary body returning *IOSAppConfigPutResponse +func (c *ClientWithResponses) IOSAppConfigPutWithBodyWithResponse(ctx context.Context, iosAppConfigID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IOSAppConfigPutResponse, error) { + rsp, err := c.IOSAppConfigPutWithBody(ctx, iosAppConfigID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIOSAppConfigPutResponse(rsp) +} + +func (c *ClientWithResponses) IOSAppConfigPutWithResponse(ctx context.Context, iosAppConfigID string, body IOSAppConfigPutJSONRequestBody, reqEditors ...RequestEditorFn) (*IOSAppConfigPutResponse, error) { + rsp, err := c.IOSAppConfigPut(ctx, iosAppConfigID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIOSAppConfigPutResponse(rsp) +} + +// LongSessionListWithResponse request returning *LongSessionListResponse +func (c *ClientWithResponses) LongSessionListWithResponse(ctx context.Context, params *LongSessionListParams, reqEditors ...RequestEditorFn) (*LongSessionListResponse, error) { + rsp, err := c.LongSessionList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseLongSessionListResponse(rsp) +} + +// LongSessionGetWithResponse request returning *LongSessionGetResponse +func (c *ClientWithResponses) LongSessionGetWithResponse(ctx context.Context, sessionID externalRef0.SessionID, reqEditors ...RequestEditorFn) (*LongSessionGetResponse, error) { + rsp, err := c.LongSessionGet(ctx, sessionID, reqEditors...) + if err != nil { + return nil, err + } + return ParseLongSessionGetResponse(rsp) +} + +// LongSessionRevokeWithBodyWithResponse request with arbitrary body returning *LongSessionRevokeResponse +func (c *ClientWithResponses) LongSessionRevokeWithBodyWithResponse(ctx context.Context, sessionID externalRef0.SessionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LongSessionRevokeResponse, error) { + rsp, err := c.LongSessionRevokeWithBody(ctx, sessionID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseLongSessionRevokeResponse(rsp) +} + +func (c *ClientWithResponses) LongSessionRevokeWithResponse(ctx context.Context, sessionID externalRef0.SessionID, body LongSessionRevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*LongSessionRevokeResponse, error) { + rsp, err := c.LongSessionRevoke(ctx, sessionID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseLongSessionRevokeResponse(rsp) +} + +// OriginAllowedWithBodyWithResponse request with arbitrary body returning *OriginAllowedResponse +func (c *ClientWithResponses) OriginAllowedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OriginAllowedResponse, error) { + rsp, err := c.OriginAllowedWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseOriginAllowedResponse(rsp) +} + +func (c *ClientWithResponses) OriginAllowedWithResponse(ctx context.Context, body OriginAllowedJSONRequestBody, reqEditors ...RequestEditorFn) (*OriginAllowedResponse, error) { + rsp, err := c.OriginAllowed(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseOriginAllowedResponse(rsp) +} + +// ProjectConfigGetWithResponse request returning *ProjectConfigGetResponse +func (c *ClientWithResponses) ProjectConfigGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ProjectConfigGetResponse, error) { + rsp, err := c.ProjectConfigGet(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseProjectConfigGetResponse(rsp) +} + +// ProjectConfigSaveWithBodyWithResponse request with arbitrary body returning *ProjectConfigSaveResponse +func (c *ClientWithResponses) ProjectConfigSaveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectConfigSaveResponse, error) { + rsp, err := c.ProjectConfigSaveWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseProjectConfigSaveResponse(rsp) +} + +func (c *ClientWithResponses) ProjectConfigSaveWithResponse(ctx context.Context, body ProjectConfigSaveJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectConfigSaveResponse, error) { + rsp, err := c.ProjectConfigSave(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseProjectConfigSaveResponse(rsp) +} + +// ProjectConfigWebhookTestWithBodyWithResponse request with arbitrary body returning *ProjectConfigWebhookTestResponse +func (c *ClientWithResponses) ProjectConfigWebhookTestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectConfigWebhookTestResponse, error) { + rsp, err := c.ProjectConfigWebhookTestWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseProjectConfigWebhookTestResponse(rsp) +} + +func (c *ClientWithResponses) ProjectConfigWebhookTestWithResponse(ctx context.Context, body ProjectConfigWebhookTestJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectConfigWebhookTestResponse, error) { + rsp, err := c.ProjectConfigWebhookTest(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseProjectConfigWebhookTestResponse(rsp) +} + +// ProjectSecretListWithResponse request returning *ProjectSecretListResponse +func (c *ClientWithResponses) ProjectSecretListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ProjectSecretListResponse, error) { + rsp, err := c.ProjectSecretList(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseProjectSecretListResponse(rsp) +} + +// ProjectSecretCreateWithBodyWithResponse request with arbitrary body returning *ProjectSecretCreateResponse +func (c *ClientWithResponses) ProjectSecretCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectSecretCreateResponse, error) { + rsp, err := c.ProjectSecretCreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseProjectSecretCreateResponse(rsp) +} + +func (c *ClientWithResponses) ProjectSecretCreateWithResponse(ctx context.Context, body ProjectSecretCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectSecretCreateResponse, error) { + rsp, err := c.ProjectSecretCreate(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseProjectSecretCreateResponse(rsp) +} + +// ProjectSecretDeleteWithBodyWithResponse request with arbitrary body returning *ProjectSecretDeleteResponse +func (c *ClientWithResponses) ProjectSecretDeleteWithBodyWithResponse(ctx context.Context, secretID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectSecretDeleteResponse, error) { + rsp, err := c.ProjectSecretDeleteWithBody(ctx, secretID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseProjectSecretDeleteResponse(rsp) +} + +func (c *ClientWithResponses) ProjectSecretDeleteWithResponse(ctx context.Context, secretID string, body ProjectSecretDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectSecretDeleteResponse, error) { + rsp, err := c.ProjectSecretDelete(ctx, secretID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseProjectSecretDeleteResponse(rsp) +} + +// ProjectActivateWithBodyWithResponse request with arbitrary body returning *ProjectActivateResponse +func (c *ClientWithResponses) ProjectActivateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProjectActivateResponse, error) { + rsp, err := c.ProjectActivateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseProjectActivateResponse(rsp) +} + +func (c *ClientWithResponses) ProjectActivateWithResponse(ctx context.Context, body ProjectActivateJSONRequestBody, reqEditors ...RequestEditorFn) (*ProjectActivateResponse, error) { + rsp, err := c.ProjectActivate(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseProjectActivateResponse(rsp) +} + +// RequestLogsListWithResponse request returning *RequestLogsListResponse +func (c *ClientWithResponses) RequestLogsListWithResponse(ctx context.Context, params *RequestLogsListParams, reqEditors ...RequestEditorFn) (*RequestLogsListResponse, error) { + rsp, err := c.RequestLogsList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseRequestLogsListResponse(rsp) +} + +// RequestLogGetWithResponse request returning *RequestLogGetResponse +func (c *ClientWithResponses) RequestLogGetWithResponse(ctx context.Context, requestID RequestID, params *RequestLogGetParams, reqEditors ...RequestEditorFn) (*RequestLogGetResponse, error) { + rsp, err := c.RequestLogGet(ctx, requestID, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseRequestLogGetResponse(rsp) +} + +// SessionConfigGetWithResponse request returning *SessionConfigGetResponse +func (c *ClientWithResponses) SessionConfigGetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*SessionConfigGetResponse, error) { + rsp, err := c.SessionConfigGet(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseSessionConfigGetResponse(rsp) +} + +// SessionConfigUpdateWithBodyWithResponse request with arbitrary body returning *SessionConfigUpdateResponse +func (c *ClientWithResponses) SessionConfigUpdateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionConfigUpdateResponse, error) { + rsp, err := c.SessionConfigUpdateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSessionConfigUpdateResponse(rsp) +} + +func (c *ClientWithResponses) SessionConfigUpdateWithResponse(ctx context.Context, body SessionConfigUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionConfigUpdateResponse, error) { + rsp, err := c.SessionConfigUpdate(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSessionConfigUpdateResponse(rsp) +} + +// SessionTokenCreateWithBodyWithResponse request with arbitrary body returning *SessionTokenCreateResponse +func (c *ClientWithResponses) SessionTokenCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionTokenCreateResponse, error) { + rsp, err := c.SessionTokenCreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSessionTokenCreateResponse(rsp) +} + +func (c *ClientWithResponses) SessionTokenCreateWithResponse(ctx context.Context, body SessionTokenCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionTokenCreateResponse, error) { + rsp, err := c.SessionTokenCreate(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSessionTokenCreateResponse(rsp) +} + +// SessionTokenVerifyWithBodyWithResponse request with arbitrary body returning *SessionTokenVerifyResponse +func (c *ClientWithResponses) SessionTokenVerifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionTokenVerifyResponse, error) { + rsp, err := c.SessionTokenVerifyWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSessionTokenVerifyResponse(rsp) +} + +func (c *ClientWithResponses) SessionTokenVerifyWithResponse(ctx context.Context, body SessionTokenVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionTokenVerifyResponse, error) { + rsp, err := c.SessionTokenVerify(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSessionTokenVerifyResponse(rsp) +} + +// SmsCodeSendWithBodyWithResponse request with arbitrary body returning *SmsCodeSendResponse +func (c *ClientWithResponses) SmsCodeSendWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SmsCodeSendResponse, error) { + rsp, err := c.SmsCodeSendWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSmsCodeSendResponse(rsp) +} + +func (c *ClientWithResponses) SmsCodeSendWithResponse(ctx context.Context, body SmsCodeSendJSONRequestBody, reqEditors ...RequestEditorFn) (*SmsCodeSendResponse, error) { + rsp, err := c.SmsCodeSend(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSmsCodeSendResponse(rsp) +} + +// SmsCodeValidateWithBodyWithResponse request with arbitrary body returning *SmsCodeValidateResponse +func (c *ClientWithResponses) SmsCodeValidateWithBodyWithResponse(ctx context.Context, smsCodeID SmsCodeID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SmsCodeValidateResponse, error) { + rsp, err := c.SmsCodeValidateWithBody(ctx, smsCodeID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSmsCodeValidateResponse(rsp) +} + +func (c *ClientWithResponses) SmsCodeValidateWithResponse(ctx context.Context, smsCodeID SmsCodeID, body SmsCodeValidateJSONRequestBody, reqEditors ...RequestEditorFn) (*SmsCodeValidateResponse, error) { + rsp, err := c.SmsCodeValidate(ctx, smsCodeID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSmsCodeValidateResponse(rsp) +} + +// SmsTemplateCreateWithBodyWithResponse request with arbitrary body returning *SmsTemplateCreateResponse +func (c *ClientWithResponses) SmsTemplateCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SmsTemplateCreateResponse, error) { + rsp, err := c.SmsTemplateCreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSmsTemplateCreateResponse(rsp) +} + +func (c *ClientWithResponses) SmsTemplateCreateWithResponse(ctx context.Context, body SmsTemplateCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SmsTemplateCreateResponse, error) { + rsp, err := c.SmsTemplateCreate(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSmsTemplateCreateResponse(rsp) +} + +// SmsTemplateDeleteWithBodyWithResponse request with arbitrary body returning *SmsTemplateDeleteResponse +func (c *ClientWithResponses) SmsTemplateDeleteWithBodyWithResponse(ctx context.Context, smsTemplateID SmsTemplateID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SmsTemplateDeleteResponse, error) { + rsp, err := c.SmsTemplateDeleteWithBody(ctx, smsTemplateID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSmsTemplateDeleteResponse(rsp) +} + +func (c *ClientWithResponses) SmsTemplateDeleteWithResponse(ctx context.Context, smsTemplateID SmsTemplateID, body SmsTemplateDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*SmsTemplateDeleteResponse, error) { + rsp, err := c.SmsTemplateDelete(ctx, smsTemplateID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSmsTemplateDeleteResponse(rsp) +} + +// TrackingAllRequestWithResponse request returning *TrackingAllRequestResponse +func (c *ClientWithResponses) TrackingAllRequestWithResponse(ctx context.Context, params *TrackingAllRequestParams, reqEditors ...RequestEditorFn) (*TrackingAllRequestResponse, error) { + rsp, err := c.TrackingAllRequest(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseTrackingAllRequestResponse(rsp) +} + +// TrackingBackupStateGetWithResponse request returning *TrackingBackupStateGetResponse +func (c *ClientWithResponses) TrackingBackupStateGetWithResponse(ctx context.Context, params *TrackingBackupStateGetParams, reqEditors ...RequestEditorFn) (*TrackingBackupStateGetResponse, error) { + rsp, err := c.TrackingBackupStateGet(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseTrackingBackupStateGetResponse(rsp) +} + +// TrackingBrowserStatsListWithResponse request returning *TrackingBrowserStatsListResponse +func (c *ClientWithResponses) TrackingBrowserStatsListWithResponse(ctx context.Context, params *TrackingBrowserStatsListParams, reqEditors ...RequestEditorFn) (*TrackingBrowserStatsListResponse, error) { + rsp, err := c.TrackingBrowserStatsList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseTrackingBrowserStatsListResponse(rsp) +} + +// TrackingBrowserDetailedStatsListWithResponse request returning *TrackingBrowserDetailedStatsListResponse +func (c *ClientWithResponses) TrackingBrowserDetailedStatsListWithResponse(ctx context.Context, params *TrackingBrowserDetailedStatsListParams, reqEditors ...RequestEditorFn) (*TrackingBrowserDetailedStatsListResponse, error) { + rsp, err := c.TrackingBrowserDetailedStatsList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseTrackingBrowserDetailedStatsListResponse(rsp) +} + +// TrackingEnumsGetWithResponse request returning *TrackingEnumsGetResponse +func (c *ClientWithResponses) TrackingEnumsGetWithResponse(ctx context.Context, params *TrackingEnumsGetParams, reqEditors ...RequestEditorFn) (*TrackingEnumsGetResponse, error) { + rsp, err := c.TrackingEnumsGet(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseTrackingEnumsGetResponse(rsp) +} + +// TrackingOSStatsListWithResponse request returning *TrackingOSStatsListResponse +func (c *ClientWithResponses) TrackingOSStatsListWithResponse(ctx context.Context, params *TrackingOSStatsListParams, reqEditors ...RequestEditorFn) (*TrackingOSStatsListResponse, error) { + rsp, err := c.TrackingOSStatsList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseTrackingOSStatsListResponse(rsp) +} + +// TrackingOSDetailedStatsListWithResponse request returning *TrackingOSDetailedStatsListResponse +func (c *ClientWithResponses) TrackingOSDetailedStatsListWithResponse(ctx context.Context, params *TrackingOSDetailedStatsListParams, reqEditors ...RequestEditorFn) (*TrackingOSDetailedStatsListResponse, error) { + rsp, err := c.TrackingOSDetailedStatsList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseTrackingOSDetailedStatsListResponse(rsp) +} + +// TrackingStatsListWithResponse request returning *TrackingStatsListResponse +func (c *ClientWithResponses) TrackingStatsListWithResponse(ctx context.Context, params *TrackingStatsListParams, reqEditors ...RequestEditorFn) (*TrackingStatsListResponse, error) { + rsp, err := c.TrackingStatsList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseTrackingStatsListResponse(rsp) +} + +// TrackingDetailedStatsListWithResponse request returning *TrackingDetailedStatsListResponse +func (c *ClientWithResponses) TrackingDetailedStatsListWithResponse(ctx context.Context, params *TrackingDetailedStatsListParams, reqEditors ...RequestEditorFn) (*TrackingDetailedStatsListResponse, error) { + rsp, err := c.TrackingDetailedStatsList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseTrackingDetailedStatsListResponse(rsp) +} + +// UserAuthLogListWithResponse request returning *UserAuthLogListResponse +func (c *ClientWithResponses) UserAuthLogListWithResponse(ctx context.Context, params *UserAuthLogListParams, reqEditors ...RequestEditorFn) (*UserAuthLogListResponse, error) { + rsp, err := c.UserAuthLogList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserAuthLogListResponse(rsp) +} + +// UserListWithResponse request returning *UserListResponse +func (c *ClientWithResponses) UserListWithResponse(ctx context.Context, params *UserListParams, reqEditors ...RequestEditorFn) (*UserListResponse, error) { + rsp, err := c.UserList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserListResponse(rsp) +} + +// UserCreateWithBodyWithResponse request with arbitrary body returning *UserCreateResponse +func (c *ClientWithResponses) UserCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserCreateResponse, error) { + rsp, err := c.UserCreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserCreateResponse(rsp) +} + +func (c *ClientWithResponses) UserCreateWithResponse(ctx context.Context, body UserCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*UserCreateResponse, error) { + rsp, err := c.UserCreate(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserCreateResponse(rsp) +} + +// UserStatsListWithResponse request returning *UserStatsListResponse +func (c *ClientWithResponses) UserStatsListWithResponse(ctx context.Context, params *UserStatsListParams, reqEditors ...RequestEditorFn) (*UserStatsListResponse, error) { + rsp, err := c.UserStatsList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserStatsListResponse(rsp) +} + +// UserDeleteWithBodyWithResponse request with arbitrary body returning *UserDeleteResponse +func (c *ClientWithResponses) UserDeleteWithBodyWithResponse(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserDeleteResponse, error) { + rsp, err := c.UserDeleteWithBody(ctx, userID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserDeleteResponse(rsp) +} + +func (c *ClientWithResponses) UserDeleteWithResponse(ctx context.Context, userID UserID, body UserDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*UserDeleteResponse, error) { + rsp, err := c.UserDelete(ctx, userID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserDeleteResponse(rsp) +} + +// UserGetWithResponse request returning *UserGetResponse +func (c *ClientWithResponses) UserGetWithResponse(ctx context.Context, userID UserID, params *UserGetParams, reqEditors ...RequestEditorFn) (*UserGetResponse, error) { + rsp, err := c.UserGet(ctx, userID, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserGetResponse(rsp) +} + +// UserUpdateWithBodyWithResponse request with arbitrary body returning *UserUpdateResponse +func (c *ClientWithResponses) UserUpdateWithBodyWithResponse(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserUpdateResponse, error) { + rsp, err := c.UserUpdateWithBody(ctx, userID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserUpdateResponse(rsp) +} + +func (c *ClientWithResponses) UserUpdateWithResponse(ctx context.Context, userID UserID, body UserUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*UserUpdateResponse, error) { + rsp, err := c.UserUpdate(ctx, userID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserUpdateResponse(rsp) +} + +// WebAuthnCredentialDeleteWithBodyWithResponse request with arbitrary body returning *WebAuthnCredentialDeleteResponse +func (c *ClientWithResponses) WebAuthnCredentialDeleteWithBodyWithResponse(ctx context.Context, userID UserID, credentialID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnCredentialDeleteResponse, error) { + rsp, err := c.WebAuthnCredentialDeleteWithBody(ctx, userID, credentialID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnCredentialDeleteResponse(rsp) +} + +func (c *ClientWithResponses) WebAuthnCredentialDeleteWithResponse(ctx context.Context, userID UserID, credentialID string, body WebAuthnCredentialDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnCredentialDeleteResponse, error) { + rsp, err := c.WebAuthnCredentialDelete(ctx, userID, credentialID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnCredentialDeleteResponse(rsp) +} + +// UserCustomLoginIdentifierCreateWithBodyWithResponse request with arbitrary body returning *UserCustomLoginIdentifierCreateResponse +func (c *ClientWithResponses) UserCustomLoginIdentifierCreateWithBodyWithResponse(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserCustomLoginIdentifierCreateResponse, error) { + rsp, err := c.UserCustomLoginIdentifierCreateWithBody(ctx, userID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserCustomLoginIdentifierCreateResponse(rsp) +} + +func (c *ClientWithResponses) UserCustomLoginIdentifierCreateWithResponse(ctx context.Context, userID UserID, body UserCustomLoginIdentifierCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*UserCustomLoginIdentifierCreateResponse, error) { + rsp, err := c.UserCustomLoginIdentifierCreate(ctx, userID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserCustomLoginIdentifierCreateResponse(rsp) +} + +// UserCustomLoginIdentifierDeleteWithBodyWithResponse request with arbitrary body returning *UserCustomLoginIdentifierDeleteResponse +func (c *ClientWithResponses) UserCustomLoginIdentifierDeleteWithBodyWithResponse(ctx context.Context, userID UserID, customLoginIdentifierID CustomLoginIdentifierID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserCustomLoginIdentifierDeleteResponse, error) { + rsp, err := c.UserCustomLoginIdentifierDeleteWithBody(ctx, userID, customLoginIdentifierID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserCustomLoginIdentifierDeleteResponse(rsp) +} + +func (c *ClientWithResponses) UserCustomLoginIdentifierDeleteWithResponse(ctx context.Context, userID UserID, customLoginIdentifierID CustomLoginIdentifierID, body UserCustomLoginIdentifierDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*UserCustomLoginIdentifierDeleteResponse, error) { + rsp, err := c.UserCustomLoginIdentifierDelete(ctx, userID, customLoginIdentifierID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserCustomLoginIdentifierDeleteResponse(rsp) +} + +// UserCustomLoginIdentifierGetWithResponse request returning *UserCustomLoginIdentifierGetResponse +func (c *ClientWithResponses) UserCustomLoginIdentifierGetWithResponse(ctx context.Context, userID UserID, customLoginIdentifierID CustomLoginIdentifierID, params *UserCustomLoginIdentifierGetParams, reqEditors ...RequestEditorFn) (*UserCustomLoginIdentifierGetResponse, error) { + rsp, err := c.UserCustomLoginIdentifierGet(ctx, userID, customLoginIdentifierID, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserCustomLoginIdentifierGetResponse(rsp) +} + +// UserDeviceListWithResponse request returning *UserDeviceListResponse +func (c *ClientWithResponses) UserDeviceListWithResponse(ctx context.Context, userID UserID, params *UserDeviceListParams, reqEditors ...RequestEditorFn) (*UserDeviceListResponse, error) { + rsp, err := c.UserDeviceList(ctx, userID, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserDeviceListResponse(rsp) +} + +// UserEmailCreateWithBodyWithResponse request with arbitrary body returning *UserEmailCreateResponse +func (c *ClientWithResponses) UserEmailCreateWithBodyWithResponse(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserEmailCreateResponse, error) { + rsp, err := c.UserEmailCreateWithBody(ctx, userID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserEmailCreateResponse(rsp) +} + +func (c *ClientWithResponses) UserEmailCreateWithResponse(ctx context.Context, userID UserID, body UserEmailCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*UserEmailCreateResponse, error) { + rsp, err := c.UserEmailCreate(ctx, userID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserEmailCreateResponse(rsp) +} + +// UserEmailDeleteWithBodyWithResponse request with arbitrary body returning *UserEmailDeleteResponse +func (c *ClientWithResponses) UserEmailDeleteWithBodyWithResponse(ctx context.Context, userID UserID, emailID EmailID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserEmailDeleteResponse, error) { + rsp, err := c.UserEmailDeleteWithBody(ctx, userID, emailID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserEmailDeleteResponse(rsp) +} + +func (c *ClientWithResponses) UserEmailDeleteWithResponse(ctx context.Context, userID UserID, emailID EmailID, body UserEmailDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*UserEmailDeleteResponse, error) { + rsp, err := c.UserEmailDelete(ctx, userID, emailID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserEmailDeleteResponse(rsp) +} + +// UserEmailGetWithResponse request returning *UserEmailGetResponse +func (c *ClientWithResponses) UserEmailGetWithResponse(ctx context.Context, userID UserID, emailID EmailID, params *UserEmailGetParams, reqEditors ...RequestEditorFn) (*UserEmailGetResponse, error) { + rsp, err := c.UserEmailGet(ctx, userID, emailID, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserEmailGetResponse(rsp) +} + +// UserPhoneNumberCreateWithBodyWithResponse request with arbitrary body returning *UserPhoneNumberCreateResponse +func (c *ClientWithResponses) UserPhoneNumberCreateWithBodyWithResponse(ctx context.Context, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserPhoneNumberCreateResponse, error) { + rsp, err := c.UserPhoneNumberCreateWithBody(ctx, userID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserPhoneNumberCreateResponse(rsp) +} + +func (c *ClientWithResponses) UserPhoneNumberCreateWithResponse(ctx context.Context, userID UserID, body UserPhoneNumberCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*UserPhoneNumberCreateResponse, error) { + rsp, err := c.UserPhoneNumberCreate(ctx, userID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserPhoneNumberCreateResponse(rsp) +} + +// UserPhoneNumberDeleteWithBodyWithResponse request with arbitrary body returning *UserPhoneNumberDeleteResponse +func (c *ClientWithResponses) UserPhoneNumberDeleteWithBodyWithResponse(ctx context.Context, userID UserID, phoneNumberID PhoneNumberID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserPhoneNumberDeleteResponse, error) { + rsp, err := c.UserPhoneNumberDeleteWithBody(ctx, userID, phoneNumberID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserPhoneNumberDeleteResponse(rsp) +} + +func (c *ClientWithResponses) UserPhoneNumberDeleteWithResponse(ctx context.Context, userID UserID, phoneNumberID PhoneNumberID, body UserPhoneNumberDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*UserPhoneNumberDeleteResponse, error) { + rsp, err := c.UserPhoneNumberDelete(ctx, userID, phoneNumberID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserPhoneNumberDeleteResponse(rsp) +} + +// UserPhoneNumberGetWithResponse request returning *UserPhoneNumberGetResponse +func (c *ClientWithResponses) UserPhoneNumberGetWithResponse(ctx context.Context, userID UserID, phoneNumberID PhoneNumberID, params *UserPhoneNumberGetParams, reqEditors ...RequestEditorFn) (*UserPhoneNumberGetResponse, error) { + rsp, err := c.UserPhoneNumberGet(ctx, userID, phoneNumberID, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserPhoneNumberGetResponse(rsp) +} + +// ValidateEmailWithBodyWithResponse request with arbitrary body returning *ValidateEmailResponse +func (c *ClientWithResponses) ValidateEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidateEmailResponse, error) { + rsp, err := c.ValidateEmailWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseValidateEmailResponse(rsp) +} + +func (c *ClientWithResponses) ValidateEmailWithResponse(ctx context.Context, body ValidateEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidateEmailResponse, error) { + rsp, err := c.ValidateEmail(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseValidateEmailResponse(rsp) +} + +// ValidatePhoneNumberWithBodyWithResponse request with arbitrary body returning *ValidatePhoneNumberResponse +func (c *ClientWithResponses) ValidatePhoneNumberWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidatePhoneNumberResponse, error) { + rsp, err := c.ValidatePhoneNumberWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseValidatePhoneNumberResponse(rsp) +} + +func (c *ClientWithResponses) ValidatePhoneNumberWithResponse(ctx context.Context, body ValidatePhoneNumberJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidatePhoneNumberResponse, error) { + rsp, err := c.ValidatePhoneNumber(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseValidatePhoneNumberResponse(rsp) +} + +// WebAuthnAssociateStartWithBodyWithResponse request with arbitrary body returning *WebAuthnAssociateStartResponse +func (c *ClientWithResponses) WebAuthnAssociateStartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnAssociateStartResponse, error) { + rsp, err := c.WebAuthnAssociateStartWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnAssociateStartResponse(rsp) +} + +func (c *ClientWithResponses) WebAuthnAssociateStartWithResponse(ctx context.Context, body WebAuthnAssociateStartJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnAssociateStartResponse, error) { + rsp, err := c.WebAuthnAssociateStart(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnAssociateStartResponse(rsp) +} + +// WebAuthnAuthenticateFinishWithBodyWithResponse request with arbitrary body returning *WebAuthnAuthenticateFinishResponse +func (c *ClientWithResponses) WebAuthnAuthenticateFinishWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnAuthenticateFinishResponse, error) { + rsp, err := c.WebAuthnAuthenticateFinishWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnAuthenticateFinishResponse(rsp) +} + +func (c *ClientWithResponses) WebAuthnAuthenticateFinishWithResponse(ctx context.Context, body WebAuthnAuthenticateFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnAuthenticateFinishResponse, error) { + rsp, err := c.WebAuthnAuthenticateFinish(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnAuthenticateFinishResponse(rsp) +} + +// WebAuthnAuthenticateStartWithBodyWithResponse request with arbitrary body returning *WebAuthnAuthenticateStartResponse +func (c *ClientWithResponses) WebAuthnAuthenticateStartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnAuthenticateStartResponse, error) { + rsp, err := c.WebAuthnAuthenticateStartWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnAuthenticateStartResponse(rsp) +} + +func (c *ClientWithResponses) WebAuthnAuthenticateStartWithResponse(ctx context.Context, body WebAuthnAuthenticateStartJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnAuthenticateStartResponse, error) { + rsp, err := c.WebAuthnAuthenticateStart(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnAuthenticateStartResponse(rsp) +} + +// WebAuthnAuthenticatorUpdateWithBodyWithResponse request with arbitrary body returning *WebAuthnAuthenticatorUpdateResponse +func (c *ClientWithResponses) WebAuthnAuthenticatorUpdateWithBodyWithResponse(ctx context.Context, authenticatorID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnAuthenticatorUpdateResponse, error) { + rsp, err := c.WebAuthnAuthenticatorUpdateWithBody(ctx, authenticatorID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnAuthenticatorUpdateResponse(rsp) +} + +func (c *ClientWithResponses) WebAuthnAuthenticatorUpdateWithResponse(ctx context.Context, authenticatorID string, body WebAuthnAuthenticatorUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnAuthenticatorUpdateResponse, error) { + rsp, err := c.WebAuthnAuthenticatorUpdate(ctx, authenticatorID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnAuthenticatorUpdateResponse(rsp) +} + +// WebAuthnCredentialListWithResponse request returning *WebAuthnCredentialListResponse +func (c *ClientWithResponses) WebAuthnCredentialListWithResponse(ctx context.Context, params *WebAuthnCredentialListParams, reqEditors ...RequestEditorFn) (*WebAuthnCredentialListResponse, error) { + rsp, err := c.WebAuthnCredentialList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnCredentialListResponse(rsp) +} + +// WebAuthnCredentialExistsWithBodyWithResponse request with arbitrary body returning *WebAuthnCredentialExistsResponse +func (c *ClientWithResponses) WebAuthnCredentialExistsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnCredentialExistsResponse, error) { + rsp, err := c.WebAuthnCredentialExistsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnCredentialExistsResponse(rsp) +} + +func (c *ClientWithResponses) WebAuthnCredentialExistsWithResponse(ctx context.Context, body WebAuthnCredentialExistsJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnCredentialExistsResponse, error) { + rsp, err := c.WebAuthnCredentialExists(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnCredentialExistsResponse(rsp) +} + +// WebAuthnCredentialUpdateWithBodyWithResponse request with arbitrary body returning *WebAuthnCredentialUpdateResponse +func (c *ClientWithResponses) WebAuthnCredentialUpdateWithBodyWithResponse(ctx context.Context, credentialID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnCredentialUpdateResponse, error) { + rsp, err := c.WebAuthnCredentialUpdateWithBody(ctx, credentialID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnCredentialUpdateResponse(rsp) +} + +func (c *ClientWithResponses) WebAuthnCredentialUpdateWithResponse(ctx context.Context, credentialID string, body WebAuthnCredentialUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnCredentialUpdateResponse, error) { + rsp, err := c.WebAuthnCredentialUpdate(ctx, credentialID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnCredentialUpdateResponse(rsp) +} + +// WebAuthnMediationStartWithBodyWithResponse request with arbitrary body returning *WebAuthnMediationStartResponse +func (c *ClientWithResponses) WebAuthnMediationStartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnMediationStartResponse, error) { + rsp, err := c.WebAuthnMediationStartWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnMediationStartResponse(rsp) +} + +func (c *ClientWithResponses) WebAuthnMediationStartWithResponse(ctx context.Context, body WebAuthnMediationStartJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnMediationStartResponse, error) { + rsp, err := c.WebAuthnMediationStart(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnMediationStartResponse(rsp) +} + +// WebAuthnRegisterFinishWithBodyWithResponse request with arbitrary body returning *WebAuthnRegisterFinishResponse +func (c *ClientWithResponses) WebAuthnRegisterFinishWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnRegisterFinishResponse, error) { + rsp, err := c.WebAuthnRegisterFinishWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnRegisterFinishResponse(rsp) +} + +func (c *ClientWithResponses) WebAuthnRegisterFinishWithResponse(ctx context.Context, body WebAuthnRegisterFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnRegisterFinishResponse, error) { + rsp, err := c.WebAuthnRegisterFinish(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnRegisterFinishResponse(rsp) +} + +// WebAuthnRegisterStartWithBodyWithResponse request with arbitrary body returning *WebAuthnRegisterStartResponse +func (c *ClientWithResponses) WebAuthnRegisterStartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnRegisterStartResponse, error) { + rsp, err := c.WebAuthnRegisterStartWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnRegisterStartResponse(rsp) +} + +func (c *ClientWithResponses) WebAuthnRegisterStartWithResponse(ctx context.Context, body WebAuthnRegisterStartJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnRegisterStartResponse, error) { + rsp, err := c.WebAuthnRegisterStart(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnRegisterStartResponse(rsp) +} + +// WebAuthnSettingListWithResponse request returning *WebAuthnSettingListResponse +func (c *ClientWithResponses) WebAuthnSettingListWithResponse(ctx context.Context, params *WebAuthnSettingListParams, reqEditors ...RequestEditorFn) (*WebAuthnSettingListResponse, error) { + rsp, err := c.WebAuthnSettingList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnSettingListResponse(rsp) +} + +// WebAuthnSettingCreateWithBodyWithResponse request with arbitrary body returning *WebAuthnSettingCreateResponse +func (c *ClientWithResponses) WebAuthnSettingCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnSettingCreateResponse, error) { + rsp, err := c.WebAuthnSettingCreateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnSettingCreateResponse(rsp) +} + +func (c *ClientWithResponses) WebAuthnSettingCreateWithResponse(ctx context.Context, body WebAuthnSettingCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnSettingCreateResponse, error) { + rsp, err := c.WebAuthnSettingCreate(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnSettingCreateResponse(rsp) +} + +// WebAuthnSettingDeleteWithBodyWithResponse request with arbitrary body returning *WebAuthnSettingDeleteResponse +func (c *ClientWithResponses) WebAuthnSettingDeleteWithBodyWithResponse(ctx context.Context, settingID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnSettingDeleteResponse, error) { + rsp, err := c.WebAuthnSettingDeleteWithBody(ctx, settingID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnSettingDeleteResponse(rsp) +} + +func (c *ClientWithResponses) WebAuthnSettingDeleteWithResponse(ctx context.Context, settingID string, body WebAuthnSettingDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnSettingDeleteResponse, error) { + rsp, err := c.WebAuthnSettingDelete(ctx, settingID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnSettingDeleteResponse(rsp) +} + +// WebAuthnSettingGetWithResponse request returning *WebAuthnSettingGetResponse +func (c *ClientWithResponses) WebAuthnSettingGetWithResponse(ctx context.Context, settingID string, reqEditors ...RequestEditorFn) (*WebAuthnSettingGetResponse, error) { + rsp, err := c.WebAuthnSettingGet(ctx, settingID, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnSettingGetResponse(rsp) +} + +// WebAuthnSettingPutWithBodyWithResponse request with arbitrary body returning *WebAuthnSettingPutResponse +func (c *ClientWithResponses) WebAuthnSettingPutWithBodyWithResponse(ctx context.Context, settingID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*WebAuthnSettingPutResponse, error) { + rsp, err := c.WebAuthnSettingPutWithBody(ctx, settingID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnSettingPutResponse(rsp) +} + +func (c *ClientWithResponses) WebAuthnSettingPutWithResponse(ctx context.Context, settingID string, body WebAuthnSettingPutJSONRequestBody, reqEditors ...RequestEditorFn) (*WebAuthnSettingPutResponse, error) { + rsp, err := c.WebAuthnSettingPut(ctx, settingID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebAuthnSettingPutResponse(rsp) +} + +// WebhookLogsListWithResponse request returning *WebhookLogsListResponse +func (c *ClientWithResponses) WebhookLogsListWithResponse(ctx context.Context, params *WebhookLogsListParams, reqEditors ...RequestEditorFn) (*WebhookLogsListResponse, error) { + rsp, err := c.WebhookLogsList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseWebhookLogsListResponse(rsp) +} + +// ParseAndroidAppConfigGetResponse parses an HTTP response from a AndroidAppConfigGetWithResponse call +func ParseAndroidAppConfigGetResponse(rsp *http.Response) (*AndroidAppConfigGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AndroidAppConfigGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AndroidAppConfigListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseAndroidAppConfigCreateResponse parses an HTTP response from a AndroidAppConfigCreateWithResponse call +func ParseAndroidAppConfigCreateResponse(rsp *http.Response) (*AndroidAppConfigCreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AndroidAppConfigCreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AndroidAppConfigSaveRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseAndroidAppConfigDeleteResponse parses an HTTP response from a AndroidAppConfigDeleteWithResponse call +func ParseAndroidAppConfigDeleteResponse(rsp *http.Response) (*AndroidAppConfigDeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AndroidAppConfigDeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest N200 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseAndroidAppConfigPutResponse parses an HTTP response from a AndroidAppConfigPutWithResponse call +func ParseAndroidAppConfigPutResponse(rsp *http.Response) (*AndroidAppConfigPutResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AndroidAppConfigPutResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AndroidAppConfigUpdateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseAssociationTokenCreateResponse parses an HTTP response from a AssociationTokenCreateWithResponse call +func ParseAssociationTokenCreateResponse(rsp *http.Response) (*AssociationTokenCreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AssociationTokenCreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AssociationTokenCreateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseAuthMethodsListResponse parses an HTTP response from a AuthMethodsListWithResponse call +func ParseAuthMethodsListResponse(rsp *http.Response) (*AuthMethodsListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AuthMethodsListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AuthMethodsListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseAuthTokenValidateResponse parses an HTTP response from a AuthTokenValidateWithResponse call +func ParseAuthTokenValidateResponse(rsp *http.Response) (*AuthTokenValidateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AuthTokenValidateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AuthTokenValidateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseEmailCodeSendResponse parses an HTTP response from a EmailCodeSendWithResponse call +func ParseEmailCodeSendResponse(rsp *http.Response) (*EmailCodeSendResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &EmailCodeSendResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest EmailCodeSendRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseEmailCodeGetResponse parses an HTTP response from a EmailCodeGetWithResponse call +func ParseEmailCodeGetResponse(rsp *http.Response) (*EmailCodeGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &EmailCodeGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest EmailCodeGetRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseEmailCodeValidateResponse parses an HTTP response from a EmailCodeValidateWithResponse call +func ParseEmailCodeValidateResponse(rsp *http.Response) (*EmailCodeValidateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &EmailCodeValidateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest EmailCodeValidateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseEmailLinkSendResponse parses an HTTP response from a EmailLinkSendWithResponse call +func ParseEmailLinkSendResponse(rsp *http.Response) (*EmailLinkSendResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &EmailLinkSendResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest EmailLinkSendRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseEmailLinkDeleteResponse parses an HTTP response from a EmailLinkDeleteWithResponse call +func ParseEmailLinkDeleteResponse(rsp *http.Response) (*EmailLinkDeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &EmailLinkDeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest EmailLinkValidateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseEmailLinkGetResponse parses an HTTP response from a EmailLinkGetWithResponse call +func ParseEmailLinkGetResponse(rsp *http.Response) (*EmailLinkGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &EmailLinkGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest EmailLinkGetRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseEmailLinkValidateResponse parses an HTTP response from a EmailLinkValidateWithResponse call +func ParseEmailLinkValidateResponse(rsp *http.Response) (*EmailLinkValidateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &EmailLinkValidateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest EmailLinkValidateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseEmailTemplateCreateResponse parses an HTTP response from a EmailTemplateCreateWithResponse call +func ParseEmailTemplateCreateResponse(rsp *http.Response) (*EmailTemplateCreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &EmailTemplateCreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest EmailTemplateCreateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseEmailTemplateDeleteResponse parses an HTTP response from a EmailTemplateDeleteWithResponse call +func ParseEmailTemplateDeleteResponse(rsp *http.Response) (*EmailTemplateDeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &EmailTemplateDeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest N200 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseExampleGetResponse parses an HTTP response from a ExampleGetWithResponse call +func ParseExampleGetResponse(rsp *http.Response) (*ExampleGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ExampleGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ExampleGetRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseIOSAppConfigGetResponse parses an HTTP response from a IOSAppConfigGetWithResponse call +func ParseIOSAppConfigGetResponse(rsp *http.Response) (*IOSAppConfigGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &IOSAppConfigGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest IOSAppConfigListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseIOSAppConfigCreateResponse parses an HTTP response from a IOSAppConfigCreateWithResponse call +func ParseIOSAppConfigCreateResponse(rsp *http.Response) (*IOSAppConfigCreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &IOSAppConfigCreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest IOSAppConfigSaveRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseIOSAppConfigDeleteResponse parses an HTTP response from a IOSAppConfigDeleteWithResponse call +func ParseIOSAppConfigDeleteResponse(rsp *http.Response) (*IOSAppConfigDeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &IOSAppConfigDeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest N200 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseIOSAppConfigPutResponse parses an HTTP response from a IOSAppConfigPutWithResponse call +func ParseIOSAppConfigPutResponse(rsp *http.Response) (*IOSAppConfigPutResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &IOSAppConfigPutResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest IOSAppConfigUpdateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseLongSessionListResponse parses an HTTP response from a LongSessionListWithResponse call +func ParseLongSessionListResponse(rsp *http.Response) (*LongSessionListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &LongSessionListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest LongSessionListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseLongSessionGetResponse parses an HTTP response from a LongSessionGetWithResponse call +func ParseLongSessionGetResponse(rsp *http.Response) (*LongSessionGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &LongSessionGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest LongSessionGetRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseLongSessionRevokeResponse parses an HTTP response from a LongSessionRevokeWithResponse call +func ParseLongSessionRevokeResponse(rsp *http.Response) (*LongSessionRevokeResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &LongSessionRevokeResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest N200 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseOriginAllowedResponse parses an HTTP response from a OriginAllowedWithResponse call +func ParseOriginAllowedResponse(rsp *http.Response) (*OriginAllowedResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &OriginAllowedResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest OriginAllowedRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseProjectConfigGetResponse parses an HTTP response from a ProjectConfigGetWithResponse call +func ParseProjectConfigGetResponse(rsp *http.Response) (*ProjectConfigGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ProjectConfigGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ProjectConfigGetRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseProjectConfigSaveResponse parses an HTTP response from a ProjectConfigSaveWithResponse call +func ParseProjectConfigSaveResponse(rsp *http.Response) (*ProjectConfigSaveResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ProjectConfigSaveResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest externalRef0.GenericRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseProjectConfigWebhookTestResponse parses an HTTP response from a ProjectConfigWebhookTestWithResponse call +func ParseProjectConfigWebhookTestResponse(rsp *http.Response) (*ProjectConfigWebhookTestResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ProjectConfigWebhookTestResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ProjectConfigWebhookTestRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseProjectSecretListResponse parses an HTTP response from a ProjectSecretListWithResponse call +func ParseProjectSecretListResponse(rsp *http.Response) (*ProjectSecretListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ProjectSecretListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ProjectSecretListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseProjectSecretCreateResponse parses an HTTP response from a ProjectSecretCreateWithResponse call +func ParseProjectSecretCreateResponse(rsp *http.Response) (*ProjectSecretCreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ProjectSecretCreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ProjectSecretCreateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseProjectSecretDeleteResponse parses an HTTP response from a ProjectSecretDeleteWithResponse call +func ParseProjectSecretDeleteResponse(rsp *http.Response) (*ProjectSecretDeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ProjectSecretDeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest N200 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseProjectActivateResponse parses an HTTP response from a ProjectActivateWithResponse call +func ParseProjectActivateResponse(rsp *http.Response) (*ProjectActivateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ProjectActivateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest N200 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseRequestLogsListResponse parses an HTTP response from a RequestLogsListWithResponse call +func ParseRequestLogsListResponse(rsp *http.Response) (*RequestLogsListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &RequestLogsListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest RequestLogsListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseRequestLogGetResponse parses an HTTP response from a RequestLogGetWithResponse call +func ParseRequestLogGetResponse(rsp *http.Response) (*RequestLogGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &RequestLogGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest RequestLogGetRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseSessionConfigGetResponse parses an HTTP response from a SessionConfigGetWithResponse call +func ParseSessionConfigGetResponse(rsp *http.Response) (*SessionConfigGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SessionConfigGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SessionConfigGetRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseSessionConfigUpdateResponse parses an HTTP response from a SessionConfigUpdateWithResponse call +func ParseSessionConfigUpdateResponse(rsp *http.Response) (*SessionConfigUpdateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SessionConfigUpdateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest externalRef0.GenericRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseSessionTokenCreateResponse parses an HTTP response from a SessionTokenCreateWithResponse call +func ParseSessionTokenCreateResponse(rsp *http.Response) (*SessionTokenCreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SessionTokenCreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SessionTokenCreateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseSessionTokenVerifyResponse parses an HTTP response from a SessionTokenVerifyWithResponse call +func ParseSessionTokenVerifyResponse(rsp *http.Response) (*SessionTokenVerifyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SessionTokenVerifyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SessionTokenVerifyRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseSmsCodeSendResponse parses an HTTP response from a SmsCodeSendWithResponse call +func ParseSmsCodeSendResponse(rsp *http.Response) (*SmsCodeSendResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SmsCodeSendResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SmsCodeSendRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseSmsCodeValidateResponse parses an HTTP response from a SmsCodeValidateWithResponse call +func ParseSmsCodeValidateResponse(rsp *http.Response) (*SmsCodeValidateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SmsCodeValidateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SmsCodeValidateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseSmsTemplateCreateResponse parses an HTTP response from a SmsTemplateCreateWithResponse call +func ParseSmsTemplateCreateResponse(rsp *http.Response) (*SmsTemplateCreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SmsTemplateCreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SmsTemplateCreateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseSmsTemplateDeleteResponse parses an HTTP response from a SmsTemplateDeleteWithResponse call +func ParseSmsTemplateDeleteResponse(rsp *http.Response) (*SmsTemplateDeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SmsTemplateDeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest N200 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseTrackingAllRequestResponse parses an HTTP response from a TrackingAllRequestWithResponse call +func ParseTrackingAllRequestResponse(rsp *http.Response) (*TrackingAllRequestResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &TrackingAllRequestResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TrackingRawListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseTrackingBackupStateGetResponse parses an HTTP response from a TrackingBackupStateGetWithResponse call +func ParseTrackingBackupStateGetResponse(rsp *http.Response) (*TrackingBackupStateGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &TrackingBackupStateGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TrackingBackupStateGetRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseTrackingBrowserStatsListResponse parses an HTTP response from a TrackingBrowserStatsListWithResponse call +func ParseTrackingBrowserStatsListResponse(rsp *http.Response) (*TrackingBrowserStatsListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &TrackingBrowserStatsListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TrackingBrowserStatsListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseTrackingBrowserDetailedStatsListResponse parses an HTTP response from a TrackingBrowserDetailedStatsListWithResponse call +func ParseTrackingBrowserDetailedStatsListResponse(rsp *http.Response) (*TrackingBrowserDetailedStatsListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &TrackingBrowserDetailedStatsListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TrackingBrowserDetailedStatsListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseTrackingEnumsGetResponse parses an HTTP response from a TrackingEnumsGetWithResponse call +func ParseTrackingEnumsGetResponse(rsp *http.Response) (*TrackingEnumsGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &TrackingEnumsGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TrackingEnumsGetRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseTrackingOSStatsListResponse parses an HTTP response from a TrackingOSStatsListWithResponse call +func ParseTrackingOSStatsListResponse(rsp *http.Response) (*TrackingOSStatsListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &TrackingOSStatsListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TrackingOSStatsListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseTrackingOSDetailedStatsListResponse parses an HTTP response from a TrackingOSDetailedStatsListWithResponse call +func ParseTrackingOSDetailedStatsListResponse(rsp *http.Response) (*TrackingOSDetailedStatsListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &TrackingOSDetailedStatsListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TrackingOSDetailedStatsListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseTrackingStatsListResponse parses an HTTP response from a TrackingStatsListWithResponse call +func ParseTrackingStatsListResponse(rsp *http.Response) (*TrackingStatsListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &TrackingStatsListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TrackingStatsListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseTrackingDetailedStatsListResponse parses an HTTP response from a TrackingDetailedStatsListWithResponse call +func ParseTrackingDetailedStatsListResponse(rsp *http.Response) (*TrackingDetailedStatsListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &TrackingDetailedStatsListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TrackingDetailedStatsListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUserAuthLogListResponse parses an HTTP response from a UserAuthLogListWithResponse call +func ParseUserAuthLogListResponse(rsp *http.Response) (*UserAuthLogListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserAuthLogListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UserAuthLogListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseUserListResponse parses an HTTP response from a UserListWithResponse call +func ParseUserListResponse(rsp *http.Response) (*UserListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UserListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseUserCreateResponse parses an HTTP response from a UserCreateWithResponse call +func ParseUserCreateResponse(rsp *http.Response) (*UserCreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserCreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UserCreateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseUserStatsListResponse parses an HTTP response from a UserStatsListWithResponse call +func ParseUserStatsListResponse(rsp *http.Response) (*UserStatsListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserStatsListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UserStatsListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUserDeleteResponse parses an HTTP response from a UserDeleteWithResponse call +func ParseUserDeleteResponse(rsp *http.Response) (*UserDeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserDeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest N200 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseUserGetResponse parses an HTTP response from a UserGetWithResponse call +func ParseUserGetResponse(rsp *http.Response) (*UserGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UserGetRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseUserUpdateResponse parses an HTTP response from a UserUpdateWithResponse call +func ParseUserUpdateResponse(rsp *http.Response) (*UserUpdateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserUpdateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UserUpdateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnCredentialDeleteResponse parses an HTTP response from a WebAuthnCredentialDeleteWithResponse call +func ParseWebAuthnCredentialDeleteResponse(rsp *http.Response) (*WebAuthnCredentialDeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnCredentialDeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest N200 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseUserCustomLoginIdentifierCreateResponse parses an HTTP response from a UserCustomLoginIdentifierCreateWithResponse call +func ParseUserCustomLoginIdentifierCreateResponse(rsp *http.Response) (*UserCustomLoginIdentifierCreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserCustomLoginIdentifierCreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UserCustomLoginIdentifierCreateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseUserCustomLoginIdentifierDeleteResponse parses an HTTP response from a UserCustomLoginIdentifierDeleteWithResponse call +func ParseUserCustomLoginIdentifierDeleteResponse(rsp *http.Response) (*UserCustomLoginIdentifierDeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserCustomLoginIdentifierDeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest N200 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseUserCustomLoginIdentifierGetResponse parses an HTTP response from a UserCustomLoginIdentifierGetWithResponse call +func ParseUserCustomLoginIdentifierGetResponse(rsp *http.Response) (*UserCustomLoginIdentifierGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserCustomLoginIdentifierGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UserCustomLoginIdentifierGetRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseUserDeviceListResponse parses an HTTP response from a UserDeviceListWithResponse call +func ParseUserDeviceListResponse(rsp *http.Response) (*UserDeviceListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserDeviceListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UserDeviceListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUserEmailCreateResponse parses an HTTP response from a UserEmailCreateWithResponse call +func ParseUserEmailCreateResponse(rsp *http.Response) (*UserEmailCreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserEmailCreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UserEmailCreateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseUserEmailDeleteResponse parses an HTTP response from a UserEmailDeleteWithResponse call +func ParseUserEmailDeleteResponse(rsp *http.Response) (*UserEmailDeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserEmailDeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest N200 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseUserEmailGetResponse parses an HTTP response from a UserEmailGetWithResponse call +func ParseUserEmailGetResponse(rsp *http.Response) (*UserEmailGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserEmailGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UserEmailGetRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseUserPhoneNumberCreateResponse parses an HTTP response from a UserPhoneNumberCreateWithResponse call +func ParseUserPhoneNumberCreateResponse(rsp *http.Response) (*UserPhoneNumberCreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserPhoneNumberCreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UserPhoneNumberCreateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseUserPhoneNumberDeleteResponse parses an HTTP response from a UserPhoneNumberDeleteWithResponse call +func ParseUserPhoneNumberDeleteResponse(rsp *http.Response) (*UserPhoneNumberDeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserPhoneNumberDeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest N200 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseUserPhoneNumberGetResponse parses an HTTP response from a UserPhoneNumberGetWithResponse call +func ParseUserPhoneNumberGetResponse(rsp *http.Response) (*UserPhoneNumberGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserPhoneNumberGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UserPhoneNumberGetRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseValidateEmailResponse parses an HTTP response from a ValidateEmailWithResponse call +func ParseValidateEmailResponse(rsp *http.Response) (*ValidateEmailResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ValidateEmailResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ValidateEmailRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseValidatePhoneNumberResponse parses an HTTP response from a ValidatePhoneNumberWithResponse call +func ParseValidatePhoneNumberResponse(rsp *http.Response) (*ValidatePhoneNumberResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ValidatePhoneNumberResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ValidatePhoneNumberRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnAssociateStartResponse parses an HTTP response from a WebAuthnAssociateStartWithResponse call +func ParseWebAuthnAssociateStartResponse(rsp *http.Response) (*WebAuthnAssociateStartResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnAssociateStartResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest WebAuthnAssociateStartRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnAuthenticateFinishResponse parses an HTTP response from a WebAuthnAuthenticateFinishWithResponse call +func ParseWebAuthnAuthenticateFinishResponse(rsp *http.Response) (*WebAuthnAuthenticateFinishResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnAuthenticateFinishResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest WebAuthnAuthenticateFinishRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnAuthenticateStartResponse parses an HTTP response from a WebAuthnAuthenticateStartWithResponse call +func ParseWebAuthnAuthenticateStartResponse(rsp *http.Response) (*WebAuthnAuthenticateStartResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnAuthenticateStartResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest WebAuthnAuthenticateStartRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnAuthenticatorUpdateResponse parses an HTTP response from a WebAuthnAuthenticatorUpdateWithResponse call +func ParseWebAuthnAuthenticatorUpdateResponse(rsp *http.Response) (*WebAuthnAuthenticatorUpdateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnAuthenticatorUpdateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest N200 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnCredentialListResponse parses an HTTP response from a WebAuthnCredentialListWithResponse call +func ParseWebAuthnCredentialListResponse(rsp *http.Response) (*WebAuthnCredentialListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnCredentialListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest WebAuthnCredentialListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnCredentialExistsResponse parses an HTTP response from a WebAuthnCredentialExistsWithResponse call +func ParseWebAuthnCredentialExistsResponse(rsp *http.Response) (*WebAuthnCredentialExistsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnCredentialExistsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest WebAuthnCredentialExistsRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnCredentialUpdateResponse parses an HTTP response from a WebAuthnCredentialUpdateWithResponse call +func ParseWebAuthnCredentialUpdateResponse(rsp *http.Response) (*WebAuthnCredentialUpdateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnCredentialUpdateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest WebAuthnCredentialRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnMediationStartResponse parses an HTTP response from a WebAuthnMediationStartWithResponse call +func ParseWebAuthnMediationStartResponse(rsp *http.Response) (*WebAuthnMediationStartResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnMediationStartResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest WebAuthnMediationStartRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnRegisterFinishResponse parses an HTTP response from a WebAuthnRegisterFinishWithResponse call +func ParseWebAuthnRegisterFinishResponse(rsp *http.Response) (*WebAuthnRegisterFinishResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnRegisterFinishResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest WebAuthnRegisterFinishRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnRegisterStartResponse parses an HTTP response from a WebAuthnRegisterStartWithResponse call +func ParseWebAuthnRegisterStartResponse(rsp *http.Response) (*WebAuthnRegisterStartResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnRegisterStartResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest WebAuthnRegisterStartRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnSettingListResponse parses an HTTP response from a WebAuthnSettingListWithResponse call +func ParseWebAuthnSettingListResponse(rsp *http.Response) (*WebAuthnSettingListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnSettingListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest WebauthnSettingListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnSettingCreateResponse parses an HTTP response from a WebAuthnSettingCreateWithResponse call +func ParseWebAuthnSettingCreateResponse(rsp *http.Response) (*WebAuthnSettingCreateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnSettingCreateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest WebauthnSettingCreateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnSettingDeleteResponse parses an HTTP response from a WebAuthnSettingDeleteWithResponse call +func ParseWebAuthnSettingDeleteResponse(rsp *http.Response) (*WebAuthnSettingDeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnSettingDeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest N200 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnSettingGetResponse parses an HTTP response from a WebAuthnSettingGetWithResponse call +func ParseWebAuthnSettingGetResponse(rsp *http.Response) (*WebAuthnSettingGetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnSettingGetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest WebauthnSettingGetRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebAuthnSettingPutResponse parses an HTTP response from a WebAuthnSettingPutWithResponse call +func ParseWebAuthnSettingPutResponse(rsp *http.Response) (*WebAuthnSettingPutResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebAuthnSettingPutResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest WebauthnSettingUpdateRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseWebhookLogsListResponse parses an HTTP response from a WebhookLogsListWithResponse call +func ParseWebhookLogsListResponse(rsp *http.Response) (*WebhookLogsListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WebhookLogsListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest WebhookLogsListRsp + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} diff --git a/pkg/sdk/entity/claims.go b/pkg/sdk/entity/claims.go new file mode 100644 index 0000000..36edd09 --- /dev/null +++ b/pkg/sdk/entity/claims.go @@ -0,0 +1,12 @@ +package entity + +import "github.com/golang-jwt/jwt/v4" + +type Claims struct { + jwt.RegisteredClaims + Name string `json:"name,omitempty"` + Orig string `json:"orig,omitempty"` + Email string `json:"email,omitempty"` + PhoneNumber string `json:"phone_number,omitempty"` + Version int `json:"version,omitempty"` +} diff --git a/pkg/sdk/entity/common/common.gen.go b/pkg/sdk/entity/common/common.gen.go new file mode 100644 index 0000000..023dd3b --- /dev/null +++ b/pkg/sdk/entity/common/common.gen.go @@ -0,0 +1,303 @@ +// Package common provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.0 DO NOT EDIT. +package common + +const ( + ProjectIDScopes = "projectID.Scopes" +) + +// Defines values for AuthMethod. +const ( + AuthMethodEmail AuthMethod = "email" + AuthMethodPassword AuthMethod = "password" + AuthMethodPhoneNumber AuthMethod = "phone_number" + AuthMethodWebauthn AuthMethod = "webauthn" +) + +// Defines values for LoginIdentifierType. +const ( + LoginIdentifierTypeCustom LoginIdentifierType = "custom" + LoginIdentifierTypeEmail LoginIdentifierType = "email" + LoginIdentifierTypePhoneNumber LoginIdentifierType = "phone_number" +) + +// Defines values for Status. +const ( + StatusActive Status = "active" + StatusDeleted Status = "deleted" + StatusPending Status = "pending" +) + +// ID generic ID +type ID = string + +// AdditionalPayload Additional payload in JSON format +type AdditionalPayload = string + +// AllTypes defines model for allTypes. +type AllTypes struct { + P1 *Paging `json:"p1,omitempty"` + + // P10 Timestamp of when the entity was deleted in yyyy-MM-dd'T'HH:mm:ss format + P10 *Deleted `json:"p10,omitempty"` + + // P11 ID of the device + P11 *DeviceID `json:"p11,omitempty"` + + // P12 Additional payload in JSON format + P12 *AdditionalPayload `json:"p12,omitempty"` + + // P13 Generic status that can describe Corbado entities + P13 *Status `json:"p13,omitempty"` + + // P14 ID of project + P14 *ProjectID `json:"p14,omitempty"` + + // P15 Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + P15 *RequestID `json:"p15,omitempty"` + P16 *ErrorRsp `json:"p16,omitempty"` + P17 *AuthMethods `json:"p17,omitempty"` + + // P18 User entry with emails and phone numbers + P18 *FullUser `json:"p18,omitempty"` + + // P19 Login Identifier type + P19 *LoginIdentifierType `json:"p19,omitempty"` + P2 *ClientInfo `json:"p2,omitempty"` + + // P20 ID of the email OTP + P20 *EmailCodeID `json:"p20,omitempty"` + + // P3 generic ID + P3 *ID `json:"p3,omitempty"` + + // P4 ID of the user + P4 *UserID `json:"p4,omitempty"` + + // P5 ID of the email + P5 *EmailID `json:"p5,omitempty"` + + // P6 ID of the email magic link + P6 *EmailLinkID `json:"p6,omitempty"` + + // P7 ID of the phone number + P7 *PhoneNumberID `json:"p7,omitempty"` + + // P8 Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + P8 *Created `json:"p8,omitempty"` + + // P9 Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + P9 *Updated `json:"p9,omitempty"` +} + +// AuthMethod Authentication methods +type AuthMethod string + +// AuthMethods defines model for authMethods. +type AuthMethods = []AuthMethod + +// ClientInfo defines model for clientInfo. +type ClientInfo struct { + // RemoteAddress client's IP address + RemoteAddress string `json:"remoteAddress"` + + // UserAgent client's User Agent + UserAgent string `json:"userAgent"` +} + +// Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format +type Created = string + +// Deleted Timestamp of when the entity was deleted in yyyy-MM-dd'T'HH:mm:ss format +type Deleted = string + +// DeviceID ID of the device +type DeviceID = string + +// EmailCodeID ID of the email OTP +type EmailCodeID = string + +// EmailID ID of the email +type EmailID = string + +// EmailLinkID ID of the email magic link +type EmailLinkID = string + +// ErrorRsp defines model for errorRsp. +type ErrorRsp struct { + Error struct { + // Details Details of error + Details *string `json:"details,omitempty"` + + // Links Additional links to help understand the error + Links []string `json:"links"` + + // Type Type of error + Type string `json:"type"` + + // Validation Validation errors per field + Validation *[]struct { + Field string `json:"field"` + Message string `json:"message"` + } `json:"validation,omitempty"` + } `json:"error"` + + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// FullUser User entry with emails and phone numbers +type FullUser struct { + // ID ID of the user + ID UserID `json:"ID"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created Created `json:"created"` + Emails []UserEmail `json:"emails"` + FullName string `json:"fullName"` + Name string `json:"name"` + PhoneNumbers []UserPhoneNumber `json:"phoneNumbers"` + + // Status Generic status that can describe Corbado entities + Status Status `json:"status"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated Updated `json:"updated"` +} + +// GenericRsp defines model for genericRsp. +type GenericRsp struct { + // HttpStatusCode HTTP status code of operation + HttpStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + + // RequestData Data about the request itself, can be used for debugging + RequestData RequestData `json:"requestData"` + + // Runtime Runtime in seconds for this request + Runtime float32 `json:"runtime"` +} + +// LoginIdentifierType Login Identifier type +type LoginIdentifierType string + +// Paging defines model for paging. +type Paging struct { + // Page current page returned in response + Page int `json:"page"` + + // TotalItems total number of items available + TotalItems int `json:"totalItems"` + + // TotalPages total number of pages available + TotalPages int `json:"totalPages"` +} + +// PhoneNumberID ID of the phone number +type PhoneNumberID = string + +// ProjectID ID of project +type ProjectID = string + +// RequestData Data about the request itself, can be used for debugging +type RequestData struct { + // Link Link to dashboard with details about request + Link string `json:"link"` + + // RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + RequestID RequestID `json:"requestID"` +} + +// RequestID Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side +type RequestID = string + +// Status Generic status that can describe Corbado entities +type Status string + +// Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format +type Updated = string + +// UserEmail User's email +type UserEmail struct { + // ID generic ID + ID ID `json:"ID"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created Created `json:"created"` + Email string `json:"email"` + + // Status Generic status that can describe Corbado entities + Status Status `json:"status"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated Updated `json:"updated"` +} + +// UserID ID of the user +type UserID = string + +// UserPhoneNumber User's phone number +type UserPhoneNumber struct { + // ID generic ID + ID ID `json:"ID"` + + // Created Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + Created Created `json:"created"` + PhoneNumber string `json:"phoneNumber"` + + // Status Generic status that can describe Corbado entities + Status Status `json:"status"` + + // Updated Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + Updated Updated `json:"updated"` +} + +// Filter defines model for filter. +type Filter = []string + +// Page defines model for page. +type Page = int + +// PageSize defines model for pageSize. +type PageSize = int + +// RemoteAddress defines model for remoteAddress. +type RemoteAddress = string + +// SessionID defines model for sessionID. +type SessionID = string + +// Sort defines model for sort. +type Sort = string + +// UserAgent defines model for userAgent. +type UserAgent = string + +// UnusedParams defines parameters for Unused. +type UnusedParams struct { + // RemoteAddress Client's remote address + RemoteAddress *RemoteAddress `form:"remoteAddress,omitempty" json:"remoteAddress,omitempty"` + + // UserAgent Client's user agent + UserAgent *UserAgent `form:"userAgent,omitempty" json:"userAgent,omitempty"` + + // Sort Field sorting + Sort *Sort `form:"sort,omitempty" json:"sort,omitempty"` + + // Filter Field filtering + Filter *Filter `form:"filter[],omitempty" json:"filter[],omitempty"` + + // Page Page number + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PageSize Number of items per page + PageSize *PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` +} diff --git a/pkg/sdk/entity/user.go b/pkg/sdk/entity/user.go new file mode 100644 index 0000000..8a88df5 --- /dev/null +++ b/pkg/sdk/entity/user.go @@ -0,0 +1,17 @@ +package entity + +type User struct { + Authenticated bool + + ID string + Name string + Email string + PhoneNumber string +} + +// NewGuestUser returns unauthenticated "guest" user +func NewGuestUser() *User { + return &User{ + Authenticated: false, + } +} diff --git a/pkg/sdk/servererror/servererror.go b/pkg/sdk/servererror/servererror.go new file mode 100644 index 0000000..262be02 --- /dev/null +++ b/pkg/sdk/servererror/servererror.go @@ -0,0 +1,76 @@ +package servererror + +import ( + "fmt" + "strings" + + "github.com/corbado/corbado-go/pkg/sdk/entity/common" +) + +type ValidationErrors = []struct { + Field string `json:"field"` + Message string `json:"message"` +} + +type ServerError struct { + Details *string `json:"details,omitempty"` + Links []string `json:"links"` + Type string `json:"type"` + Validation *ValidationErrors + + HTTPStatusCode int32 `json:"httpStatusCode"` + Message string `json:"message"` + RequestData common.RequestData `json:"requestData"` + Runtime float32 `json:"runtime"` +} + +// New wraps an error response into a ServerError +func New(cause *common.ErrorRsp) *ServerError { + if cause == nil { + return nil + } + + return &ServerError{ + Details: cause.Error.Details, + Links: cause.Error.Links, + Type: cause.Error.Type, + Validation: cause.Error.Validation, + + HTTPStatusCode: cause.HttpStatusCode, + Message: cause.Message, + RequestData: cause.RequestData, + Runtime: cause.Runtime, + } +} + +// Error implements error interface +func (s *ServerError) Error() string { + msg := fmt.Sprintf("[%d %s]", s.HTTPStatusCode, s.Message) + + validation := GetValidationMessage(s.Validation) + if validation != "" { + msg = fmt.Sprintf("%s %s", msg, validation) + } + + if s.Details != nil && *s.Details != "" { + msg = fmt.Sprintf("%s (details=%s)", msg, *s.Details) + } + + msg = fmt.Sprintf("%s (requestID=%s, type=%s)", msg, s.RequestData.RequestID, s.Type) + + return msg +} + +// GetValidationMessage extracts validation message from validation error +func GetValidationMessage(v *ValidationErrors) string { + if v == nil || len(*v) == 0 { + return "" + } + + fieldMessages := make([]string, len(*v)) + for i, validation := range *v { + fieldMessages[i] = fmt.Sprintf("%s: %s", validation.Field, validation.Message) + } + + return strings.Join(fieldMessages, "; ") +} diff --git a/pkg/sdk/session/session.go b/pkg/sdk/session/session.go new file mode 100644 index 0000000..cee1380 --- /dev/null +++ b/pkg/sdk/session/session.go @@ -0,0 +1,127 @@ +package session + +import ( + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + + "github.com/MicahParks/keyfunc" + "github.com/corbado/corbado-go/pkg/sdk/assert" + "github.com/corbado/corbado-go/pkg/sdk/entity" + "github.com/corbado/corbado-go/pkg/sdk/entity/api" + "github.com/golang-jwt/jwt/v4" + "github.com/pkg/errors" +) + +type Session interface { + ValidateShortSessionValue(shortSession string) (*entity.User, error) + GetCurrentUser(shortSession string) (*entity.User, error) +} + +type Impl struct { + client *api.ClientWithResponses + + projectID string + frontendAPI string + shortSessionCookieName string + issuer string +} + +var _ Session = &Impl{} + +// New returns new user client +func New(client *api.ClientWithResponses, projectID string, frontendAPI string, shortSessionCookieName string, issuer string) (*Impl, error) { + if err := assert.NotNil(client); err != nil { + return nil, err + } + + if err := assert.StringNotEmpty(projectID); err != nil { + return nil, err + } + + if err := assert.StringNotEmpty(frontendAPI); err != nil { + return nil, err + } + + if err := assert.StringNotEmpty(shortSessionCookieName); err != nil { + return nil, err + } + + return &Impl{ + client: client, + projectID: projectID, + frontendAPI: frontendAPI, + shortSessionCookieName: shortSessionCookieName, + issuer: issuer, + }, nil +} + +func (i *Impl) ValidateShortSessionValue(shortSession string) (*entity.User, error) { + if shortSession == "" { + return nil, nil + } + + jwks, err := keyfunc.Get(fmt.Sprintf("%s/.well-known/jwks", i.frontendAPI), keyfunc.Options{ + RequestFactory: func(ctx context.Context, urlAddress string) (*http.Request, error) { + address, err := url.Parse(urlAddress) + if err != nil { + return nil, errors.WithStack(err) + } + + req := &http.Request{ + Method: http.MethodGet, + URL: address, + Header: map[string][]string{ + "X-Corbado-ProjectID": {i.projectID}, + }, + } + + return req, nil + }, + ResponseExtractor: func(ctx context.Context, resp *http.Response) (json.RawMessage, error) { + rspBody, err := io.ReadAll(resp.Body) + if err != nil { + return nil, err + } + + return rspBody, nil + }, + }) + if err != nil { + return nil, errors.WithStack(err) + } + + token, err := jwt.ParseWithClaims(shortSession, &entity.Claims{}, jwks.Keyfunc) + if err != nil { + return nil, errors.WithStack(err) + } + + claims := token.Claims.(*entity.Claims) + if i.issuer != "" && claims.Issuer != i.issuer { + return nil, errors.Errorf("JWT issuer mismatch (configured for Frontend API: '%s', actual JWT: '%s')", i.issuer, claims.Issuer) + } + + return &entity.User{ + Authenticated: true, + ID: claims.Subject, + Name: claims.Name, + Email: claims.Email, + PhoneNumber: claims.PhoneNumber, + }, nil +} + +func (i *Impl) GetCurrentUser(shortSession string) (*entity.User, error) { + usr, err := i.ValidateShortSessionValue(shortSession) + if err != nil { + return nil, err + } + + if usr != nil { + return usr, nil + } + + return entity.NewGuestUser(), nil +} diff --git a/pkg/sdk/user/user.go b/pkg/sdk/user/user.go new file mode 100644 index 0000000..bbc044b --- /dev/null +++ b/pkg/sdk/user/user.go @@ -0,0 +1,60 @@ +package user + +import ( + "context" + + "github.com/corbado/corbado-go/pkg/sdk/assert" + "github.com/corbado/corbado-go/pkg/sdk/entity/api" + "github.com/corbado/corbado-go/pkg/sdk/entity/common" + "github.com/corbado/corbado-go/pkg/sdk/servererror" +) + +type User interface { + List(ctx context.Context, params *api.UserListParams, editors ...api.RequestEditorFn) (*api.UserListRsp, error) + Update(ctx context.Context, userID common.UserID, req api.UserUpdateReq, editors ...api.RequestEditorFn) (*api.UserUpdateRsp, error) +} + +type Impl struct { + client *api.ClientWithResponses +} + +var _ User = &Impl{} + +// New returns new user client +func New(client *api.ClientWithResponses) (*Impl, error) { + if err := assert.NotNil(client); err != nil { + return nil, err + } + + return &Impl{ + client: client, + }, nil +} + +// List lists project users +func (i *Impl) List(ctx context.Context, params *api.UserListParams, editors ...api.RequestEditorFn) (*api.UserListRsp, error) { + res, err := i.client.UserListWithResponse(ctx, params, editors...) + if err != nil { + return nil, err + } + + if res.JSONDefault != nil { + return nil, servererror.New(res.JSONDefault) + } + + return res.JSON200, nil +} + +// Update updates user +func (i *Impl) Update(ctx context.Context, userID common.UserID, req api.UserUpdateReq, editors ...api.RequestEditorFn) (*api.UserUpdateRsp, error) { + res, err := i.client.UserUpdateWithResponse(ctx, userID, req, editors...) + if err != nil { + return nil, err + } + + if res.JSONDefault != nil { + return nil, servererror.New(res.JSONDefault) + } + + return res.JSON200, nil +} diff --git a/pkg/sdk/util/util.go b/pkg/sdk/util/util.go new file mode 100644 index 0000000..75643e8 --- /dev/null +++ b/pkg/sdk/util/util.go @@ -0,0 +1,27 @@ +package util + +import ( + "github.com/corbado/corbado-go/pkg/sdk/entity/common" +) + +// Ptr returns a pointer to provided value +func Ptr[T any](v T) *T { + return &v +} + +// RequestID creates an optional Request ID +func RequestID(requestID string) *common.RequestID { + if requestID != "" { + return Ptr(requestID) + } + + return nil +} + +func ClientInfo(userAgent string, remoteAddress string) *common.ClientInfo { + if userAgent == "" && remoteAddress == "" { + return nil + } + + return &common.ClientInfo{RemoteAddress: remoteAddress, UserAgent: userAgent} +} diff --git a/pkg/sdk/validation/validation.go b/pkg/sdk/validation/validation.go new file mode 100644 index 0000000..d2e24da --- /dev/null +++ b/pkg/sdk/validation/validation.go @@ -0,0 +1,59 @@ +package validation + +import ( + "context" + + "github.com/corbado/corbado-go/pkg/sdk/assert" + "github.com/corbado/corbado-go/pkg/sdk/entity/api" + "github.com/corbado/corbado-go/pkg/sdk/servererror" +) + +type Validation interface { + ValidateEmail(ctx context.Context, req api.ValidateEmailReq, editors ...api.RequestEditorFn) (*api.ValidateEmailRsp, error) + ValidatePhoneNumber(ctx context.Context, req api.ValidatePhoneNumberReq, editors ...api.RequestEditorFn) (*api.ValidatePhoneNumberRsp, error) +} + +type Impl struct { + client *api.ClientWithResponses +} + +var _ Validation = &Impl{} + +// New returns new email link client +func New(client *api.ClientWithResponses) (*Impl, error) { + if err := assert.NotNil(client); err != nil { + return nil, err + } + + return &Impl{ + client: client, + }, nil +} + +// ValidateEmail validates provided email address with optional additional checks +func (i *Impl) ValidateEmail(ctx context.Context, req api.ValidateEmailReq, editors ...api.RequestEditorFn) (*api.ValidateEmailRsp, error) { + res, err := i.client.ValidateEmailWithResponse(ctx, req, editors...) + if err != nil { + return nil, err + } + + if res.JSONDefault != nil { + return nil, servererror.New(res.JSONDefault) + } + + return res.JSON200, nil +} + +// ValidatePhoneNumber validates provided phone number +func (i *Impl) ValidatePhoneNumber(ctx context.Context, req api.ValidatePhoneNumberReq, editors ...api.RequestEditorFn) (*api.ValidatePhoneNumberRsp, error) { + res, err := i.client.ValidatePhoneNumberWithResponse(ctx, req, editors...) + if err != nil { + return nil, err + } + + if res.JSONDefault != nil { + return nil, servererror.New(res.JSONDefault) + } + + return res.JSON200, nil +} diff --git a/pkg/stdlib/sdk_helpers.go b/pkg/stdlib/sdk_helpers.go new file mode 100644 index 0000000..9c9e458 --- /dev/null +++ b/pkg/stdlib/sdk_helpers.go @@ -0,0 +1,95 @@ +package stdlib + +import ( + "net/http" + "strings" + + "github.com/corbado/corbado-go" + "github.com/corbado/corbado-go/pkg/sdk/assert" + "github.com/corbado/corbado-go/pkg/sdk/entity/common" + "github.com/corbado/corbado-go/pkg/sdk/util" + "github.com/pkg/errors" +) + +type SDKHelpers struct { + config *corbado.Config +} + +func NewSDKHelpers(config *corbado.Config) (*SDKHelpers, error) { + if err := assert.NotNil(config); err != nil { + return nil, err + } + + return &SDKHelpers{ + config: config, + }, nil +} + +func (s *SDKHelpers) GetShortSessionValue(req *http.Request) (string, error) { + if err := assert.NotNil(req); err != nil { + return "", err + } + + ses, err := s.getShortSessionValueFromCookie(req) + if err != nil { + return "", err + } + + if ses == "" { + return s.getShortSessionValueFromAuthHeader(req) + } + + return "", nil +} + +func (s *SDKHelpers) getShortSessionValueFromCookie(req *http.Request) (string, error) { + if err := assert.NotNil(req); err != nil { + return "", err + } + + cookie, err := req.Cookie(s.config.ShortSessionCookieName) + if errors.Is(err, http.ErrNoCookie) { + return "", nil + } + + if err != nil { + return "", err + } + + return cookie.Value, nil +} + +func (s *SDKHelpers) getShortSessionValueFromAuthHeader(req *http.Request) (string, error) { + if err := assert.NotNil(req); err != nil { + return "", err + } + + authHeader := req.Header.Get("Authorization") + if !strings.HasPrefix(authHeader, "Bearer ") { + return "", nil + } + + return authHeader[7:], nil +} + +func (s *SDKHelpers) GetClientInfo(req *http.Request) (*common.ClientInfo, error) { + if err := assert.NotNil(req); err != nil { + return nil, err + } + + ip, err := s.GetRemoteAddress(req) + if err != nil { + return nil, err + } + + return util.ClientInfo(ip, req.UserAgent()), nil +} + +func (s *SDKHelpers) GetRemoteAddress(req *http.Request) (string, error) { + ip := req.Header.Get("X-Forwarded-For") + if ip != "" { + return ip, nil + } + + return req.RemoteAddr, nil +} diff --git a/sdk.go b/sdk.go new file mode 100644 index 0000000..0189867 --- /dev/null +++ b/sdk.go @@ -0,0 +1,129 @@ +package corbado + +import ( + "net/http" + + "github.com/corbado/corbado-go/pkg/sdk/assert" + "github.com/corbado/corbado-go/pkg/sdk/authtoken" + "github.com/corbado/corbado-go/pkg/sdk/emaillink" + "github.com/corbado/corbado-go/pkg/sdk/entity/api" + "github.com/corbado/corbado-go/pkg/sdk/servererror" + "github.com/corbado/corbado-go/pkg/sdk/session" + "github.com/corbado/corbado-go/pkg/sdk/user" + "github.com/corbado/corbado-go/pkg/sdk/validation" + "github.com/pkg/errors" +) + +const Version = "v0.1.0" + +type SDK interface { + AuthTokens() authtoken.AuthToken + EmailLinks() emaillink.EmailLink + Sessions() session.Session + Users() user.User + Validations() validation.Validation +} + +type Impl struct { + client *api.ClientWithResponses + HTTPClient *http.Client + + authTokens authtoken.AuthToken + emailLinks emaillink.EmailLink + sessions session.Session + validation validation.Validation + users user.User +} + +var _ SDK = &Impl{} + +// NewSDK returns new SDK +func NewSDK(config *Config) (*Impl, error) { + if err := assert.NotNil(config); err != nil { + return nil, err + } + + client, err := newClient(config) + if err != nil { + return nil, err + } + + // instantiate all APIs eagerly because it's cheap to do so and we don't have to deal with thread safety this way + emailLinks, err := emaillink.New(client) + if err != nil { + return nil, err + } + + sessions, err := session.New(client, config.ProjectID, config.FrontendAPI, config.ShortSessionCookieName, config.JWTIssuer) + if err != nil { + return nil, err + } + + users, err := user.New(client) + if err != nil { + return nil, err + } + + validation, err := validation.New(client) + if err != nil { + return nil, err + } + + httpClient := config.HTTPClient + if httpClient == nil { + httpClient = &http.Client{} + } + + return &Impl{ + client: client, + emailLinks: emailLinks, + sessions: sessions, + users: users, + validation: validation, + HTTPClient: httpClient, + }, nil +} + +// AuthTokens returns auth tokens client +func (i *Impl) AuthTokens() authtoken.AuthToken { + return i.authTokens +} + +// EmailLinks returns email links client +func (i *Impl) EmailLinks() emaillink.EmailLink { + return i.emailLinks +} + +// Validations returns validation client +func (i *Impl) Validations() validation.Validation { + return i.validation +} + +// Sessions returns sessions client +func (i *Impl) Sessions() session.Session { + return i.sessions +} + +// Users returns users client +func (i *Impl) Users() user.User { + return i.users +} + +// IsServerError checks if given error is a ServerError +func IsServerError(err error) bool { + var serverError *servererror.ServerError + ok := errors.As(err, &serverError) + + return ok +} + +// AsServerError casts given error into a ServerError, if possible +func AsServerError(err error) *servererror.ServerError { + var serverError *servererror.ServerError + ok := errors.As(err, &serverError) + if !ok { + return nil + } + + return serverError +}