diff --git a/cmd/internal/client/client.go b/cmd/internal/client/client.go index a8b02e7a..f401ea89 100644 --- a/cmd/internal/client/client.go +++ b/cmd/internal/client/client.go @@ -416,7 +416,7 @@ func (c *Client) SeedingTasks(ctx context.Context) ([]DownloadTask, error) { func (c *Client) RequestDeviceCode(ctx context.Context) (DeviceCode, error) { scope := "downloader:register" - res, err := c.api.PostApiAuthDeviceCodeWithResponse(ctx, openapi.PostApiAuthDeviceCodeJSONRequestBody{ + res, err := c.api.CreateDeviceAuthorizationWithResponse(ctx, openapi.CreateDeviceAuthorizationJSONRequestBody{ ClientId: "zpan-cli", Scope: &scope, }) @@ -440,7 +440,7 @@ func (c *Client) RequestDeviceCode(ctx context.Context) (DeviceCode, error) { } func (c *Client) PollDeviceToken(ctx context.Context, deviceCode string) (DeviceToken, error) { - res, err := c.api.PostApiAuthDeviceTokenWithResponse(ctx, openapi.PostApiAuthDeviceTokenJSONRequestBody{ + res, err := c.api.CreateDeviceAccessTokenWithResponse(ctx, openapi.CreateDeviceAccessTokenJSONRequestBody{ GrantType: "urn:ietf:params:oauth:grant-type:device_code", DeviceCode: deviceCode, ClientId: "zpan-cli", diff --git a/cmd/internal/openapi/client.gen.go b/cmd/internal/openapi/client.gen.go index e097cda5..68e1e8d0 100644 --- a/cmd/internal/openapi/client.gen.go +++ b/cmd/internal/openapi/client.gen.go @@ -2059,702 +2059,204 @@ func (e WebDavVerificationStatus) Valid() bool { } } -// Defines values for ListUsersParamsSearchField. +// Defines values for CreateDeviceAuthorization400JSONResponseBodyError. const ( - ListUsersParamsSearchFieldEmail ListUsersParamsSearchField = "email" - ListUsersParamsSearchFieldName ListUsersParamsSearchField = "name" + CreateDeviceAuthorization400JSONResponseBodyErrorInvalidClient CreateDeviceAuthorization400JSONResponseBodyError = "invalid_client" + CreateDeviceAuthorization400JSONResponseBodyErrorInvalidRequest CreateDeviceAuthorization400JSONResponseBodyError = "invalid_request" ) -// Valid indicates whether the value is a known member of the ListUsersParamsSearchField enum. -func (e ListUsersParamsSearchField) Valid() bool { +// Valid indicates whether the value is a known member of the CreateDeviceAuthorization400JSONResponseBodyError enum. +func (e CreateDeviceAuthorization400JSONResponseBodyError) Valid() bool { switch e { - case ListUsersParamsSearchFieldEmail: + case CreateDeviceAuthorization400JSONResponseBodyErrorInvalidClient: return true - case ListUsersParamsSearchFieldName: + case CreateDeviceAuthorization400JSONResponseBodyErrorInvalidRequest: return true default: return false } } -// Defines values for ListUsersParamsSearchOperator. +// Defines values for CreateDeviceAccessToken400JSONResponseBodyError. const ( - ListUsersParamsSearchOperatorContains ListUsersParamsSearchOperator = "contains" - ListUsersParamsSearchOperatorEndsWith ListUsersParamsSearchOperator = "ends_with" - ListUsersParamsSearchOperatorStartsWith ListUsersParamsSearchOperator = "starts_with" + CreateDeviceAccessToken400JSONResponseBodyErrorAccessDenied CreateDeviceAccessToken400JSONResponseBodyError = "access_denied" + CreateDeviceAccessToken400JSONResponseBodyErrorAuthorizationPending CreateDeviceAccessToken400JSONResponseBodyError = "authorization_pending" + CreateDeviceAccessToken400JSONResponseBodyErrorExpiredToken CreateDeviceAccessToken400JSONResponseBodyError = "expired_token" + CreateDeviceAccessToken400JSONResponseBodyErrorInvalidGrant CreateDeviceAccessToken400JSONResponseBodyError = "invalid_grant" + CreateDeviceAccessToken400JSONResponseBodyErrorInvalidRequest CreateDeviceAccessToken400JSONResponseBodyError = "invalid_request" + CreateDeviceAccessToken400JSONResponseBodyErrorSlowDown CreateDeviceAccessToken400JSONResponseBodyError = "slow_down" ) -// Valid indicates whether the value is a known member of the ListUsersParamsSearchOperator enum. -func (e ListUsersParamsSearchOperator) Valid() bool { +// Valid indicates whether the value is a known member of the CreateDeviceAccessToken400JSONResponseBodyError enum. +func (e CreateDeviceAccessToken400JSONResponseBodyError) Valid() bool { switch e { - case ListUsersParamsSearchOperatorContains: + case CreateDeviceAccessToken400JSONResponseBodyErrorAccessDenied: return true - case ListUsersParamsSearchOperatorEndsWith: + case CreateDeviceAccessToken400JSONResponseBodyErrorAuthorizationPending: return true - case ListUsersParamsSearchOperatorStartsWith: + case CreateDeviceAccessToken400JSONResponseBodyErrorExpiredToken: + return true + case CreateDeviceAccessToken400JSONResponseBodyErrorInvalidGrant: + return true + case CreateDeviceAccessToken400JSONResponseBodyErrorInvalidRequest: + return true + case CreateDeviceAccessToken400JSONResponseBodyErrorSlowDown: return true default: return false } } -// Defines values for ListUsersParamsSortDirection. +// Defines values for CreateDynamicOAuthClientRegistrationJSONBodySubjectType. const ( - ListUsersParamsSortDirectionAsc ListUsersParamsSortDirection = "asc" - ListUsersParamsSortDirectionDesc ListUsersParamsSortDirection = "desc" + CreateDynamicOAuthClientRegistrationJSONBodySubjectTypePairwise CreateDynamicOAuthClientRegistrationJSONBodySubjectType = "pairwise" + CreateDynamicOAuthClientRegistrationJSONBodySubjectTypePublic CreateDynamicOAuthClientRegistrationJSONBodySubjectType = "public" ) -// Valid indicates whether the value is a known member of the ListUsersParamsSortDirection enum. -func (e ListUsersParamsSortDirection) Valid() bool { +// Valid indicates whether the value is a known member of the CreateDynamicOAuthClientRegistrationJSONBodySubjectType enum. +func (e CreateDynamicOAuthClientRegistrationJSONBodySubjectType) Valid() bool { switch e { - case ListUsersParamsSortDirectionAsc: + case CreateDynamicOAuthClientRegistrationJSONBodySubjectTypePairwise: return true - case ListUsersParamsSortDirectionDesc: + case CreateDynamicOAuthClientRegistrationJSONBodySubjectTypePublic: return true default: return false } } -// Defines values for ListUsersParamsFilterOperator. +// Defines values for CreateDynamicOAuthClientRegistrationJSONBodyType. const ( - ListUsersParamsFilterOperatorContains ListUsersParamsFilterOperator = "contains" - ListUsersParamsFilterOperatorEndsWith ListUsersParamsFilterOperator = "ends_with" - ListUsersParamsFilterOperatorEq ListUsersParamsFilterOperator = "eq" - ListUsersParamsFilterOperatorGt ListUsersParamsFilterOperator = "gt" - ListUsersParamsFilterOperatorGte ListUsersParamsFilterOperator = "gte" - ListUsersParamsFilterOperatorIn ListUsersParamsFilterOperator = "in" - ListUsersParamsFilterOperatorLt ListUsersParamsFilterOperator = "lt" - ListUsersParamsFilterOperatorLte ListUsersParamsFilterOperator = "lte" - ListUsersParamsFilterOperatorNe ListUsersParamsFilterOperator = "ne" - ListUsersParamsFilterOperatorNotIn ListUsersParamsFilterOperator = "not_in" - ListUsersParamsFilterOperatorStartsWith ListUsersParamsFilterOperator = "starts_with" + CreateDynamicOAuthClientRegistrationJSONBodyTypeNative CreateDynamicOAuthClientRegistrationJSONBodyType = "native" + CreateDynamicOAuthClientRegistrationJSONBodyTypeUserAgentBased CreateDynamicOAuthClientRegistrationJSONBodyType = "user-agent-based" + CreateDynamicOAuthClientRegistrationJSONBodyTypeWeb CreateDynamicOAuthClientRegistrationJSONBodyType = "web" ) -// Valid indicates whether the value is a known member of the ListUsersParamsFilterOperator enum. -func (e ListUsersParamsFilterOperator) Valid() bool { +// Valid indicates whether the value is a known member of the CreateDynamicOAuthClientRegistrationJSONBodyType enum. +func (e CreateDynamicOAuthClientRegistrationJSONBodyType) Valid() bool { switch e { - case ListUsersParamsFilterOperatorContains: + case CreateDynamicOAuthClientRegistrationJSONBodyTypeNative: return true - case ListUsersParamsFilterOperatorEndsWith: + case CreateDynamicOAuthClientRegistrationJSONBodyTypeUserAgentBased: return true - case ListUsersParamsFilterOperatorEq: - return true - case ListUsersParamsFilterOperatorGt: - return true - case ListUsersParamsFilterOperatorGte: - return true - case ListUsersParamsFilterOperatorIn: - return true - case ListUsersParamsFilterOperatorLt: - return true - case ListUsersParamsFilterOperatorLte: - return true - case ListUsersParamsFilterOperatorNe: - return true - case ListUsersParamsFilterOperatorNotIn: - return true - case ListUsersParamsFilterOperatorStartsWith: + case CreateDynamicOAuthClientRegistrationJSONBodyTypeWeb: return true default: return false } } -// Defines values for ChangeEmail200JSONResponseBodyMessage. +// Defines values for CreateDynamicOAuthClientRegistration201JSONResponseBodySubjectType. const ( - ChangeEmail200JSONResponseBodyMessageEmailUpdated ChangeEmail200JSONResponseBodyMessage = "Email updated" - ChangeEmail200JSONResponseBodyMessageVerificationEmailSent ChangeEmail200JSONResponseBodyMessage = "Verification email sent" + CreateDynamicOAuthClientRegistration201JSONResponseBodySubjectTypePairwise CreateDynamicOAuthClientRegistration201JSONResponseBodySubjectType = "pairwise" + CreateDynamicOAuthClientRegistration201JSONResponseBodySubjectTypePublic CreateDynamicOAuthClientRegistration201JSONResponseBodySubjectType = "public" ) -// Valid indicates whether the value is a known member of the ChangeEmail200JSONResponseBodyMessage enum. -func (e ChangeEmail200JSONResponseBodyMessage) Valid() bool { +// Valid indicates whether the value is a known member of the CreateDynamicOAuthClientRegistration201JSONResponseBodySubjectType enum. +func (e CreateDynamicOAuthClientRegistration201JSONResponseBodySubjectType) Valid() bool { switch e { - case ChangeEmail200JSONResponseBodyMessageEmailUpdated: + case CreateDynamicOAuthClientRegistration201JSONResponseBodySubjectTypePairwise: return true - case ChangeEmail200JSONResponseBodyMessageVerificationEmailSent: + case CreateDynamicOAuthClientRegistration201JSONResponseBodySubjectTypePublic: return true default: return false } } -// Defines values for DeleteUser200JSONResponseBodyMessage. +// Defines values for CreateDynamicOAuthClientRegistration201JSONResponseBodyType. const ( - DeleteUser200JSONResponseBodyMessageUserDeleted DeleteUser200JSONResponseBodyMessage = "User deleted" - DeleteUser200JSONResponseBodyMessageVerificationEmailSent DeleteUser200JSONResponseBodyMessage = "Verification email sent" + CreateDynamicOAuthClientRegistration201JSONResponseBodyTypeNative CreateDynamicOAuthClientRegistration201JSONResponseBodyType = "native" + CreateDynamicOAuthClientRegistration201JSONResponseBodyTypeUserAgentBased CreateDynamicOAuthClientRegistration201JSONResponseBodyType = "user-agent-based" + CreateDynamicOAuthClientRegistration201JSONResponseBodyTypeWeb CreateDynamicOAuthClientRegistration201JSONResponseBodyType = "web" ) -// Valid indicates whether the value is a known member of the DeleteUser200JSONResponseBodyMessage enum. -func (e DeleteUser200JSONResponseBodyMessage) Valid() bool { +// Valid indicates whether the value is a known member of the CreateDynamicOAuthClientRegistration201JSONResponseBodyType enum. +func (e CreateDynamicOAuthClientRegistration201JSONResponseBodyType) Valid() bool { switch e { - case DeleteUser200JSONResponseBodyMessageUserDeleted: + case CreateDynamicOAuthClientRegistration201JSONResponseBodyTypeNative: return true - case DeleteUser200JSONResponseBodyMessageVerificationEmailSent: + case CreateDynamicOAuthClientRegistration201JSONResponseBodyTypeUserAgentBased: + return true + case CreateDynamicOAuthClientRegistration201JSONResponseBodyTypeWeb: return true default: return false } } -// Defines values for GetApiAuthDeleteUserCallback200JSONResponseBodyMessage. +// Defines values for GetDynamicOAuthClientRegistration200JSONResponseBodySubjectType. const ( - UserDeleted GetApiAuthDeleteUserCallback200JSONResponseBodyMessage = "User deleted" + GetDynamicOAuthClientRegistration200JSONResponseBodySubjectTypePairwise GetDynamicOAuthClientRegistration200JSONResponseBodySubjectType = "pairwise" + GetDynamicOAuthClientRegistration200JSONResponseBodySubjectTypePublic GetDynamicOAuthClientRegistration200JSONResponseBodySubjectType = "public" ) -// Valid indicates whether the value is a known member of the GetApiAuthDeleteUserCallback200JSONResponseBodyMessage enum. -func (e GetApiAuthDeleteUserCallback200JSONResponseBodyMessage) Valid() bool { +// Valid indicates whether the value is a known member of the GetDynamicOAuthClientRegistration200JSONResponseBodySubjectType enum. +func (e GetDynamicOAuthClientRegistration200JSONResponseBodySubjectType) Valid() bool { switch e { - case UserDeleted: + case GetDynamicOAuthClientRegistration200JSONResponseBodySubjectTypePairwise: + return true + case GetDynamicOAuthClientRegistration200JSONResponseBodySubjectTypePublic: return true default: return false } } -// Defines values for GetApiAuthDevice200JSONResponseBodyStatus. +// Defines values for GetDynamicOAuthClientRegistration200JSONResponseBodyType. const ( - GetApiAuthDevice200JSONResponseBodyStatusApproved GetApiAuthDevice200JSONResponseBodyStatus = "approved" - GetApiAuthDevice200JSONResponseBodyStatusDenied GetApiAuthDevice200JSONResponseBodyStatus = "denied" - GetApiAuthDevice200JSONResponseBodyStatusPending GetApiAuthDevice200JSONResponseBodyStatus = "pending" + GetDynamicOAuthClientRegistration200JSONResponseBodyTypeNative GetDynamicOAuthClientRegistration200JSONResponseBodyType = "native" + GetDynamicOAuthClientRegistration200JSONResponseBodyTypeUserAgentBased GetDynamicOAuthClientRegistration200JSONResponseBodyType = "user-agent-based" + GetDynamicOAuthClientRegistration200JSONResponseBodyTypeWeb GetDynamicOAuthClientRegistration200JSONResponseBodyType = "web" ) -// Valid indicates whether the value is a known member of the GetApiAuthDevice200JSONResponseBodyStatus enum. -func (e GetApiAuthDevice200JSONResponseBodyStatus) Valid() bool { +// Valid indicates whether the value is a known member of the GetDynamicOAuthClientRegistration200JSONResponseBodyType enum. +func (e GetDynamicOAuthClientRegistration200JSONResponseBodyType) Valid() bool { switch e { - case GetApiAuthDevice200JSONResponseBodyStatusApproved: + case GetDynamicOAuthClientRegistration200JSONResponseBodyTypeNative: return true - case GetApiAuthDevice200JSONResponseBodyStatusDenied: + case GetDynamicOAuthClientRegistration200JSONResponseBodyTypeUserAgentBased: return true - case GetApiAuthDevice200JSONResponseBodyStatusPending: + case GetDynamicOAuthClientRegistration200JSONResponseBodyTypeWeb: return true default: return false } } -// Defines values for PostApiAuthDeviceCode400JSONResponseBodyError. +// Defines values for UpdateDynamicOAuthClientRegistration200JSONResponseBodySubjectType. const ( - PostApiAuthDeviceCode400JSONResponseBodyErrorInvalidClient PostApiAuthDeviceCode400JSONResponseBodyError = "invalid_client" - PostApiAuthDeviceCode400JSONResponseBodyErrorInvalidRequest PostApiAuthDeviceCode400JSONResponseBodyError = "invalid_request" + UpdateDynamicOAuthClientRegistration200JSONResponseBodySubjectTypePairwise UpdateDynamicOAuthClientRegistration200JSONResponseBodySubjectType = "pairwise" + UpdateDynamicOAuthClientRegistration200JSONResponseBodySubjectTypePublic UpdateDynamicOAuthClientRegistration200JSONResponseBodySubjectType = "public" ) -// Valid indicates whether the value is a known member of the PostApiAuthDeviceCode400JSONResponseBodyError enum. -func (e PostApiAuthDeviceCode400JSONResponseBodyError) Valid() bool { +// Valid indicates whether the value is a known member of the UpdateDynamicOAuthClientRegistration200JSONResponseBodySubjectType enum. +func (e UpdateDynamicOAuthClientRegistration200JSONResponseBodySubjectType) Valid() bool { switch e { - case PostApiAuthDeviceCode400JSONResponseBodyErrorInvalidClient: + case UpdateDynamicOAuthClientRegistration200JSONResponseBodySubjectTypePairwise: return true - case PostApiAuthDeviceCode400JSONResponseBodyErrorInvalidRequest: + case UpdateDynamicOAuthClientRegistration200JSONResponseBodySubjectTypePublic: return true default: return false } } -// Defines values for PostApiAuthDeviceToken400JSONResponseBodyError. +// Defines values for UpdateDynamicOAuthClientRegistration200JSONResponseBodyType. const ( - PostApiAuthDeviceToken400JSONResponseBodyErrorAccessDenied PostApiAuthDeviceToken400JSONResponseBodyError = "access_denied" - PostApiAuthDeviceToken400JSONResponseBodyErrorAuthorizationPending PostApiAuthDeviceToken400JSONResponseBodyError = "authorization_pending" - PostApiAuthDeviceToken400JSONResponseBodyErrorExpiredToken PostApiAuthDeviceToken400JSONResponseBodyError = "expired_token" - PostApiAuthDeviceToken400JSONResponseBodyErrorInvalidGrant PostApiAuthDeviceToken400JSONResponseBodyError = "invalid_grant" - PostApiAuthDeviceToken400JSONResponseBodyErrorInvalidRequest PostApiAuthDeviceToken400JSONResponseBodyError = "invalid_request" - PostApiAuthDeviceToken400JSONResponseBodyErrorSlowDown PostApiAuthDeviceToken400JSONResponseBodyError = "slow_down" + UpdateDynamicOAuthClientRegistration200JSONResponseBodyTypeNative UpdateDynamicOAuthClientRegistration200JSONResponseBodyType = "native" + UpdateDynamicOAuthClientRegistration200JSONResponseBodyTypeUserAgentBased UpdateDynamicOAuthClientRegistration200JSONResponseBodyType = "user-agent-based" + UpdateDynamicOAuthClientRegistration200JSONResponseBodyTypeWeb UpdateDynamicOAuthClientRegistration200JSONResponseBodyType = "web" ) -// Valid indicates whether the value is a known member of the PostApiAuthDeviceToken400JSONResponseBodyError enum. -func (e PostApiAuthDeviceToken400JSONResponseBodyError) Valid() bool { +// Valid indicates whether the value is a known member of the UpdateDynamicOAuthClientRegistration200JSONResponseBodyType enum. +func (e UpdateDynamicOAuthClientRegistration200JSONResponseBodyType) Valid() bool { switch e { - case PostApiAuthDeviceToken400JSONResponseBodyErrorAccessDenied: + case UpdateDynamicOAuthClientRegistration200JSONResponseBodyTypeNative: return true - case PostApiAuthDeviceToken400JSONResponseBodyErrorAuthorizationPending: + case UpdateDynamicOAuthClientRegistration200JSONResponseBodyTypeUserAgentBased: return true - case PostApiAuthDeviceToken400JSONResponseBodyErrorExpiredToken: - return true - case PostApiAuthDeviceToken400JSONResponseBodyErrorInvalidGrant: - return true - case PostApiAuthDeviceToken400JSONResponseBodyErrorInvalidRequest: - return true - case PostApiAuthDeviceToken400JSONResponseBodyErrorSlowDown: - return true - default: - return false - } -} - -// Defines values for GetJSONWebKeySet200JSONResponseBodyKeysUse. -const ( - Sig GetJSONWebKeySet200JSONResponseBodyKeysUse = "sig" -) - -// Valid indicates whether the value is a known member of the GetJSONWebKeySet200JSONResponseBodyKeysUse enum. -func (e GetJSONWebKeySet200JSONResponseBodyKeysUse) Valid() bool { - switch e { - case Sig: - return true - default: - return false - } -} - -// Defines values for LinkSocialAccountJSONBodyProvider0. -const ( - LinkSocialAccountJSONBodyProvider0Apple LinkSocialAccountJSONBodyProvider0 = "apple" - LinkSocialAccountJSONBodyProvider0Atlassian LinkSocialAccountJSONBodyProvider0 = "atlassian" - LinkSocialAccountJSONBodyProvider0Cognito LinkSocialAccountJSONBodyProvider0 = "cognito" - LinkSocialAccountJSONBodyProvider0Discord LinkSocialAccountJSONBodyProvider0 = "discord" - LinkSocialAccountJSONBodyProvider0Dropbox LinkSocialAccountJSONBodyProvider0 = "dropbox" - LinkSocialAccountJSONBodyProvider0Facebook LinkSocialAccountJSONBodyProvider0 = "facebook" - LinkSocialAccountJSONBodyProvider0Figma LinkSocialAccountJSONBodyProvider0 = "figma" - LinkSocialAccountJSONBodyProvider0Github LinkSocialAccountJSONBodyProvider0 = "github" - LinkSocialAccountJSONBodyProvider0Gitlab LinkSocialAccountJSONBodyProvider0 = "gitlab" - LinkSocialAccountJSONBodyProvider0Google LinkSocialAccountJSONBodyProvider0 = "google" - LinkSocialAccountJSONBodyProvider0Huggingface LinkSocialAccountJSONBodyProvider0 = "huggingface" - LinkSocialAccountJSONBodyProvider0Kakao LinkSocialAccountJSONBodyProvider0 = "kakao" - LinkSocialAccountJSONBodyProvider0Kick LinkSocialAccountJSONBodyProvider0 = "kick" - LinkSocialAccountJSONBodyProvider0Line LinkSocialAccountJSONBodyProvider0 = "line" - LinkSocialAccountJSONBodyProvider0Linear LinkSocialAccountJSONBodyProvider0 = "linear" - LinkSocialAccountJSONBodyProvider0Linkedin LinkSocialAccountJSONBodyProvider0 = "linkedin" - LinkSocialAccountJSONBodyProvider0Microsoft LinkSocialAccountJSONBodyProvider0 = "microsoft" - LinkSocialAccountJSONBodyProvider0Naver LinkSocialAccountJSONBodyProvider0 = "naver" - LinkSocialAccountJSONBodyProvider0Notion LinkSocialAccountJSONBodyProvider0 = "notion" - LinkSocialAccountJSONBodyProvider0Paybin LinkSocialAccountJSONBodyProvider0 = "paybin" - LinkSocialAccountJSONBodyProvider0Paypal LinkSocialAccountJSONBodyProvider0 = "paypal" - LinkSocialAccountJSONBodyProvider0Polar LinkSocialAccountJSONBodyProvider0 = "polar" - LinkSocialAccountJSONBodyProvider0Railway LinkSocialAccountJSONBodyProvider0 = "railway" - LinkSocialAccountJSONBodyProvider0Reddit LinkSocialAccountJSONBodyProvider0 = "reddit" - LinkSocialAccountJSONBodyProvider0Roblox LinkSocialAccountJSONBodyProvider0 = "roblox" - LinkSocialAccountJSONBodyProvider0Salesforce LinkSocialAccountJSONBodyProvider0 = "salesforce" - LinkSocialAccountJSONBodyProvider0Slack LinkSocialAccountJSONBodyProvider0 = "slack" - LinkSocialAccountJSONBodyProvider0Spotify LinkSocialAccountJSONBodyProvider0 = "spotify" - LinkSocialAccountJSONBodyProvider0Tiktok LinkSocialAccountJSONBodyProvider0 = "tiktok" - LinkSocialAccountJSONBodyProvider0Twitch LinkSocialAccountJSONBodyProvider0 = "twitch" - LinkSocialAccountJSONBodyProvider0Twitter LinkSocialAccountJSONBodyProvider0 = "twitter" - LinkSocialAccountJSONBodyProvider0Vercel LinkSocialAccountJSONBodyProvider0 = "vercel" - LinkSocialAccountJSONBodyProvider0Vk LinkSocialAccountJSONBodyProvider0 = "vk" - LinkSocialAccountJSONBodyProvider0Wechat LinkSocialAccountJSONBodyProvider0 = "wechat" - LinkSocialAccountJSONBodyProvider0Zoom LinkSocialAccountJSONBodyProvider0 = "zoom" -) - -// Valid indicates whether the value is a known member of the LinkSocialAccountJSONBodyProvider0 enum. -func (e LinkSocialAccountJSONBodyProvider0) Valid() bool { - switch e { - case LinkSocialAccountJSONBodyProvider0Apple: - return true - case LinkSocialAccountJSONBodyProvider0Atlassian: - return true - case LinkSocialAccountJSONBodyProvider0Cognito: - return true - case LinkSocialAccountJSONBodyProvider0Discord: - return true - case LinkSocialAccountJSONBodyProvider0Dropbox: - return true - case LinkSocialAccountJSONBodyProvider0Facebook: - return true - case LinkSocialAccountJSONBodyProvider0Figma: - return true - case LinkSocialAccountJSONBodyProvider0Github: - return true - case LinkSocialAccountJSONBodyProvider0Gitlab: - return true - case LinkSocialAccountJSONBodyProvider0Google: - return true - case LinkSocialAccountJSONBodyProvider0Huggingface: - return true - case LinkSocialAccountJSONBodyProvider0Kakao: - return true - case LinkSocialAccountJSONBodyProvider0Kick: - return true - case LinkSocialAccountJSONBodyProvider0Line: - return true - case LinkSocialAccountJSONBodyProvider0Linear: - return true - case LinkSocialAccountJSONBodyProvider0Linkedin: - return true - case LinkSocialAccountJSONBodyProvider0Microsoft: - return true - case LinkSocialAccountJSONBodyProvider0Naver: - return true - case LinkSocialAccountJSONBodyProvider0Notion: - return true - case LinkSocialAccountJSONBodyProvider0Paybin: - return true - case LinkSocialAccountJSONBodyProvider0Paypal: - return true - case LinkSocialAccountJSONBodyProvider0Polar: - return true - case LinkSocialAccountJSONBodyProvider0Railway: - return true - case LinkSocialAccountJSONBodyProvider0Reddit: - return true - case LinkSocialAccountJSONBodyProvider0Roblox: - return true - case LinkSocialAccountJSONBodyProvider0Salesforce: - return true - case LinkSocialAccountJSONBodyProvider0Slack: - return true - case LinkSocialAccountJSONBodyProvider0Spotify: - return true - case LinkSocialAccountJSONBodyProvider0Tiktok: - return true - case LinkSocialAccountJSONBodyProvider0Twitch: - return true - case LinkSocialAccountJSONBodyProvider0Twitter: - return true - case LinkSocialAccountJSONBodyProvider0Vercel: - return true - case LinkSocialAccountJSONBodyProvider0Vk: - return true - case LinkSocialAccountJSONBodyProvider0Wechat: - return true - case LinkSocialAccountJSONBodyProvider0Zoom: - return true - default: - return false - } -} - -// Defines values for PostApiAuthOauth2CreateClientJSONBodyResponseTypes. -const ( - PostApiAuthOauth2CreateClientJSONBodyResponseTypesCode PostApiAuthOauth2CreateClientJSONBodyResponseTypes = "code" -) - -// Valid indicates whether the value is a known member of the PostApiAuthOauth2CreateClientJSONBodyResponseTypes enum. -func (e PostApiAuthOauth2CreateClientJSONBodyResponseTypes) Valid() bool { - switch e { - case PostApiAuthOauth2CreateClientJSONBodyResponseTypesCode: - return true - default: - return false - } -} - -// Defines values for PostApiAuthOauth2CreateClientJSONBodyType. -const ( - PostApiAuthOauth2CreateClientJSONBodyTypeNative PostApiAuthOauth2CreateClientJSONBodyType = "native" - PostApiAuthOauth2CreateClientJSONBodyTypeUserAgentBased PostApiAuthOauth2CreateClientJSONBodyType = "user-agent-based" - PostApiAuthOauth2CreateClientJSONBodyTypeWeb PostApiAuthOauth2CreateClientJSONBodyType = "web" -) - -// Valid indicates whether the value is a known member of the PostApiAuthOauth2CreateClientJSONBodyType enum. -func (e PostApiAuthOauth2CreateClientJSONBodyType) Valid() bool { - switch e { - case PostApiAuthOauth2CreateClientJSONBodyTypeNative: - return true - case PostApiAuthOauth2CreateClientJSONBodyTypeUserAgentBased: - return true - case PostApiAuthOauth2CreateClientJSONBodyTypeWeb: - return true - default: - return false - } -} - -// Defines values for PostApiAuthOauth2CreateClient201JSONResponseBodyResponseTypes. -const ( - PostApiAuthOauth2CreateClient201JSONResponseBodyResponseTypesCode PostApiAuthOauth2CreateClient201JSONResponseBodyResponseTypes = "code" -) - -// Valid indicates whether the value is a known member of the PostApiAuthOauth2CreateClient201JSONResponseBodyResponseTypes enum. -func (e PostApiAuthOauth2CreateClient201JSONResponseBodyResponseTypes) Valid() bool { - switch e { - case PostApiAuthOauth2CreateClient201JSONResponseBodyResponseTypesCode: - return true - default: - return false - } -} - -// Defines values for PostApiAuthOauth2CreateClient201JSONResponseBodyType. -const ( - PostApiAuthOauth2CreateClient201JSONResponseBodyTypeNative PostApiAuthOauth2CreateClient201JSONResponseBodyType = "native" - PostApiAuthOauth2CreateClient201JSONResponseBodyTypeUserAgentBased PostApiAuthOauth2CreateClient201JSONResponseBodyType = "user-agent-based" - PostApiAuthOauth2CreateClient201JSONResponseBodyTypeWeb PostApiAuthOauth2CreateClient201JSONResponseBodyType = "web" -) - -// Valid indicates whether the value is a known member of the PostApiAuthOauth2CreateClient201JSONResponseBodyType enum. -func (e PostApiAuthOauth2CreateClient201JSONResponseBodyType) Valid() bool { - switch e { - case PostApiAuthOauth2CreateClient201JSONResponseBodyTypeNative: - return true - case PostApiAuthOauth2CreateClient201JSONResponseBodyTypeUserAgentBased: - return true - case PostApiAuthOauth2CreateClient201JSONResponseBodyTypeWeb: - return true - default: - return false - } -} - -// Defines values for PostApiAuthOauth2RegisterJSONBodyResponseTypes. -const ( - PostApiAuthOauth2RegisterJSONBodyResponseTypesCode PostApiAuthOauth2RegisterJSONBodyResponseTypes = "code" -) - -// Valid indicates whether the value is a known member of the PostApiAuthOauth2RegisterJSONBodyResponseTypes enum. -func (e PostApiAuthOauth2RegisterJSONBodyResponseTypes) Valid() bool { - switch e { - case PostApiAuthOauth2RegisterJSONBodyResponseTypesCode: - return true - default: - return false - } -} - -// Defines values for PostApiAuthOauth2RegisterJSONBodySubjectType. -const ( - Pairwise PostApiAuthOauth2RegisterJSONBodySubjectType = "pairwise" - Public PostApiAuthOauth2RegisterJSONBodySubjectType = "public" -) - -// Valid indicates whether the value is a known member of the PostApiAuthOauth2RegisterJSONBodySubjectType enum. -func (e PostApiAuthOauth2RegisterJSONBodySubjectType) Valid() bool { - switch e { - case Pairwise: - return true - case Public: - return true - default: - return false - } -} - -// Defines values for PostApiAuthOauth2RegisterJSONBodyType. -const ( - PostApiAuthOauth2RegisterJSONBodyTypeNative PostApiAuthOauth2RegisterJSONBodyType = "native" - PostApiAuthOauth2RegisterJSONBodyTypeUserAgentBased PostApiAuthOauth2RegisterJSONBodyType = "user-agent-based" - PostApiAuthOauth2RegisterJSONBodyTypeWeb PostApiAuthOauth2RegisterJSONBodyType = "web" -) - -// Valid indicates whether the value is a known member of the PostApiAuthOauth2RegisterJSONBodyType enum. -func (e PostApiAuthOauth2RegisterJSONBodyType) Valid() bool { - switch e { - case PostApiAuthOauth2RegisterJSONBodyTypeNative: - return true - case PostApiAuthOauth2RegisterJSONBodyTypeUserAgentBased: - return true - case PostApiAuthOauth2RegisterJSONBodyTypeWeb: - return true - default: - return false - } -} - -// Defines values for PostApiAuthOauth2Register201JSONResponseBodyResponseTypes. -const ( - PostApiAuthOauth2Register201JSONResponseBodyResponseTypesCode PostApiAuthOauth2Register201JSONResponseBodyResponseTypes = "code" -) - -// Valid indicates whether the value is a known member of the PostApiAuthOauth2Register201JSONResponseBodyResponseTypes enum. -func (e PostApiAuthOauth2Register201JSONResponseBodyResponseTypes) Valid() bool { - switch e { - case PostApiAuthOauth2Register201JSONResponseBodyResponseTypesCode: - return true - default: - return false - } -} - -// Defines values for PostApiAuthOauth2Register201JSONResponseBodyType. -const ( - PostApiAuthOauth2Register201JSONResponseBodyTypeNative PostApiAuthOauth2Register201JSONResponseBodyType = "native" - PostApiAuthOauth2Register201JSONResponseBodyTypeUserAgentBased PostApiAuthOauth2Register201JSONResponseBodyType = "user-agent-based" - PostApiAuthOauth2Register201JSONResponseBodyTypeWeb PostApiAuthOauth2Register201JSONResponseBodyType = "web" -) - -// Valid indicates whether the value is a known member of the PostApiAuthOauth2Register201JSONResponseBodyType enum. -func (e PostApiAuthOauth2Register201JSONResponseBodyType) Valid() bool { - switch e { - case PostApiAuthOauth2Register201JSONResponseBodyTypeNative: - return true - case PostApiAuthOauth2Register201JSONResponseBodyTypeUserAgentBased: - return true - case PostApiAuthOauth2Register201JSONResponseBodyTypeWeb: - return true - default: - return false - } -} - -// Defines values for PostApiAuthOauth2Token200JSONResponseBodyTokenType. -const ( - Bearer PostApiAuthOauth2Token200JSONResponseBodyTokenType = "Bearer" - DPoP PostApiAuthOauth2Token200JSONResponseBodyTokenType = "DPoP" -) - -// Valid indicates whether the value is a known member of the PostApiAuthOauth2Token200JSONResponseBodyTokenType enum. -func (e PostApiAuthOauth2Token200JSONResponseBodyTokenType) Valid() bool { - switch e { - case Bearer: - return true - case DPoP: - return true - default: - return false - } -} - -// Defines values for PostApiAuthOauth2UpdateClientJSONBodyUpdateResponseTypes. -const ( - Code PostApiAuthOauth2UpdateClientJSONBodyUpdateResponseTypes = "code" -) - -// Valid indicates whether the value is a known member of the PostApiAuthOauth2UpdateClientJSONBodyUpdateResponseTypes enum. -func (e PostApiAuthOauth2UpdateClientJSONBodyUpdateResponseTypes) Valid() bool { - switch e { - case Code: - return true - default: - return false - } -} - -// Defines values for PostApiAuthOauth2UpdateClientJSONBodyUpdateType. -const ( - Native PostApiAuthOauth2UpdateClientJSONBodyUpdateType = "native" - UserAgentBased PostApiAuthOauth2UpdateClientJSONBodyUpdateType = "user-agent-based" - Web PostApiAuthOauth2UpdateClientJSONBodyUpdateType = "web" -) - -// Valid indicates whether the value is a known member of the PostApiAuthOauth2UpdateClientJSONBodyUpdateType enum. -func (e PostApiAuthOauth2UpdateClientJSONBodyUpdateType) Valid() bool { - switch e { - case Native: - return true - case UserAgentBased: - return true - case Web: - return true - default: - return false - } -} - -// Defines values for SignInEmail200JSONResponseBodyRedirect. -const ( - False SignInEmail200JSONResponseBodyRedirect = false -) - -// Valid indicates whether the value is a known member of the SignInEmail200JSONResponseBodyRedirect enum. -func (e SignInEmail200JSONResponseBodyRedirect) Valid() bool { - switch e { - case False: - return true - default: - return false - } -} - -// Defines values for SocialSignInJSONBodyProvider0. -const ( - SocialSignInJSONBodyProvider0Apple SocialSignInJSONBodyProvider0 = "apple" - SocialSignInJSONBodyProvider0Atlassian SocialSignInJSONBodyProvider0 = "atlassian" - SocialSignInJSONBodyProvider0Cognito SocialSignInJSONBodyProvider0 = "cognito" - SocialSignInJSONBodyProvider0Discord SocialSignInJSONBodyProvider0 = "discord" - SocialSignInJSONBodyProvider0Dropbox SocialSignInJSONBodyProvider0 = "dropbox" - SocialSignInJSONBodyProvider0Facebook SocialSignInJSONBodyProvider0 = "facebook" - SocialSignInJSONBodyProvider0Figma SocialSignInJSONBodyProvider0 = "figma" - SocialSignInJSONBodyProvider0Github SocialSignInJSONBodyProvider0 = "github" - SocialSignInJSONBodyProvider0Gitlab SocialSignInJSONBodyProvider0 = "gitlab" - SocialSignInJSONBodyProvider0Google SocialSignInJSONBodyProvider0 = "google" - SocialSignInJSONBodyProvider0Huggingface SocialSignInJSONBodyProvider0 = "huggingface" - SocialSignInJSONBodyProvider0Kakao SocialSignInJSONBodyProvider0 = "kakao" - SocialSignInJSONBodyProvider0Kick SocialSignInJSONBodyProvider0 = "kick" - SocialSignInJSONBodyProvider0Line SocialSignInJSONBodyProvider0 = "line" - SocialSignInJSONBodyProvider0Linear SocialSignInJSONBodyProvider0 = "linear" - SocialSignInJSONBodyProvider0Linkedin SocialSignInJSONBodyProvider0 = "linkedin" - SocialSignInJSONBodyProvider0Microsoft SocialSignInJSONBodyProvider0 = "microsoft" - SocialSignInJSONBodyProvider0Naver SocialSignInJSONBodyProvider0 = "naver" - SocialSignInJSONBodyProvider0Notion SocialSignInJSONBodyProvider0 = "notion" - SocialSignInJSONBodyProvider0Paybin SocialSignInJSONBodyProvider0 = "paybin" - SocialSignInJSONBodyProvider0Paypal SocialSignInJSONBodyProvider0 = "paypal" - SocialSignInJSONBodyProvider0Polar SocialSignInJSONBodyProvider0 = "polar" - SocialSignInJSONBodyProvider0Railway SocialSignInJSONBodyProvider0 = "railway" - SocialSignInJSONBodyProvider0Reddit SocialSignInJSONBodyProvider0 = "reddit" - SocialSignInJSONBodyProvider0Roblox SocialSignInJSONBodyProvider0 = "roblox" - SocialSignInJSONBodyProvider0Salesforce SocialSignInJSONBodyProvider0 = "salesforce" - SocialSignInJSONBodyProvider0Slack SocialSignInJSONBodyProvider0 = "slack" - SocialSignInJSONBodyProvider0Spotify SocialSignInJSONBodyProvider0 = "spotify" - SocialSignInJSONBodyProvider0Tiktok SocialSignInJSONBodyProvider0 = "tiktok" - SocialSignInJSONBodyProvider0Twitch SocialSignInJSONBodyProvider0 = "twitch" - SocialSignInJSONBodyProvider0Twitter SocialSignInJSONBodyProvider0 = "twitter" - SocialSignInJSONBodyProvider0Vercel SocialSignInJSONBodyProvider0 = "vercel" - SocialSignInJSONBodyProvider0Vk SocialSignInJSONBodyProvider0 = "vk" - SocialSignInJSONBodyProvider0Wechat SocialSignInJSONBodyProvider0 = "wechat" - SocialSignInJSONBodyProvider0Zoom SocialSignInJSONBodyProvider0 = "zoom" -) - -// Valid indicates whether the value is a known member of the SocialSignInJSONBodyProvider0 enum. -func (e SocialSignInJSONBodyProvider0) Valid() bool { - switch e { - case SocialSignInJSONBodyProvider0Apple: - return true - case SocialSignInJSONBodyProvider0Atlassian: - return true - case SocialSignInJSONBodyProvider0Cognito: - return true - case SocialSignInJSONBodyProvider0Discord: - return true - case SocialSignInJSONBodyProvider0Dropbox: - return true - case SocialSignInJSONBodyProvider0Facebook: - return true - case SocialSignInJSONBodyProvider0Figma: - return true - case SocialSignInJSONBodyProvider0Github: - return true - case SocialSignInJSONBodyProvider0Gitlab: - return true - case SocialSignInJSONBodyProvider0Google: - return true - case SocialSignInJSONBodyProvider0Huggingface: - return true - case SocialSignInJSONBodyProvider0Kakao: - return true - case SocialSignInJSONBodyProvider0Kick: - return true - case SocialSignInJSONBodyProvider0Line: - return true - case SocialSignInJSONBodyProvider0Linear: - return true - case SocialSignInJSONBodyProvider0Linkedin: - return true - case SocialSignInJSONBodyProvider0Microsoft: - return true - case SocialSignInJSONBodyProvider0Naver: - return true - case SocialSignInJSONBodyProvider0Notion: - return true - case SocialSignInJSONBodyProvider0Paybin: - return true - case SocialSignInJSONBodyProvider0Paypal: - return true - case SocialSignInJSONBodyProvider0Polar: - return true - case SocialSignInJSONBodyProvider0Railway: - return true - case SocialSignInJSONBodyProvider0Reddit: - return true - case SocialSignInJSONBodyProvider0Roblox: - return true - case SocialSignInJSONBodyProvider0Salesforce: - return true - case SocialSignInJSONBodyProvider0Slack: - return true - case SocialSignInJSONBodyProvider0Spotify: - return true - case SocialSignInJSONBodyProvider0Tiktok: - return true - case SocialSignInJSONBodyProvider0Twitch: - return true - case SocialSignInJSONBodyProvider0Twitter: - return true - case SocialSignInJSONBodyProvider0Vercel: - return true - case SocialSignInJSONBodyProvider0Vk: - return true - case SocialSignInJSONBodyProvider0Wechat: - return true - case SocialSignInJSONBodyProvider0Zoom: + case UpdateDynamicOAuthClientRegistration200JSONResponseBodyTypeWeb: return true default: return false @@ -4374,19 +3876,19 @@ func (e ListStorageUsageItemsParamsCategory) Valid() bool { // Defines values for ListStorageUsageItemsParamsSortBy. const ( - ListStorageUsageItemsParamsSortByName ListStorageUsageItemsParamsSortBy = "name" - ListStorageUsageItemsParamsSortBySize ListStorageUsageItemsParamsSortBy = "size" - ListStorageUsageItemsParamsSortByUpdatedAt ListStorageUsageItemsParamsSortBy = "updatedAt" + Name ListStorageUsageItemsParamsSortBy = "name" + Size ListStorageUsageItemsParamsSortBy = "size" + UpdatedAt ListStorageUsageItemsParamsSortBy = "updatedAt" ) // Valid indicates whether the value is a known member of the ListStorageUsageItemsParamsSortBy enum. func (e ListStorageUsageItemsParamsSortBy) Valid() bool { switch e { - case ListStorageUsageItemsParamsSortByName: + case Name: return true - case ListStorageUsageItemsParamsSortBySize: + case Size: return true - case ListStorageUsageItemsParamsSortByUpdatedAt: + case UpdatedAt: return true default: return false @@ -4395,16 +3897,16 @@ func (e ListStorageUsageItemsParamsSortBy) Valid() bool { // Defines values for ListStorageUsageItemsParamsSortDir. const ( - ListStorageUsageItemsParamsSortDirAsc ListStorageUsageItemsParamsSortDir = "asc" - ListStorageUsageItemsParamsSortDirDesc ListStorageUsageItemsParamsSortDir = "desc" + Asc ListStorageUsageItemsParamsSortDir = "asc" + Desc ListStorageUsageItemsParamsSortDir = "desc" ) // Valid indicates whether the value is a known member of the ListStorageUsageItemsParamsSortDir enum. func (e ListStorageUsageItemsParamsSortDir) Valid() bool { switch e { - case ListStorageUsageItemsParamsSortDirAsc: + case Asc: return true - case ListStorageUsageItemsParamsSortDirDesc: + case Desc: return true default: return false @@ -4449,13 +3951,13 @@ func (e PurchaseStorageCapacity200JSONResponseBodyStatus) Valid() bool { // Defines values for PurchaseStorageCapacity202JSONResponseBodyStatus. const ( - PurchaseStorageCapacity202JSONResponseBodyStatusPending PurchaseStorageCapacity202JSONResponseBodyStatus = "pending" + Pending PurchaseStorageCapacity202JSONResponseBodyStatus = "pending" ) // Valid indicates whether the value is a known member of the PurchaseStorageCapacity202JSONResponseBodyStatus enum. func (e PurchaseStorageCapacity202JSONResponseBodyStatus) Valid() bool { switch e { - case PurchaseStorageCapacity202JSONResponseBodyStatusPending: + case Pending: return true default: return false @@ -6323,16 +5825,6 @@ type ObjectPage struct { NextPageToken *string `json:"nextPageToken"` } -// Organization defines model for Organization. -type Organization struct { - CreatedAt time.Time `json:"createdAt"` - Id *string `json:"id,omitempty"` - Logo *string `json:"logo,omitempty"` - Metadata *string `json:"metadata,omitempty"` - Name string `json:"name"` - Slug string `json:"slug"` -} - // PendingInvitation defines model for PendingInvitation. type PendingInvitation struct { CreatedAt string `json:"createdAt"` @@ -6475,20 +5967,6 @@ type SaveShareResult struct { } `json:"skipped"` } -// Session defines model for Session. -type Session struct { - ActiveOrganizationId *string `json:"activeOrganizationId,omitempty"` - CreatedAt time.Time `json:"createdAt"` - ExpiresAt time.Time `json:"expiresAt"` - Id *string `json:"id,omitempty"` - ImpersonatedBy *string `json:"impersonatedBy,omitempty"` - IpAddress *string `json:"ipAddress,omitempty"` - Token string `json:"token"` - UpdatedAt time.Time `json:"updatedAt"` - UserAgent *string `json:"userAgent,omitempty"` - UserId string `json:"userId"` -} - // ShareList defines model for ShareList. type ShareList struct { Items []ShareListItem `json:"items"` @@ -6874,395 +6352,11 @@ type UpdateSiteWebDav struct { Enabled bool `json:"enabled"` } -// User defines model for User. -type User struct { - BanExpires *time.Time `json:"banExpires,omitempty"` - BanReason *string `json:"banReason,omitempty"` - Banned *bool `json:"banned,omitempty"` - CreatedAt time.Time `json:"createdAt"` - DisplayUsername *string `json:"displayUsername,omitempty"` - Email string `json:"email"` - EmailVerified *bool `json:"emailVerified,omitempty"` - Id *string `json:"id,omitempty"` - Image *string `json:"image,omitempty"` - LastActiveAt *time.Time `json:"lastActiveAt,omitempty"` - Name string `json:"name"` - Role *string `json:"role,omitempty"` - UpdatedAt time.Time `json:"updatedAt"` - Username *string `json:"username,omitempty"` -} - // WebDavVerificationStatus defines model for WebDavVerificationStatus. type WebDavVerificationStatus string -// BanUserJSONBody defines parameters for BanUser. -type BanUserJSONBody struct { - // BanExpiresIn The number of seconds until the ban expires - BanExpiresIn *float32 `json:"banExpiresIn,omitempty"` - - // BanReason The reason for the ban - BanReason *string `json:"banReason,omitempty"` - - // UserId The user id - UserId string `json:"userId"` -} - -// CreateUserJSONBody defines parameters for CreateUser. -type CreateUserJSONBody struct { - Data *map[string]interface{} `json:"data,omitempty"` - - // Email The email of the user - Email string `json:"email"` - - // Name The name of the user - Name string `json:"name"` - Password *string `json:"password,omitempty"` - Role *CreateUserJSONBody_Role `json:"role,omitempty"` -} - -// CreateUserJSONBodyRole0 defines parameters for CreateUser. -type CreateUserJSONBodyRole0 = string - -// CreateUserJSONBodyRole1 defines parameters for CreateUser. -type CreateUserJSONBodyRole1 = []string - -// CreateUserJSONBody_Role defines parameters for CreateUser. -type CreateUserJSONBody_Role struct { - union json.RawMessage -} - -// GetUserParams defines parameters for GetUser. -type GetUserParams struct { - Id *string `form:"id,omitempty" json:"id,omitempty"` -} - -// PostApiAuthAdminHasPermissionJSONBody defines parameters for PostApiAuthAdminHasPermission. -type PostApiAuthAdminHasPermissionJSONBody struct { - // Permissions The permission to check - Permissions map[string]interface{} `json:"permissions"` -} - -// ImpersonateUserJSONBody defines parameters for ImpersonateUser. -type ImpersonateUserJSONBody struct { - // UserId The user id - UserId string `json:"userId"` -} - -// AdminListUserSessionsJSONBody defines parameters for AdminListUserSessions. -type AdminListUserSessionsJSONBody struct { - // UserId The user id - UserId string `json:"userId"` -} - -// ListUsersParams defines parameters for ListUsers. -type ListUsersParams struct { - SearchValue *string `form:"searchValue,omitempty" json:"searchValue,omitempty"` - SearchField *ListUsersParamsSearchField `form:"searchField,omitempty" json:"searchField,omitempty"` - SearchOperator *ListUsersParamsSearchOperator `form:"searchOperator,omitempty" json:"searchOperator,omitempty"` - Limit *struct { - union json.RawMessage - } `form:"limit,omitempty" json:"limit,omitempty"` - Offset *struct { - union json.RawMessage - } `form:"offset,omitempty" json:"offset,omitempty"` - SortBy *string `form:"sortBy,omitempty" json:"sortBy,omitempty"` - SortDirection *ListUsersParamsSortDirection `form:"sortDirection,omitempty" json:"sortDirection,omitempty"` - FilterField *string `form:"filterField,omitempty" json:"filterField,omitempty"` - FilterValue *struct { - union json.RawMessage - } `form:"filterValue,omitempty" json:"filterValue,omitempty"` - FilterOperator *ListUsersParamsFilterOperator `form:"filterOperator,omitempty" json:"filterOperator,omitempty"` -} - -// ListUsersParamsSearchField defines parameters for ListUsers. -type ListUsersParamsSearchField string - -// ListUsersParamsSearchOperator defines parameters for ListUsers. -type ListUsersParamsSearchOperator string - -// ListUsersParamsLimit0 defines parameters for ListUsers. -type ListUsersParamsLimit0 = string - -// ListUsersParamsLimit1 defines parameters for ListUsers. -type ListUsersParamsLimit1 = float32 - -// ListUsersParamsOffset0 defines parameters for ListUsers. -type ListUsersParamsOffset0 = string - -// ListUsersParamsOffset1 defines parameters for ListUsers. -type ListUsersParamsOffset1 = float32 - -// ListUsersParamsSortDirection defines parameters for ListUsers. -type ListUsersParamsSortDirection string - -// ListUsersParamsFilterValue0 defines parameters for ListUsers. -type ListUsersParamsFilterValue0 struct { - union json.RawMessage -} - -// ListUsersParamsFilterValue00 defines parameters for ListUsers. -type ListUsersParamsFilterValue00 struct { - union json.RawMessage -} - -// ListUsersParamsFilterValue000 defines parameters for ListUsers. -type ListUsersParamsFilterValue000 struct { - union json.RawMessage -} - -// ListUsersParamsFilterValue0000 defines parameters for ListUsers. -type ListUsersParamsFilterValue0000 = string - -// ListUsersParamsFilterValue0001 defines parameters for ListUsers. -type ListUsersParamsFilterValue0001 = float32 - -// ListUsersParamsFilterValue001 defines parameters for ListUsers. -type ListUsersParamsFilterValue001 = bool - -// ListUsersParamsFilterValue01 defines parameters for ListUsers. -type ListUsersParamsFilterValue01 = []string - -// ListUsersParamsFilterValue1 defines parameters for ListUsers. -type ListUsersParamsFilterValue1 = []float32 - -// ListUsersParamsFilterOperator defines parameters for ListUsers. -type ListUsersParamsFilterOperator string - -// RemoveUserJSONBody defines parameters for RemoveUser. -type RemoveUserJSONBody struct { - // UserId The user id - UserId string `json:"userId"` -} - -// RevokeUserSessionJSONBody defines parameters for RevokeUserSession. -type RevokeUserSessionJSONBody struct { - // SessionToken The session token - SessionToken string `json:"sessionToken"` -} - -// RevokeUserSessionsJSONBody defines parameters for RevokeUserSessions. -type RevokeUserSessionsJSONBody struct { - // UserId The user id - UserId string `json:"userId"` -} - -// SetUserRoleJSONBody defines parameters for SetUserRole. -type SetUserRoleJSONBody struct { - // Role The role to set, this can be a string or an array of strings. Eg: `admin` or `[admin, user]` - Role SetUserRoleJSONBody_Role `json:"role"` - - // UserId The user id - UserId string `json:"userId"` -} - -// SetUserRoleJSONBodyRole0 defines parameters for SetUserRole. -type SetUserRoleJSONBodyRole0 = string - -// SetUserRoleJSONBodyRole1 defines parameters for SetUserRole. -type SetUserRoleJSONBodyRole1 = []string - -// SetUserRoleJSONBody_Role defines parameters for SetUserRole. -type SetUserRoleJSONBody_Role struct { - union json.RawMessage -} - -// SetUserPasswordJSONBody defines parameters for SetUserPassword. -type SetUserPasswordJSONBody struct { - // NewPassword The new password - NewPassword string `json:"newPassword"` - - // UserId The user id - UserId string `json:"userId"` -} - -// UnbanUserJSONBody defines parameters for UnbanUser. -type UnbanUserJSONBody struct { - // UserId The user id - UserId string `json:"userId"` -} - -// AdminUpdateUserJSONBody defines parameters for AdminUpdateUser. -type AdminUpdateUserJSONBody struct { - // Data The user data to update - Data map[string]interface{} `json:"data"` - - // UserId The user id - UserId string `json:"userId"` -} - -// PostApiAuthApiKeyCreateJSONBody defines parameters for PostApiAuthApiKeyCreate. -type PostApiAuthApiKeyCreateJSONBody struct { - // ConfigId The configuration ID to use for the API key. If not provided, the default configuration will be used. - ConfigId *string `json:"configId,omitempty"` - - // ExpiresIn Expiration time of the Api Key in seconds - ExpiresIn *float32 `json:"expiresIn,omitempty"` - Metadata interface{} `json:"metadata,omitempty"` - - // Name Name of the Api Key - Name *string `json:"name,omitempty"` - - // OrganizationId Organization Id of the organization that the Api Key belongs to. Eg: 'org-id' - OrganizationId *string `json:"organizationId,omitempty"` - - // Permissions Permissions of the Api Key. - Permissions *map[string][]string `json:"permissions,omitempty"` - - // Prefix Prefix of the Api Key - Prefix *string `json:"prefix,omitempty"` - - // RateLimitEnabled Whether the key has rate limiting enabled. server-only. Eg: true - RateLimitEnabled *bool `json:"rateLimitEnabled,omitempty"` - - // RateLimitMax Maximum amount of requests allowed within a window. Once the `maxRequests` is reached, the request will be rejected until the `timeWindow` has passed, at which point the `timeWindow` will be reset. server-only. Eg: 100 - RateLimitMax *float32 `json:"rateLimitMax,omitempty"` - - // RateLimitTimeWindow The duration in milliseconds where each request is counted. Once the `maxRequests` is reached, the request will be rejected until the `timeWindow` has passed, at which point the `timeWindow` will be reset. server-only. Eg: 1000 - RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"` - - // RefillAmount Amount to refill the remaining count of the Api Key. server-only. Eg: 100 - RefillAmount *float32 `json:"refillAmount,omitempty"` - - // RefillInterval Interval to refill the Api Key in milliseconds. server-only. Eg: 1000 - RefillInterval *float32 `json:"refillInterval,omitempty"` - - // Remaining Remaining number of requests. Server side only - Remaining *float32 `json:"remaining,omitempty"` - - // UserId User Id of the user that the Api Key belongs to. server-only. Eg: "user-id" - UserId *string `json:"userId,omitempty"` -} - -// PostApiAuthApiKeyDeleteJSONBody defines parameters for PostApiAuthApiKeyDelete. -type PostApiAuthApiKeyDeleteJSONBody struct { - // KeyId The id of the API key to delete - KeyId string `json:"keyId"` -} - -// GetApiAuthApiKeyGetParams defines parameters for GetApiAuthApiKeyGet. -type GetApiAuthApiKeyGetParams struct { - ConfigId *string `form:"configId,omitempty" json:"configId,omitempty"` - Id *string `form:"id,omitempty" json:"id,omitempty"` -} - -// PostApiAuthApiKeyUpdateJSONBody defines parameters for PostApiAuthApiKeyUpdate. -type PostApiAuthApiKeyUpdateJSONBody struct { - // ConfigId The configuration ID to use for the API key lookup. If not provided, the default configuration will be used. - ConfigId *string `json:"configId,omitempty"` - - // Enabled Whether the Api Key is enabled or not - Enabled *bool `json:"enabled,omitempty"` - - // ExpiresIn Expiration time of the Api Key in seconds - ExpiresIn *float32 `json:"expiresIn,omitempty"` - - // KeyId The id of the Api Key - KeyId string `json:"keyId"` - Metadata interface{} `json:"metadata,omitempty"` - - // Name The name of the key - Name *string `json:"name,omitempty"` - - // Permissions Update the permissions on the API Key. server-only. - Permissions *map[string][]string `json:"permissions,omitempty"` - - // RateLimitEnabled Whether the key has rate limiting enabled. - RateLimitEnabled *bool `json:"rateLimitEnabled,omitempty"` - - // RateLimitMax Maximum amount of requests allowed within a window. Once the `maxRequests` is reached, the request will be rejected until the `timeWindow` has passed, at which point the `timeWindow` will be reset. server-only. Eg: 100 - RateLimitMax *float32 `json:"rateLimitMax,omitempty"` - - // RateLimitTimeWindow The duration in milliseconds where each request is counted. server-only. Eg: 1000 - RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"` - - // RefillAmount The refill amount - RefillAmount *float32 `json:"refillAmount,omitempty"` - - // RefillInterval The refill interval - RefillInterval *float32 `json:"refillInterval,omitempty"` - - // Remaining The number of remaining requests - Remaining *float32 `json:"remaining,omitempty"` - - // UserId The id of the user which the api key belongs to. server-only. Eg: "some-user-id" - UserId *string `json:"userId,omitempty"` -} - -// PostApiAuthCallbackIdJSONBody defines parameters for PostApiAuthCallbackId. -type PostApiAuthCallbackIdJSONBody struct { - Code *string `json:"code,omitempty"` - DeviceId *string `json:"device_id,omitempty"` - Error *string `json:"error,omitempty"` - ErrorDescription *string `json:"error_description,omitempty"` - Iss *string `json:"iss,omitempty"` - State *string `json:"state,omitempty"` - User *string `json:"user,omitempty"` -} - -// ChangeEmailJSONBody defines parameters for ChangeEmail. -type ChangeEmailJSONBody struct { - // CallbackURL The URL to redirect to after email verification - CallbackURL *string `json:"callbackURL,omitempty"` - - // NewEmail The new email address to set must be a valid email address - NewEmail string `json:"newEmail"` -} - -// ChangeEmail200JSONResponseBodyMessage defines parameters for ChangeEmail. -type ChangeEmail200JSONResponseBodyMessage string - -// ChangePasswordJSONBody defines parameters for ChangePassword. -type ChangePasswordJSONBody struct { - // CurrentPassword The current password is required - CurrentPassword string `json:"currentPassword"` - - // NewPassword The new password to set - NewPassword string `json:"newPassword"` - - // RevokeOtherSessions Must be a boolean value - RevokeOtherSessions *bool `json:"revokeOtherSessions,omitempty"` -} - -// DeleteUserJSONBody defines parameters for DeleteUser. -type DeleteUserJSONBody struct { - // CallbackURL The callback URL to redirect to after the user is deleted - CallbackURL *string `json:"callbackURL,omitempty"` - - // Password The user's password. Required if session is not fresh - Password *string `json:"password,omitempty"` - - // Token The deletion verification token - Token *string `json:"token,omitempty"` -} - -// DeleteUser200JSONResponseBodyMessage defines parameters for DeleteUser. -type DeleteUser200JSONResponseBodyMessage string - -// GetApiAuthDeleteUserCallbackParams defines parameters for GetApiAuthDeleteUserCallback. -type GetApiAuthDeleteUserCallbackParams struct { - Token *string `form:"token,omitempty" json:"token,omitempty"` - CallbackURL *string `form:"callbackURL,omitempty" json:"callbackURL,omitempty"` -} - -// GetApiAuthDeleteUserCallback200JSONResponseBodyMessage defines parameters for GetApiAuthDeleteUserCallback. -type GetApiAuthDeleteUserCallback200JSONResponseBodyMessage string - -// GetApiAuthDeviceParams defines parameters for GetApiAuthDevice. -type GetApiAuthDeviceParams struct { - UserCode *string `form:"user_code,omitempty" json:"user_code,omitempty"` -} - -// GetApiAuthDevice200JSONResponseBodyStatus defines parameters for GetApiAuthDevice. -type GetApiAuthDevice200JSONResponseBodyStatus string - -// PostApiAuthDeviceApproveJSONBody defines parameters for PostApiAuthDeviceApprove. -type PostApiAuthDeviceApproveJSONBody struct { - // UserCode The user code to approve - UserCode string `json:"userCode"` -} - -// PostApiAuthDeviceCodeJSONBody defines parameters for PostApiAuthDeviceCode. -type PostApiAuthDeviceCodeJSONBody struct { +// CreateDeviceAuthorizationJSONBody defines parameters for CreateDeviceAuthorization. +type CreateDeviceAuthorizationJSONBody struct { // ClientId The client ID of the application ClientId string `json:"client_id"` @@ -7273,17 +6367,11 @@ type PostApiAuthDeviceCodeJSONBody struct { UserId *string `json:"user_id,omitempty"` } -// PostApiAuthDeviceCode400JSONResponseBodyError defines parameters for PostApiAuthDeviceCode. -type PostApiAuthDeviceCode400JSONResponseBodyError string +// CreateDeviceAuthorization400JSONResponseBodyError defines parameters for CreateDeviceAuthorization. +type CreateDeviceAuthorization400JSONResponseBodyError string -// PostApiAuthDeviceDenyJSONBody defines parameters for PostApiAuthDeviceDeny. -type PostApiAuthDeviceDenyJSONBody struct { - // UserCode The user code to deny - UserCode string `json:"userCode"` -} - -// PostApiAuthDeviceTokenJSONBody defines parameters for PostApiAuthDeviceToken. -type PostApiAuthDeviceTokenJSONBody struct { +// CreateDeviceAccessTokenJSONBody defines parameters for CreateDeviceAccessToken. +type CreateDeviceAccessTokenJSONBody struct { // ClientId The client ID of the application ClientId string `json:"client_id"` @@ -7294,85 +6382,8 @@ type PostApiAuthDeviceTokenJSONBody struct { GrantType interface{} `json:"grant_type"` } -// PostApiAuthDeviceToken400JSONResponseBodyError defines parameters for PostApiAuthDeviceToken. -type PostApiAuthDeviceToken400JSONResponseBodyError string - -// PostApiAuthGetAccessTokenJSONBody defines parameters for PostApiAuthGetAccessToken. -type PostApiAuthGetAccessTokenJSONBody struct { - union json.RawMessage -} - -// PostApiAuthGetAccessTokenJSONBody0 defines parameters for PostApiAuthGetAccessToken. -type PostApiAuthGetAccessTokenJSONBody0 struct { - // AccountId The Better Auth account ID - AccountId string `json:"accountId"` - - // UserId The user ID associated with the account - UserId *string `json:"userId,omitempty"` -} - -// PostApiAuthGetAccessTokenJSONBody1 defines parameters for PostApiAuthGetAccessToken. -type PostApiAuthGetAccessTokenJSONBody1 struct { - // UseAccountCookie Select the current OAuth account from its signed cookie - UseAccountCookie interface{} `json:"useAccountCookie"` - - // UserId The user ID associated with the account - UserId *string `json:"userId,omitempty"` -} - -// GetSessionPostJSONBody defines parameters for GetSessionPost. -type GetSessionPostJSONBody = map[string]interface{} - -// PostApiAuthIsUsernameAvailableJSONBody defines parameters for PostApiAuthIsUsernameAvailable. -type PostApiAuthIsUsernameAvailableJSONBody struct { - // Username The username to check - Username string `json:"username"` -} - -// GetJSONWebKeySet200JSONResponseBodyKeysUse defines parameters for GetJSONWebKeySet. -type GetJSONWebKeySet200JSONResponseBodyKeysUse string - -// LinkSocialAccountJSONBody defines parameters for LinkSocialAccount. -type LinkSocialAccountJSONBody struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - - // AdditionalParams Extra query parameters to append to the provider authorization URL (e.g. Cognito identity_provider, Google hd). - AdditionalParams *map[string]string `json:"additionalParams,omitempty"` - - // CallbackURL The URL to redirect to after the user has signed in - CallbackURL *string `json:"callbackURL,omitempty"` - - // DisableRedirect Disable automatic redirection to the provider. Useful for handling the redirection yourself - DisableRedirect *bool `json:"disableRedirect,omitempty"` - - // ErrorCallbackURL The URL to redirect to if there is an error during the link process - ErrorCallbackURL *string `json:"errorCallbackURL,omitempty"` - IdToken *struct { - AccessToken *string `json:"accessToken,omitempty"` - Nonce *string `json:"nonce,omitempty"` - RefreshToken *string `json:"refreshToken,omitempty"` - Token string `json:"token"` - } `json:"idToken,omitempty"` - - // LoginHint The login hint to use for the authorization code request - LoginHint *string `json:"loginHint,omitempty"` - Provider LinkSocialAccountJSONBody_Provider `json:"provider"` - RequestSignUp *bool `json:"requestSignUp,omitempty"` - - // Scopes Additional scopes to request from the provider - Scopes *[]string `json:"scopes,omitempty"` -} - -// LinkSocialAccountJSONBodyProvider0 defines parameters for LinkSocialAccount. -type LinkSocialAccountJSONBodyProvider0 string - -// LinkSocialAccountJSONBodyProvider1 defines parameters for LinkSocialAccount. -type LinkSocialAccountJSONBodyProvider1 = string - -// LinkSocialAccountJSONBody_Provider defines parameters for LinkSocialAccount. -type LinkSocialAccountJSONBody_Provider struct { - union json.RawMessage -} +// CreateDeviceAccessToken400JSONResponseBodyError defines parameters for CreateDeviceAccessToken. +type CreateDeviceAccessToken400JSONResponseBodyError string // ListAuthorizationDetailsCatalogParams defines parameters for ListAuthorizationDetailsCatalog. type ListAuthorizationDetailsCatalogParams struct { @@ -7380,825 +6391,225 @@ type ListAuthorizationDetailsCatalogParams struct { Offset *int `form:"offset,omitempty" json:"offset,omitempty"` } -// GetApiAuthOauth2AuthorizeParams defines parameters for GetApiAuthOauth2Authorize. -type GetApiAuthOauth2AuthorizeParams struct { - // ResponseType OAuth 2.1 response type (e.g., 'code') - ResponseType *string `form:"response_type,omitempty" json:"response_type,omitempty"` - - // ClientId OAuth 2.1 client ID - ClientId string `form:"client_id" json:"client_id"` - - // RedirectUri OAuth 2.1 redirect URI - RedirectUri *string `form:"redirect_uri,omitempty" json:"redirect_uri,omitempty"` - - // Scope OAuth 2.1 scopes (space-separated) - Scope *string `form:"scope,omitempty" json:"scope,omitempty"` - - // State OAuth 2.1 state parameter - State *string `form:"state,omitempty" json:"state,omitempty"` - - // RequestUri Pushed Authorization Request URI referencing stored parameters - RequestUri *string `form:"request_uri,omitempty" json:"request_uri,omitempty"` - - // CodeChallenge PKCE code challenge - CodeChallenge *string `form:"code_challenge,omitempty" json:"code_challenge,omitempty"` - - // CodeChallengeMethod PKCE code challenge method - CodeChallengeMethod *string `form:"code_challenge_method,omitempty" json:"code_challenge_method,omitempty"` - - // Nonce OpenID Connect nonce - Nonce *string `form:"nonce,omitempty" json:"nonce,omitempty"` - - // MaxAge Maximum authentication age in seconds; forces re-authentication when exceeded - MaxAge *int `form:"max_age,omitempty" json:"max_age,omitempty"` - - // Resource Requested protected resource(s) for the access token. May be supplied multiple times as repeated 'resource' query parameters (RFC 8707) or as an array of strings. - Resource *[]string `form:"resource,omitempty" json:"resource,omitempty"` - - // Prompt OAuth2 prompt parameter - Prompt *string `form:"prompt,omitempty" json:"prompt,omitempty"` +// CreateDynamicOAuthClientRegistrationJSONBody defines parameters for CreateDynamicOAuthClientRegistration. +type CreateDynamicOAuthClientRegistrationJSONBody struct { + AuthorizationDetailsTypes *[]string `json:"authorization_details_types,omitempty"` + BackchannelLogoutSessionRequired *bool `json:"backchannel_logout_session_required,omitempty"` + BackchannelLogoutUri *string `json:"backchannel_logout_uri,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientUri *string `json:"client_uri,omitempty"` + Contacts *[]string `json:"contacts,omitempty"` + DpopBoundAccessTokens *bool `json:"dpop_bound_access_tokens,omitempty"` + GrantTypes *[]string `json:"grant_types,omitempty"` + Jwks *CreateDynamicOAuthClientRegistrationJSONBody_Jwks `json:"jwks,omitempty"` + JwksUri *string `json:"jwks_uri,omitempty"` + LogoUri *string `json:"logo_uri,omitempty"` + PolicyUri *string `json:"policy_uri,omitempty"` + PostLogoutRedirectUris *[]string `json:"post_logout_redirect_uris,omitempty"` + RedirectUris *[]string `json:"redirect_uris,omitempty"` + RequirePkce *bool `json:"require_pkce,omitempty"` + Resources *[]string `json:"resources,omitempty"` + ResponseTypes *[]string `json:"response_types,omitempty"` + Scope *string `json:"scope,omitempty"` + SoftwareId *string `json:"software_id,omitempty"` + SoftwareStatement *string `json:"software_statement,omitempty"` + SoftwareVersion *string `json:"software_version,omitempty"` + SubjectType *CreateDynamicOAuthClientRegistrationJSONBodySubjectType `json:"subject_type,omitempty"` + TokenEndpointAuthMethod *string `json:"token_endpoint_auth_method,omitempty"` + TosUri *string `json:"tos_uri,omitempty"` + Type *CreateDynamicOAuthClientRegistrationJSONBodyType `json:"type,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } -// PostApiAuthOauth2AuthorizeParams defines parameters for PostApiAuthOauth2Authorize. -type PostApiAuthOauth2AuthorizeParams struct { - // ResponseType OAuth 2.1 response type (e.g., 'code') - ResponseType *string `form:"response_type,omitempty" json:"response_type,omitempty"` +// CreateDynamicOAuthClientRegistrationJSONBodyJwks0 defines parameters for CreateDynamicOAuthClientRegistration. +type CreateDynamicOAuthClientRegistrationJSONBodyJwks0 = []map[string]interface{} - // ClientId OAuth 2.1 client ID - ClientId string `form:"client_id" json:"client_id"` - - // RedirectUri OAuth 2.1 redirect URI - RedirectUri *string `form:"redirect_uri,omitempty" json:"redirect_uri,omitempty"` - - // Scope OAuth 2.1 scopes (space-separated) - Scope *string `form:"scope,omitempty" json:"scope,omitempty"` - - // State OAuth 2.1 state parameter - State *string `form:"state,omitempty" json:"state,omitempty"` - - // RequestUri Pushed Authorization Request URI referencing stored parameters - RequestUri *string `form:"request_uri,omitempty" json:"request_uri,omitempty"` - - // CodeChallenge PKCE code challenge - CodeChallenge *string `form:"code_challenge,omitempty" json:"code_challenge,omitempty"` - - // CodeChallengeMethod PKCE code challenge method - CodeChallengeMethod *string `form:"code_challenge_method,omitempty" json:"code_challenge_method,omitempty"` - - // Nonce OpenID Connect nonce - Nonce *string `form:"nonce,omitempty" json:"nonce,omitempty"` - - // MaxAge Maximum authentication age in seconds; forces re-authentication when exceeded - MaxAge *int `form:"max_age,omitempty" json:"max_age,omitempty"` - - // Resource Requested protected resource(s) for the access token. May be supplied multiple times as repeated 'resource' query parameters (RFC 8707) or as an array of strings. - Resource *[]string `form:"resource,omitempty" json:"resource,omitempty"` - - // Prompt OAuth2 prompt parameter - Prompt *string `form:"prompt,omitempty" json:"prompt,omitempty"` +// CreateDynamicOAuthClientRegistrationJSONBodyJwks1 defines parameters for CreateDynamicOAuthClientRegistration. +type CreateDynamicOAuthClientRegistrationJSONBodyJwks1 struct { + Keys *[]map[string]interface{} `json:"keys,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } -// PostApiAuthOauth2ClientRotateSecretJSONBody defines parameters for PostApiAuthOauth2ClientRotateSecret. -type PostApiAuthOauth2ClientRotateSecretJSONBody struct { - ClientId string `json:"client_id"` -} - -// PostApiAuthOauth2ConsentJSONBody defines parameters for PostApiAuthOauth2Consent. -type PostApiAuthOauth2ConsentJSONBody struct { - // Accept Accept or deny user consent for a set of scopes - Accept bool `json:"accept"` - AuthorizationDetails *[]map[string]interface{} `json:"authorization_details,omitempty"` - Claims *PostApiAuthOauth2ConsentJSONBody_Claims `json:"claims,omitempty"` - OauthQuery *string `json:"oauth_query,omitempty"` - Scope *string `json:"scope,omitempty"` -} - -// PostApiAuthOauth2ConsentJSONBodyClaims0 defines parameters for PostApiAuthOauth2Consent. -type PostApiAuthOauth2ConsentJSONBodyClaims0 = string - -// PostApiAuthOauth2ConsentJSONBodyClaims1 defines parameters for PostApiAuthOauth2Consent. -type PostApiAuthOauth2ConsentJSONBodyClaims1 map[string]interface{} - -// PostApiAuthOauth2ConsentJSONBody_Claims defines parameters for PostApiAuthOauth2Consent. -type PostApiAuthOauth2ConsentJSONBody_Claims struct { +// CreateDynamicOAuthClientRegistrationJSONBody_Jwks defines parameters for CreateDynamicOAuthClientRegistration. +type CreateDynamicOAuthClientRegistrationJSONBody_Jwks struct { union json.RawMessage } -// PostApiAuthOauth2ContinueJSONBody defines parameters for PostApiAuthOauth2Continue. -type PostApiAuthOauth2ContinueJSONBody struct { - Created *bool `json:"created,omitempty"` - OauthQuery *string `json:"oauth_query,omitempty"` - PostLogin *bool `json:"postLogin,omitempty"` - Selected *bool `json:"selected,omitempty"` +// CreateDynamicOAuthClientRegistrationJSONBodySubjectType defines parameters for CreateDynamicOAuthClientRegistration. +type CreateDynamicOAuthClientRegistrationJSONBodySubjectType string + +// CreateDynamicOAuthClientRegistrationJSONBodyType defines parameters for CreateDynamicOAuthClientRegistration. +type CreateDynamicOAuthClientRegistrationJSONBodyType string + +// CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks0 defines parameters for CreateDynamicOAuthClientRegistration. +type CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks0 = []map[string]interface{} + +// CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1 defines parameters for CreateDynamicOAuthClientRegistration. +type CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1 struct { + Keys *[]map[string]interface{} `json:"keys,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } -// PostApiAuthOauth2CreateClientJSONBody defines parameters for PostApiAuthOauth2CreateClient. -type PostApiAuthOauth2CreateClientJSONBody struct { - BackchannelLogoutSessionRequired *bool `json:"backchannel_logout_session_required,omitempty"` - BackchannelLogoutUri *string `json:"backchannel_logout_uri,omitempty"` - ClientName *string `json:"client_name,omitempty"` - ClientUri *string `json:"client_uri,omitempty"` - Contacts *[]string `json:"contacts,omitempty"` - DpopBoundAccessTokens *bool `json:"dpop_bound_access_tokens,omitempty"` - GrantTypes *[]string `json:"grant_types,omitempty"` - Jwks *PostApiAuthOauth2CreateClientJSONBody_Jwks `json:"jwks,omitempty"` - JwksUri *string `json:"jwks_uri,omitempty"` - LogoUri *string `json:"logo_uri,omitempty"` - PolicyUri *string `json:"policy_uri,omitempty"` - PostLogoutRedirectUris *[]string `json:"post_logout_redirect_uris,omitempty"` - RedirectUris *[]string `json:"redirect_uris,omitempty"` - ResponseTypes *[]PostApiAuthOauth2CreateClientJSONBodyResponseTypes `json:"response_types,omitempty"` - Scope *string `json:"scope,omitempty"` - SoftwareId *string `json:"software_id,omitempty"` - SoftwareStatement *string `json:"software_statement,omitempty"` - SoftwareVersion *string `json:"software_version,omitempty"` - TokenEndpointAuthMethod *string `json:"token_endpoint_auth_method,omitempty"` - TosUri *string `json:"tos_uri,omitempty"` - Type *PostApiAuthOauth2CreateClientJSONBodyType `json:"type,omitempty"` -} - -// PostApiAuthOauth2CreateClientJSONBodyJwks0 defines parameters for PostApiAuthOauth2CreateClient. -type PostApiAuthOauth2CreateClientJSONBodyJwks0 = []map[string]interface{} - -// PostApiAuthOauth2CreateClientJSONBodyJwks1 defines parameters for PostApiAuthOauth2CreateClient. -type PostApiAuthOauth2CreateClientJSONBodyJwks1 struct { - Keys []map[string]interface{} `json:"keys"` -} - -// PostApiAuthOauth2CreateClientJSONBody_Jwks defines parameters for PostApiAuthOauth2CreateClient. -type PostApiAuthOauth2CreateClientJSONBody_Jwks struct { +// CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks defines parameters for CreateDynamicOAuthClientRegistration. +type CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks struct { union json.RawMessage } -// PostApiAuthOauth2CreateClientJSONBodyResponseTypes defines parameters for PostApiAuthOauth2CreateClient. -type PostApiAuthOauth2CreateClientJSONBodyResponseTypes string +// CreateDynamicOAuthClientRegistration201JSONResponseBodySubjectType defines parameters for CreateDynamicOAuthClientRegistration. +type CreateDynamicOAuthClientRegistration201JSONResponseBodySubjectType string -// PostApiAuthOauth2CreateClientJSONBodyType defines parameters for PostApiAuthOauth2CreateClient. -type PostApiAuthOauth2CreateClientJSONBodyType string +// CreateDynamicOAuthClientRegistration201JSONResponseBodyType defines parameters for CreateDynamicOAuthClientRegistration. +type CreateDynamicOAuthClientRegistration201JSONResponseBodyType string -// PostApiAuthOauth2CreateClient201JSONResponseBodyResponseTypes defines parameters for PostApiAuthOauth2CreateClient. -type PostApiAuthOauth2CreateClient201JSONResponseBodyResponseTypes string - -// PostApiAuthOauth2CreateClient201JSONResponseBodyType defines parameters for PostApiAuthOauth2CreateClient. -type PostApiAuthOauth2CreateClient201JSONResponseBodyType string - -// PostApiAuthOauth2DeleteClientJSONBody defines parameters for PostApiAuthOauth2DeleteClient. -type PostApiAuthOauth2DeleteClientJSONBody struct { - ClientId string `json:"client_id"` +// CreateDynamicOAuthClientRegistration201JSONResponseBody defines parameters for CreateDynamicOAuthClientRegistration. +type CreateDynamicOAuthClientRegistration201JSONResponseBody struct { + AuthorizationDetailsTypes *[]string `json:"authorization_details_types,omitempty"` + BackchannelLogoutSessionRequired *bool `json:"backchannel_logout_session_required,omitempty"` + BackchannelLogoutUri *string `json:"backchannel_logout_uri,omitempty"` + ClientId string `json:"client_id"` + ClientIdIssuedAt *int `json:"client_id_issued_at,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientSecret *string `json:"client_secret,omitempty"` + ClientSecretExpiresAt *int `json:"client_secret_expires_at,omitempty"` + ClientUri *string `json:"client_uri,omitempty"` + Contacts *[]string `json:"contacts,omitempty"` + DpopBoundAccessTokens *bool `json:"dpop_bound_access_tokens,omitempty"` + GrantTypes *[]string `json:"grant_types,omitempty"` + Jwks *CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks `json:"jwks,omitempty"` + JwksUri *string `json:"jwks_uri,omitempty"` + LogoUri *string `json:"logo_uri,omitempty"` + PolicyUri *string `json:"policy_uri,omitempty"` + PostLogoutRedirectUris *[]string `json:"post_logout_redirect_uris,omitempty"` + RedirectUris *[]string `json:"redirect_uris,omitempty"` + RegistrationAccessToken string `json:"registration_access_token"` + RegistrationClientUri string `json:"registration_client_uri"` + RequirePkce *bool `json:"require_pkce,omitempty"` + Resources *[]string `json:"resources,omitempty"` + ResponseTypes *[]string `json:"response_types,omitempty"` + Scope *string `json:"scope,omitempty"` + SoftwareId *string `json:"software_id,omitempty"` + SoftwareStatement *string `json:"software_statement,omitempty"` + SoftwareVersion *string `json:"software_version,omitempty"` + SubjectType *CreateDynamicOAuthClientRegistration201JSONResponseBodySubjectType `json:"subject_type,omitempty"` + TokenEndpointAuthMethod *string `json:"token_endpoint_auth_method,omitempty"` + TosUri *string `json:"tos_uri,omitempty"` + Type *CreateDynamicOAuthClientRegistration201JSONResponseBodyType `json:"type,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } -// PostApiAuthOauth2DeleteConsentJSONBody defines parameters for PostApiAuthOauth2DeleteConsent. -type PostApiAuthOauth2DeleteConsentJSONBody struct { - Id string `json:"id"` +// GetDynamicOAuthClientRegistration200JSONResponseBodyJwks0 defines parameters for GetDynamicOAuthClientRegistration. +type GetDynamicOAuthClientRegistration200JSONResponseBodyJwks0 = []map[string]interface{} + +// GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1 defines parameters for GetDynamicOAuthClientRegistration. +type GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1 struct { + Keys *[]map[string]interface{} `json:"keys,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } -// GetApiAuthOauth2EndSessionParams defines parameters for GetApiAuthOauth2EndSession. -type GetApiAuthOauth2EndSessionParams struct { - IdTokenHint *string `form:"id_token_hint,omitempty" json:"id_token_hint,omitempty"` - ClientId *string `form:"client_id,omitempty" json:"client_id,omitempty"` - PostLogoutRedirectUri *string `form:"post_logout_redirect_uri,omitempty" json:"post_logout_redirect_uri,omitempty"` - State *string `form:"state,omitempty" json:"state,omitempty"` -} - -// GetApiAuthOauth2GetClientParams defines parameters for GetApiAuthOauth2GetClient. -type GetApiAuthOauth2GetClientParams struct { - ClientId *string `form:"client_id,omitempty" json:"client_id,omitempty"` -} - -// GetApiAuthOauth2GetConsentParams defines parameters for GetApiAuthOauth2GetConsent. -type GetApiAuthOauth2GetConsentParams struct { - Id *string `form:"id,omitempty" json:"id,omitempty"` -} - -// PostApiAuthOauth2IntrospectJSONBody defines parameters for PostApiAuthOauth2Introspect. -type PostApiAuthOauth2IntrospectJSONBody struct { - // ClientId OAuth2 client ID - ClientId *string `json:"client_id,omitempty"` - - // ClientSecret OAuth2 client secret - ClientSecret *string `json:"client_secret,omitempty"` - - // Token The token to introspect (access or refresh token) - Token string `json:"token"` - - // TokenTypeHint Hint about the token type. Recognized values: `access_token`, `refresh_token`. - TokenTypeHint *string `json:"token_type_hint,omitempty"` -} - -// PostApiAuthOauth2ParJSONBody defines parameters for PostApiAuthOauth2Par. -type PostApiAuthOauth2ParJSONBody map[string]string - -// GetApiAuthOauth2PublicClientParams defines parameters for GetApiAuthOauth2PublicClient. -type GetApiAuthOauth2PublicClientParams struct { - ClientId *string `form:"client_id,omitempty" json:"client_id,omitempty"` -} - -// PostApiAuthOauth2PublicClientPreloginJSONBody defines parameters for PostApiAuthOauth2PublicClientPrelogin. -type PostApiAuthOauth2PublicClientPreloginJSONBody struct { - ClientId string `json:"client_id"` - OauthQuery *string `json:"oauth_query,omitempty"` -} - -// PostApiAuthOauth2RegisterJSONBody defines parameters for PostApiAuthOauth2Register. -type PostApiAuthOauth2RegisterJSONBody struct { - AuthorizationDetailsTypes *[]string `json:"authorization_details_types,omitempty"` - BackchannelLogoutSessionRequired *bool `json:"backchannel_logout_session_required,omitempty"` - BackchannelLogoutUri *string `json:"backchannel_logout_uri,omitempty"` - ClientName *string `json:"client_name,omitempty"` - ClientUri *string `json:"client_uri,omitempty"` - Contacts *[]string `json:"contacts,omitempty"` - DpopBoundAccessTokens *bool `json:"dpop_bound_access_tokens,omitempty"` - GrantTypes *[]string `json:"grant_types,omitempty"` - Jwks *PostApiAuthOauth2RegisterJSONBody_Jwks `json:"jwks,omitempty"` - JwksUri *string `json:"jwks_uri,omitempty"` - LogoUri *string `json:"logo_uri,omitempty"` - PolicyUri *string `json:"policy_uri,omitempty"` - PostLogoutRedirectUris *[]string `json:"post_logout_redirect_uris,omitempty"` - RedirectUris *[]string `json:"redirect_uris,omitempty"` - Resources *[]string `json:"resources,omitempty"` - ResponseTypes *[]PostApiAuthOauth2RegisterJSONBodyResponseTypes `json:"response_types,omitempty"` - Scope *string `json:"scope,omitempty"` - SkipConsent *string `json:"skip_consent,omitempty"` - SoftwareId *string `json:"software_id,omitempty"` - SoftwareStatement *string `json:"software_statement,omitempty"` - SoftwareVersion *string `json:"software_version,omitempty"` - SubjectType *PostApiAuthOauth2RegisterJSONBodySubjectType `json:"subject_type,omitempty"` - TokenEndpointAuthMethod *string `json:"token_endpoint_auth_method,omitempty"` - TosUri *string `json:"tos_uri,omitempty"` - Type *PostApiAuthOauth2RegisterJSONBodyType `json:"type,omitempty"` -} - -// PostApiAuthOauth2RegisterJSONBodyJwks0 defines parameters for PostApiAuthOauth2Register. -type PostApiAuthOauth2RegisterJSONBodyJwks0 = []map[string]interface{} - -// PostApiAuthOauth2RegisterJSONBodyJwks1 defines parameters for PostApiAuthOauth2Register. -type PostApiAuthOauth2RegisterJSONBodyJwks1 struct { - Keys []map[string]interface{} `json:"keys"` -} - -// PostApiAuthOauth2RegisterJSONBody_Jwks defines parameters for PostApiAuthOauth2Register. -type PostApiAuthOauth2RegisterJSONBody_Jwks struct { +// GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks defines parameters for GetDynamicOAuthClientRegistration. +type GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks struct { union json.RawMessage } -// PostApiAuthOauth2RegisterJSONBodyResponseTypes defines parameters for PostApiAuthOauth2Register. -type PostApiAuthOauth2RegisterJSONBodyResponseTypes string +// GetDynamicOAuthClientRegistration200JSONResponseBodySubjectType defines parameters for GetDynamicOAuthClientRegistration. +type GetDynamicOAuthClientRegistration200JSONResponseBodySubjectType string -// PostApiAuthOauth2RegisterJSONBodySubjectType defines parameters for PostApiAuthOauth2Register. -type PostApiAuthOauth2RegisterJSONBodySubjectType string - -// PostApiAuthOauth2RegisterJSONBodyType defines parameters for PostApiAuthOauth2Register. -type PostApiAuthOauth2RegisterJSONBodyType string - -// PostApiAuthOauth2Register201JSONResponseBodyResponseTypes defines parameters for PostApiAuthOauth2Register. -type PostApiAuthOauth2Register201JSONResponseBodyResponseTypes string - -// PostApiAuthOauth2Register201JSONResponseBodyType defines parameters for PostApiAuthOauth2Register. -type PostApiAuthOauth2Register201JSONResponseBodyType string +// GetDynamicOAuthClientRegistration200JSONResponseBodyType defines parameters for GetDynamicOAuthClientRegistration. +type GetDynamicOAuthClientRegistration200JSONResponseBodyType string // GetDynamicOAuthClientRegistration200JSONResponseBody defines parameters for GetDynamicOAuthClientRegistration. type GetDynamicOAuthClientRegistration200JSONResponseBody struct { - ClientId string `json:"client_id"` - RegistrationAccessToken string `json:"registration_access_token"` - RegistrationClientUri string `json:"registration_client_uri"` - Scope *string `json:"scope,omitempty"` - AdditionalProperties map[string]interface{} `json:"-"` + AuthorizationDetailsTypes *[]string `json:"authorization_details_types,omitempty"` + BackchannelLogoutSessionRequired *bool `json:"backchannel_logout_session_required,omitempty"` + BackchannelLogoutUri *string `json:"backchannel_logout_uri,omitempty"` + ClientId string `json:"client_id"` + ClientIdIssuedAt *int `json:"client_id_issued_at,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientSecret *string `json:"client_secret,omitempty"` + ClientSecretExpiresAt *int `json:"client_secret_expires_at,omitempty"` + ClientUri *string `json:"client_uri,omitempty"` + Contacts *[]string `json:"contacts,omitempty"` + DpopBoundAccessTokens *bool `json:"dpop_bound_access_tokens,omitempty"` + GrantTypes *[]string `json:"grant_types,omitempty"` + Jwks *GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks `json:"jwks,omitempty"` + JwksUri *string `json:"jwks_uri,omitempty"` + LogoUri *string `json:"logo_uri,omitempty"` + PolicyUri *string `json:"policy_uri,omitempty"` + PostLogoutRedirectUris *[]string `json:"post_logout_redirect_uris,omitempty"` + RedirectUris *[]string `json:"redirect_uris,omitempty"` + RegistrationAccessToken string `json:"registration_access_token"` + RegistrationClientUri string `json:"registration_client_uri"` + RequirePkce *bool `json:"require_pkce,omitempty"` + Resources *[]string `json:"resources,omitempty"` + ResponseTypes *[]string `json:"response_types,omitempty"` + Scope *string `json:"scope,omitempty"` + SoftwareId *string `json:"software_id,omitempty"` + SoftwareStatement *string `json:"software_statement,omitempty"` + SoftwareVersion *string `json:"software_version,omitempty"` + SubjectType *GetDynamicOAuthClientRegistration200JSONResponseBodySubjectType `json:"subject_type,omitempty"` + TokenEndpointAuthMethod *string `json:"token_endpoint_auth_method,omitempty"` + TosUri *string `json:"tos_uri,omitempty"` + Type *GetDynamicOAuthClientRegistration200JSONResponseBodyType `json:"type,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } // UpdateDynamicOAuthClientRegistrationJSONBody defines parameters for UpdateDynamicOAuthClientRegistration. type UpdateDynamicOAuthClientRegistrationJSONBody map[string]interface{} +// UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks0 defines parameters for UpdateDynamicOAuthClientRegistration. +type UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks0 = []map[string]interface{} + +// UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1 defines parameters for UpdateDynamicOAuthClientRegistration. +type UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1 struct { + Keys *[]map[string]interface{} `json:"keys,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks defines parameters for UpdateDynamicOAuthClientRegistration. +type UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks struct { + union json.RawMessage +} + +// UpdateDynamicOAuthClientRegistration200JSONResponseBodySubjectType defines parameters for UpdateDynamicOAuthClientRegistration. +type UpdateDynamicOAuthClientRegistration200JSONResponseBodySubjectType string + +// UpdateDynamicOAuthClientRegistration200JSONResponseBodyType defines parameters for UpdateDynamicOAuthClientRegistration. +type UpdateDynamicOAuthClientRegistration200JSONResponseBodyType string + // UpdateDynamicOAuthClientRegistration200JSONResponseBody defines parameters for UpdateDynamicOAuthClientRegistration. type UpdateDynamicOAuthClientRegistration200JSONResponseBody struct { - ClientId string `json:"client_id"` - RegistrationAccessToken string `json:"registration_access_token"` - RegistrationClientUri string `json:"registration_client_uri"` - Scope *string `json:"scope,omitempty"` - AdditionalProperties map[string]interface{} `json:"-"` -} - -// PostApiAuthOauth2RevokeJSONBody defines parameters for PostApiAuthOauth2Revoke. -type PostApiAuthOauth2RevokeJSONBody struct { - // ClientId OAuth2 client ID - ClientId *string `json:"client_id,omitempty"` - - // ClientSecret OAuth2 client secret - ClientSecret *string `json:"client_secret,omitempty"` - - // Token The token to revoke (access or refresh token) - Token string `json:"token"` - - // TokenTypeHint Hint about the token type. Recognized values: `access_token`, `refresh_token`. - TokenTypeHint *string `json:"token_type_hint,omitempty"` -} - -// PostApiAuthOauth2TokenJSONBody defines parameters for PostApiAuthOauth2Token. -type PostApiAuthOauth2TokenJSONBody struct { - // ClientId OAuth2 client ID - ClientId *string `json:"client_id,omitempty"` - - // ClientSecret OAuth2 client secret - ClientSecret *string `json:"client_secret,omitempty"` - - // Code Authorization code (for authorization_code grant) - Code *string `json:"code,omitempty"` - - // CodeVerifier PKCE code verifier (for authorization_code grant) - CodeVerifier *string `json:"code_verifier,omitempty"` - - // GrantType OAuth2 grant type - GrantType string `json:"grant_type"` - - // RedirectUri Redirect URI (for authorization_code grant) - RedirectUri *string `json:"redirect_uri,omitempty"` - - // RefreshToken Refresh token (for refresh_token grant) - RefreshToken *string `json:"refresh_token,omitempty"` - - // Resource Requested protected resource(s) for the access token - Resource *PostApiAuthOauth2TokenJSONBody_Resource `json:"resource,omitempty"` - - // Scope Requested scopes (for client_credentials grant) - Scope *string `json:"scope,omitempty"` -} - -// PostApiAuthOauth2TokenParams defines parameters for PostApiAuthOauth2Token. -type PostApiAuthOauth2TokenParams struct { - // DPoP RFC 9449 DPoP proof JWT for issuing DPoP-bound tokens - DPoP *string `json:"DPoP,omitempty"` -} - -// PostApiAuthOauth2TokenJSONBodyResource0 defines parameters for PostApiAuthOauth2Token. -type PostApiAuthOauth2TokenJSONBodyResource0 = string - -// PostApiAuthOauth2TokenJSONBodyResource1 defines parameters for PostApiAuthOauth2Token. -type PostApiAuthOauth2TokenJSONBodyResource1 = []string - -// PostApiAuthOauth2TokenJSONBody_Resource defines parameters for PostApiAuthOauth2Token. -type PostApiAuthOauth2TokenJSONBody_Resource struct { - union json.RawMessage -} - -// PostApiAuthOauth2Token200JSONResponseBodyTokenType defines parameters for PostApiAuthOauth2Token. -type PostApiAuthOauth2Token200JSONResponseBodyTokenType string - -// PostApiAuthOauth2UpdateClientJSONBody defines parameters for PostApiAuthOauth2UpdateClient. -type PostApiAuthOauth2UpdateClientJSONBody struct { - ClientId string `json:"client_id"` - Update struct { - BackchannelLogoutSessionRequired *bool `json:"backchannel_logout_session_required,omitempty"` - BackchannelLogoutUri *string `json:"backchannel_logout_uri,omitempty"` - ClientName *string `json:"client_name,omitempty"` - ClientUri *string `json:"client_uri,omitempty"` - Contacts *[]string `json:"contacts,omitempty"` - GrantTypes *[]string `json:"grant_types,omitempty"` - LogoUri *string `json:"logo_uri,omitempty"` - PolicyUri *string `json:"policy_uri,omitempty"` - PostLogoutRedirectUris *[]string `json:"post_logout_redirect_uris,omitempty"` - RedirectUris *[]string `json:"redirect_uris,omitempty"` - ResponseTypes *[]PostApiAuthOauth2UpdateClientJSONBodyUpdateResponseTypes `json:"response_types,omitempty"` - Scope *string `json:"scope,omitempty"` - SoftwareId *string `json:"software_id,omitempty"` - SoftwareStatement *string `json:"software_statement,omitempty"` - SoftwareVersion *string `json:"software_version,omitempty"` - TosUri *string `json:"tos_uri,omitempty"` - Type *PostApiAuthOauth2UpdateClientJSONBodyUpdateType `json:"type,omitempty"` - } `json:"update"` -} - -// PostApiAuthOauth2UpdateClientJSONBodyUpdateResponseTypes defines parameters for PostApiAuthOauth2UpdateClient. -type PostApiAuthOauth2UpdateClientJSONBodyUpdateResponseTypes string - -// PostApiAuthOauth2UpdateClientJSONBodyUpdateType defines parameters for PostApiAuthOauth2UpdateClient. -type PostApiAuthOauth2UpdateClientJSONBodyUpdateType string - -// PostApiAuthOauth2UpdateConsentJSONBody defines parameters for PostApiAuthOauth2UpdateConsent. -type PostApiAuthOauth2UpdateConsentJSONBody struct { - Id string `json:"id"` - Update struct { - Scopes []string `json:"scopes"` - } `json:"update"` -} - -// GetApiAuthOauth2UserinfoParams defines parameters for GetApiAuthOauth2Userinfo. -type GetApiAuthOauth2UserinfoParams struct { - // Authorization Bearer or DPoP access token - Authorization *string `json:"Authorization,omitempty"` - - // DPoP RFC 9449 DPoP proof JWT when using a DPoP-bound access token - DPoP *string `json:"DPoP,omitempty"` -} - -// PostApiAuthOauth2UserinfoJSONBody defines parameters for PostApiAuthOauth2Userinfo. -type PostApiAuthOauth2UserinfoJSONBody struct { - AccessToken *string `json:"access_token,omitempty"` -} - -// PostApiAuthOauth2UserinfoParams defines parameters for PostApiAuthOauth2Userinfo. -type PostApiAuthOauth2UserinfoParams struct { - // Authorization Bearer or DPoP access token - Authorization *string `json:"Authorization,omitempty"` - - // DPoP RFC 9449 DPoP proof JWT when using a DPoP-bound access token - DPoP *string `json:"DPoP,omitempty"` -} - -// PostApiAuthOrganizationAcceptInvitationJSONBody defines parameters for PostApiAuthOrganizationAcceptInvitation. -type PostApiAuthOrganizationAcceptInvitationJSONBody struct { - // InvitationId The ID of the invitation to accept - InvitationId string `json:"invitationId"` -} - -// PostApiAuthOrganizationCancelInvitationJSONBody defines parameters for PostApiAuthOrganizationCancelInvitation. -type PostApiAuthOrganizationCancelInvitationJSONBody struct { - // InvitationId The ID of the invitation to cancel - InvitationId string `json:"invitationId"` -} - -// PostApiAuthOrganizationCheckSlugJSONBody defines parameters for PostApiAuthOrganizationCheckSlug. -type PostApiAuthOrganizationCheckSlugJSONBody struct { - // Slug The organization slug to check. Eg: "my-org" - Slug string `json:"slug"` -} - -// PostApiAuthOrganizationCreateJSONBody defines parameters for PostApiAuthOrganizationCreate. -type PostApiAuthOrganizationCreateJSONBody struct { - // KeepCurrentActiveOrganization Whether to keep the current active organization active after creating a new one. Eg: true - KeepCurrentActiveOrganization *bool `json:"keepCurrentActiveOrganization,omitempty"` - - // Logo The logo of the organization - Logo *string `json:"logo,omitempty"` - - // Metadata The metadata of the organization - Metadata *map[string]interface{} `json:"metadata,omitempty"` - - // Name The name of the organization - Name string `json:"name"` - - // Slug The slug of the organization - Slug string `json:"slug"` - - // UserId The user id of the organization creator. If not provided, the current user will be used. Should only be used by admins or when called by the server. server-only. Eg: "user-id" - UserId *string `json:"userId,omitempty"` -} - -// PostApiAuthOrganizationDeleteJSONBody defines parameters for PostApiAuthOrganizationDelete. -type PostApiAuthOrganizationDeleteJSONBody struct { - // OrganizationId The organization id to delete - OrganizationId string `json:"organizationId"` -} - -// GetApiAuthOrganizationGetInvitationParams defines parameters for GetApiAuthOrganizationGetInvitation. -type GetApiAuthOrganizationGetInvitationParams struct { - Id *string `form:"id,omitempty" json:"id,omitempty"` -} - -// PostApiAuthOrganizationHasPermissionJSONBody defines parameters for PostApiAuthOrganizationHasPermission. -type PostApiAuthOrganizationHasPermissionJSONBody struct { - // Permission The permission to check - // Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set - Permission *map[string]interface{} `json:"permission,omitempty"` - - // Permissions The permission to check - Permissions map[string]interface{} `json:"permissions"` -} - -// CreateOrganizationInvitationJSONBody defines parameters for CreateOrganizationInvitation. -type CreateOrganizationInvitationJSONBody struct { - // Email The email address of the user to invite - Email string `json:"email"` - - // OrganizationId The organization ID to invite the user to - OrganizationId *string `json:"organizationId,omitempty"` - - // Resend Resend the invitation email, if the user is already invited. Eg: true - Resend *bool `json:"resend,omitempty"` - - // Role The role(s) to assign to the user. It can be `admin`, `member`, owner. Eg: "member" - Role CreateOrganizationInvitationJSONBody_Role `json:"role"` - TeamId *CreateOrganizationInvitationJSONBody_TeamId `json:"teamId,omitempty"` -} - -// CreateOrganizationInvitationJSONBodyRole0 defines parameters for CreateOrganizationInvitation. -type CreateOrganizationInvitationJSONBodyRole0 = string - -// CreateOrganizationInvitationJSONBodyRole1 defines parameters for CreateOrganizationInvitation. -type CreateOrganizationInvitationJSONBodyRole1 = []string - -// CreateOrganizationInvitationJSONBody_Role defines parameters for CreateOrganizationInvitation. -type CreateOrganizationInvitationJSONBody_Role struct { - union json.RawMessage -} - -// CreateOrganizationInvitationJSONBodyTeamId0 defines parameters for CreateOrganizationInvitation. -type CreateOrganizationInvitationJSONBodyTeamId0 = string - -// CreateOrganizationInvitationJSONBodyTeamId1 defines parameters for CreateOrganizationInvitation. -type CreateOrganizationInvitationJSONBodyTeamId1 = []string - -// CreateOrganizationInvitationJSONBody_TeamId defines parameters for CreateOrganizationInvitation. -type CreateOrganizationInvitationJSONBody_TeamId struct { - union json.RawMessage -} - -// PostApiAuthOrganizationLeaveJSONBody defines parameters for PostApiAuthOrganizationLeave. -type PostApiAuthOrganizationLeaveJSONBody struct { - // OrganizationId The organization Id for the member to leave. Eg: "organization-id" - OrganizationId string `json:"organizationId"` -} - -// PostApiAuthOrganizationRejectInvitationJSONBody defines parameters for PostApiAuthOrganizationRejectInvitation. -type PostApiAuthOrganizationRejectInvitationJSONBody struct { - // InvitationId The ID of the invitation to reject - InvitationId string `json:"invitationId"` -} - -// PostApiAuthOrganizationRemoveMemberJSONBody defines parameters for PostApiAuthOrganizationRemoveMember. -type PostApiAuthOrganizationRemoveMemberJSONBody struct { - // MemberIdOrEmail The ID or email of the member to remove - MemberIdOrEmail string `json:"memberIdOrEmail"` - - // OrganizationId The ID of the organization to remove the member from. If not provided, the active organization will be used. Eg: "org-id" - OrganizationId *string `json:"organizationId,omitempty"` -} - -// SetActiveOrganizationJSONBody defines parameters for SetActiveOrganization. -type SetActiveOrganizationJSONBody struct { - // OrganizationId The organization id to set as active. It can be null to unset the active organization. Eg: "org-id" - OrganizationId *string `json:"organizationId,omitempty"` - - // OrganizationSlug The organization slug to set as active. It can be null to unset the active organization if organizationId is not provided. Eg: "org-slug" - OrganizationSlug *string `json:"organizationSlug,omitempty"` -} - -// PostApiAuthOrganizationUpdateJSONBody defines parameters for PostApiAuthOrganizationUpdate. -type PostApiAuthOrganizationUpdateJSONBody struct { - Data struct { - // Logo The logo of the organization - Logo *string `json:"logo,omitempty"` - - // Metadata The metadata of the organization - Metadata *map[string]interface{} `json:"metadata,omitempty"` - - // Name The name of the organization - Name *string `json:"name,omitempty"` - - // Slug The slug of the organization - Slug *string `json:"slug,omitempty"` - } `json:"data"` - - // OrganizationId The organization ID. Eg: "org-id" - OrganizationId *string `json:"organizationId,omitempty"` -} - -// UpdateOrganizationMemberRoleJSONBody defines parameters for UpdateOrganizationMemberRole. -type UpdateOrganizationMemberRoleJSONBody struct { - // MemberId The member id to apply the role update to. Eg: "member-id" - MemberId string `json:"memberId"` - - // OrganizationId An optional organization ID which the member is a part of to apply the role update. If not provided, you must provide session headers to get the active organization. Eg: "organization-id" - OrganizationId *string `json:"organizationId,omitempty"` - - // Role The new role to be applied. This can be a string or array of strings representing the roles. Eg: ["admin", "sale"] - Role UpdateOrganizationMemberRoleJSONBody_Role `json:"role"` -} - -// UpdateOrganizationMemberRoleJSONBodyRole0 defines parameters for UpdateOrganizationMemberRole. -type UpdateOrganizationMemberRoleJSONBodyRole0 = string - -// UpdateOrganizationMemberRoleJSONBodyRole1 defines parameters for UpdateOrganizationMemberRole. -type UpdateOrganizationMemberRoleJSONBodyRole1 = []string - -// UpdateOrganizationMemberRoleJSONBody_Role defines parameters for UpdateOrganizationMemberRole. -type UpdateOrganizationMemberRoleJSONBody_Role struct { - union json.RawMessage -} - -// PostApiAuthRefreshTokenJSONBody defines parameters for PostApiAuthRefreshToken. -type PostApiAuthRefreshTokenJSONBody struct { - union json.RawMessage -} - -// PostApiAuthRefreshTokenJSONBody0 defines parameters for PostApiAuthRefreshToken. -type PostApiAuthRefreshTokenJSONBody0 struct { - // AccountId The Better Auth account ID - AccountId string `json:"accountId"` - - // UserId The user ID associated with the account - UserId *string `json:"userId,omitempty"` -} - -// PostApiAuthRefreshTokenJSONBody1 defines parameters for PostApiAuthRefreshToken. -type PostApiAuthRefreshTokenJSONBody1 struct { - // UseAccountCookie Select the current OAuth account from its signed cookie - UseAccountCookie interface{} `json:"useAccountCookie"` - - // UserId The user ID associated with the account - UserId *string `json:"userId,omitempty"` -} - -// RequestPasswordResetJSONBody defines parameters for RequestPasswordReset. -type RequestPasswordResetJSONBody struct { - // Email The email address of the user to send a password reset email to - Email string `json:"email"` - - // RedirectTo The URL to redirect the user to reset their password. If the token isn't valid or expired, it'll be redirected with a query parameter `?error=INVALID_TOKEN`. If the token is valid, it'll be redirected with a query parameter `?token=VALID_TOKEN - RedirectTo *string `json:"redirectTo,omitempty"` -} - -// ResetPasswordJSONBody defines parameters for ResetPassword. -type ResetPasswordJSONBody struct { - // NewPassword The new password to set - NewPassword string `json:"newPassword"` - - // Token The token to reset the password - Token *string `json:"token,omitempty"` -} - -// ResetPasswordCallbackParams defines parameters for ResetPasswordCallback. -type ResetPasswordCallbackParams struct { - // CallbackURL The URL to redirect the user to reset their password - CallbackURL string `form:"callbackURL" json:"callbackURL"` -} - -// PostApiAuthRevokeOtherSessionsJSONBody defines parameters for PostApiAuthRevokeOtherSessions. -type PostApiAuthRevokeOtherSessionsJSONBody = map[string]interface{} - -// PostApiAuthRevokeSessionJSONBody defines parameters for PostApiAuthRevokeSession. -type PostApiAuthRevokeSessionJSONBody struct { - // Token The token to revoke - Token string `json:"token"` -} - -// PostApiAuthRevokeSessionsJSONBody defines parameters for PostApiAuthRevokeSessions. -type PostApiAuthRevokeSessionsJSONBody = map[string]interface{} - -// SendVerificationEmailJSONBody defines parameters for SendVerificationEmail. -type SendVerificationEmailJSONBody struct { - // CallbackURL The URL to use for email verification callback - CallbackURL *string `json:"callbackURL,omitempty"` - - // Email The email to send the verification email to - Email string `json:"email"` -} - -// SignInEmailJSONBody defines parameters for SignInEmail. -type SignInEmailJSONBody struct { - // CallbackURL Callback URL to use as a redirect for email verification - CallbackURL *string `json:"callbackURL,omitempty"` - - // Email Email of the user - Email string `json:"email"` - - // Password Password of the user - Password string `json:"password"` - - // RememberMe If this is false, the session will not be remembered. Default is `true`. - RememberMe *bool `json:"rememberMe,omitempty"` -} - -// SignInEmail200JSONResponseBodyRedirect defines parameters for SignInEmail. -type SignInEmail200JSONResponseBodyRedirect bool - -// SocialSignInJSONBody defines parameters for SocialSignIn. -type SocialSignInJSONBody struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - - // AdditionalParams Extra query parameters to append to the provider authorization URL (e.g. Cognito identity_provider, Google hd). - AdditionalParams *map[string]string `json:"additionalParams,omitempty"` - - // CallbackURL Callback URL to redirect to after the user has signed in - CallbackURL *string `json:"callbackURL,omitempty"` - - // DisableRedirect Disable automatic redirection to the provider. Useful for handling the redirection yourself - DisableRedirect *bool `json:"disableRedirect,omitempty"` - - // ErrorCallbackURL Callback URL to redirect to if an error happens - ErrorCallbackURL *string `json:"errorCallbackURL,omitempty"` - IdToken *struct { - // AccessToken Access token from the provider - AccessToken *string `json:"accessToken,omitempty"` - - // ExpiresAt Expiry date of the token - ExpiresAt *float32 `json:"expiresAt,omitempty"` - - // Nonce Nonce used to generate the token - Nonce *string `json:"nonce,omitempty"` - - // RefreshToken Refresh token from the provider - RefreshToken *string `json:"refreshToken,omitempty"` - - // Token ID token from the provider - Token string `json:"token"` - - // User The user object from the provider. Only available for some providers like Apple. - User *struct { - Email *string `json:"email,omitempty"` - Name *struct { - FirstName *string `json:"firstName,omitempty"` - LastName *string `json:"lastName,omitempty"` - } `json:"name,omitempty"` - } `json:"user,omitempty"` - } `json:"idToken,omitempty"` - - // LoginHint The login hint to use for the authorization code request - LoginHint *string `json:"loginHint,omitempty"` - NewUserCallbackURL *string `json:"newUserCallbackURL,omitempty"` - Provider SocialSignInJSONBody_Provider `json:"provider"` - - // RequestSignUp Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider - RequestSignUp *bool `json:"requestSignUp,omitempty"` - - // Scopes Array of scopes to request from the provider. This will override the default scopes passed. - Scopes *[]string `json:"scopes,omitempty"` -} - -// SocialSignInJSONBodyProvider0 defines parameters for SocialSignIn. -type SocialSignInJSONBodyProvider0 string - -// SocialSignInJSONBodyProvider1 defines parameters for SocialSignIn. -type SocialSignInJSONBodyProvider1 = string - -// SocialSignInJSONBody_Provider defines parameters for SocialSignIn. -type SocialSignInJSONBody_Provider struct { - union json.RawMessage -} - -// PostApiAuthSignInUsernameJSONBody defines parameters for PostApiAuthSignInUsername. -type PostApiAuthSignInUsernameJSONBody struct { - // CallbackURL URL to redirect to after sign in (also used as the redirect target for email verification when required) - CallbackURL *string `json:"callbackURL,omitempty"` - - // Password The password of the user - Password string `json:"password"` - - // RememberMe Remember the user session - RememberMe *bool `json:"rememberMe,omitempty"` - - // Username The username of the user - Username string `json:"username"` -} - -// SignOutJSONBody defines parameters for SignOut. -type SignOutJSONBody = map[string]interface{} - -// SignUpWithEmailAndPasswordJSONBody defines parameters for SignUpWithEmailAndPassword. -type SignUpWithEmailAndPasswordJSONBody struct { - // CallbackURL The URL to use for email verification callback - CallbackURL *string `json:"callbackURL,omitempty"` - DisplayUsername *string `json:"displayUsername,omitempty"` - - // Email The email of the user - Email string `json:"email"` - - // Image The profile image URL of the user - Image *string `json:"image,omitempty"` - - // Name The name of the user - Name string `json:"name"` - - // Password The password of the user - Password string `json:"password"` - - // RememberMe If this is false, the session will not be remembered. Default is `true`. - RememberMe *bool `json:"rememberMe,omitempty"` - Username *string `json:"username,omitempty"` -} - -// PostApiAuthUnlinkAccountJSONBody defines parameters for PostApiAuthUnlinkAccount. -type PostApiAuthUnlinkAccountJSONBody struct { - // AccountId The Better Auth account ID to unlink - AccountId string `json:"accountId"` -} - -// UpdateSessionJSONBody defines parameters for UpdateSession. -type UpdateSessionJSONBody map[string]interface{} - -// UpdateUserJSONBody defines parameters for UpdateUser. -type UpdateUserJSONBody struct { - DisplayUsername *string `json:"displayUsername,omitempty"` - - // Image The image of the user - Image *string `json:"image,omitempty"` - - // Name The name of the user - Name *string `json:"name,omitempty"` - Username *string `json:"username,omitempty"` -} - -// GetApiAuthVerifyEmailParams defines parameters for GetApiAuthVerifyEmail. -type GetApiAuthVerifyEmailParams struct { - // Token The token to verify the email - Token string `form:"token" json:"token"` - - // CallbackURL The URL to redirect to after email verification - CallbackURL *string `form:"callbackURL,omitempty" json:"callbackURL,omitempty"` -} - -// VerifyPasswordJSONBody defines parameters for VerifyPassword. -type VerifyPasswordJSONBody struct { - // Password The password to verify - Password string `json:"password"` + AuthorizationDetailsTypes *[]string `json:"authorization_details_types,omitempty"` + BackchannelLogoutSessionRequired *bool `json:"backchannel_logout_session_required,omitempty"` + BackchannelLogoutUri *string `json:"backchannel_logout_uri,omitempty"` + ClientId string `json:"client_id"` + ClientIdIssuedAt *int `json:"client_id_issued_at,omitempty"` + ClientName *string `json:"client_name,omitempty"` + ClientSecret *string `json:"client_secret,omitempty"` + ClientSecretExpiresAt *int `json:"client_secret_expires_at,omitempty"` + ClientUri *string `json:"client_uri,omitempty"` + Contacts *[]string `json:"contacts,omitempty"` + DpopBoundAccessTokens *bool `json:"dpop_bound_access_tokens,omitempty"` + GrantTypes *[]string `json:"grant_types,omitempty"` + Jwks *UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks `json:"jwks,omitempty"` + JwksUri *string `json:"jwks_uri,omitempty"` + LogoUri *string `json:"logo_uri,omitempty"` + PolicyUri *string `json:"policy_uri,omitempty"` + PostLogoutRedirectUris *[]string `json:"post_logout_redirect_uris,omitempty"` + RedirectUris *[]string `json:"redirect_uris,omitempty"` + RegistrationAccessToken string `json:"registration_access_token"` + RegistrationClientUri string `json:"registration_client_uri"` + RequirePkce *bool `json:"require_pkce,omitempty"` + Resources *[]string `json:"resources,omitempty"` + ResponseTypes *[]string `json:"response_types,omitempty"` + Scope *string `json:"scope,omitempty"` + SoftwareId *string `json:"software_id,omitempty"` + SoftwareStatement *string `json:"software_statement,omitempty"` + SoftwareVersion *string `json:"software_version,omitempty"` + SubjectType *UpdateDynamicOAuthClientRegistration200JSONResponseBodySubjectType `json:"subject_type,omitempty"` + TokenEndpointAuthMethod *string `json:"token_endpoint_auth_method,omitempty"` + TosUri *string `json:"tos_uri,omitempty"` + Type *UpdateDynamicOAuthClientRegistration200JSONResponseBodyType `json:"type,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } // ListBackgroundJobsParams defines parameters for ListBackgroundJobs. @@ -9055,222 +7466,18 @@ type UpdateUserEntitlementJSONBody struct { Note *string `json:"note,omitempty"` } -// BanUserJSONRequestBody defines body for BanUser for application/json ContentType. -type BanUserJSONRequestBody BanUserJSONBody +// CreateDeviceAuthorizationJSONRequestBody defines body for CreateDeviceAuthorization for application/json ContentType. +type CreateDeviceAuthorizationJSONRequestBody CreateDeviceAuthorizationJSONBody -// CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType. -type CreateUserJSONRequestBody CreateUserJSONBody +// CreateDeviceAccessTokenJSONRequestBody defines body for CreateDeviceAccessToken for application/json ContentType. +type CreateDeviceAccessTokenJSONRequestBody CreateDeviceAccessTokenJSONBody -// PostApiAuthAdminHasPermissionJSONRequestBody defines body for PostApiAuthAdminHasPermission for application/json ContentType. -type PostApiAuthAdminHasPermissionJSONRequestBody PostApiAuthAdminHasPermissionJSONBody - -// ImpersonateUserJSONRequestBody defines body for ImpersonateUser for application/json ContentType. -type ImpersonateUserJSONRequestBody ImpersonateUserJSONBody - -// AdminListUserSessionsJSONRequestBody defines body for AdminListUserSessions for application/json ContentType. -type AdminListUserSessionsJSONRequestBody AdminListUserSessionsJSONBody - -// RemoveUserJSONRequestBody defines body for RemoveUser for application/json ContentType. -type RemoveUserJSONRequestBody RemoveUserJSONBody - -// RevokeUserSessionJSONRequestBody defines body for RevokeUserSession for application/json ContentType. -type RevokeUserSessionJSONRequestBody RevokeUserSessionJSONBody - -// RevokeUserSessionsJSONRequestBody defines body for RevokeUserSessions for application/json ContentType. -type RevokeUserSessionsJSONRequestBody RevokeUserSessionsJSONBody - -// SetUserRoleJSONRequestBody defines body for SetUserRole for application/json ContentType. -type SetUserRoleJSONRequestBody SetUserRoleJSONBody - -// SetUserPasswordJSONRequestBody defines body for SetUserPassword for application/json ContentType. -type SetUserPasswordJSONRequestBody SetUserPasswordJSONBody - -// UnbanUserJSONRequestBody defines body for UnbanUser for application/json ContentType. -type UnbanUserJSONRequestBody UnbanUserJSONBody - -// AdminUpdateUserJSONRequestBody defines body for AdminUpdateUser for application/json ContentType. -type AdminUpdateUserJSONRequestBody AdminUpdateUserJSONBody - -// PostApiAuthApiKeyCreateJSONRequestBody defines body for PostApiAuthApiKeyCreate for application/json ContentType. -type PostApiAuthApiKeyCreateJSONRequestBody PostApiAuthApiKeyCreateJSONBody - -// PostApiAuthApiKeyDeleteJSONRequestBody defines body for PostApiAuthApiKeyDelete for application/json ContentType. -type PostApiAuthApiKeyDeleteJSONRequestBody PostApiAuthApiKeyDeleteJSONBody - -// PostApiAuthApiKeyUpdateJSONRequestBody defines body for PostApiAuthApiKeyUpdate for application/json ContentType. -type PostApiAuthApiKeyUpdateJSONRequestBody PostApiAuthApiKeyUpdateJSONBody - -// PostApiAuthCallbackIdJSONRequestBody defines body for PostApiAuthCallbackId for application/json ContentType. -type PostApiAuthCallbackIdJSONRequestBody PostApiAuthCallbackIdJSONBody - -// ChangeEmailJSONRequestBody defines body for ChangeEmail for application/json ContentType. -type ChangeEmailJSONRequestBody ChangeEmailJSONBody - -// ChangePasswordJSONRequestBody defines body for ChangePassword for application/json ContentType. -type ChangePasswordJSONRequestBody ChangePasswordJSONBody - -// DeleteUserJSONRequestBody defines body for DeleteUser for application/json ContentType. -type DeleteUserJSONRequestBody DeleteUserJSONBody - -// PostApiAuthDeviceApproveJSONRequestBody defines body for PostApiAuthDeviceApprove for application/json ContentType. -type PostApiAuthDeviceApproveJSONRequestBody PostApiAuthDeviceApproveJSONBody - -// PostApiAuthDeviceCodeJSONRequestBody defines body for PostApiAuthDeviceCode for application/json ContentType. -type PostApiAuthDeviceCodeJSONRequestBody PostApiAuthDeviceCodeJSONBody - -// PostApiAuthDeviceDenyJSONRequestBody defines body for PostApiAuthDeviceDeny for application/json ContentType. -type PostApiAuthDeviceDenyJSONRequestBody PostApiAuthDeviceDenyJSONBody - -// PostApiAuthDeviceTokenJSONRequestBody defines body for PostApiAuthDeviceToken for application/json ContentType. -type PostApiAuthDeviceTokenJSONRequestBody PostApiAuthDeviceTokenJSONBody - -// PostApiAuthGetAccessTokenJSONRequestBody defines body for PostApiAuthGetAccessToken for application/json ContentType. -type PostApiAuthGetAccessTokenJSONRequestBody PostApiAuthGetAccessTokenJSONBody - -// GetSessionPostJSONRequestBody defines body for GetSessionPost for application/json ContentType. -type GetSessionPostJSONRequestBody = GetSessionPostJSONBody - -// PostApiAuthIsUsernameAvailableJSONRequestBody defines body for PostApiAuthIsUsernameAvailable for application/json ContentType. -type PostApiAuthIsUsernameAvailableJSONRequestBody PostApiAuthIsUsernameAvailableJSONBody - -// LinkSocialAccountJSONRequestBody defines body for LinkSocialAccount for application/json ContentType. -type LinkSocialAccountJSONRequestBody LinkSocialAccountJSONBody - -// PostApiAuthOauth2ClientRotateSecretJSONRequestBody defines body for PostApiAuthOauth2ClientRotateSecret for application/json ContentType. -type PostApiAuthOauth2ClientRotateSecretJSONRequestBody PostApiAuthOauth2ClientRotateSecretJSONBody - -// PostApiAuthOauth2ConsentJSONRequestBody defines body for PostApiAuthOauth2Consent for application/json ContentType. -type PostApiAuthOauth2ConsentJSONRequestBody PostApiAuthOauth2ConsentJSONBody - -// PostApiAuthOauth2ContinueJSONRequestBody defines body for PostApiAuthOauth2Continue for application/json ContentType. -type PostApiAuthOauth2ContinueJSONRequestBody PostApiAuthOauth2ContinueJSONBody - -// PostApiAuthOauth2CreateClientJSONRequestBody defines body for PostApiAuthOauth2CreateClient for application/json ContentType. -type PostApiAuthOauth2CreateClientJSONRequestBody PostApiAuthOauth2CreateClientJSONBody - -// PostApiAuthOauth2DeleteClientJSONRequestBody defines body for PostApiAuthOauth2DeleteClient for application/json ContentType. -type PostApiAuthOauth2DeleteClientJSONRequestBody PostApiAuthOauth2DeleteClientJSONBody - -// PostApiAuthOauth2DeleteConsentJSONRequestBody defines body for PostApiAuthOauth2DeleteConsent for application/json ContentType. -type PostApiAuthOauth2DeleteConsentJSONRequestBody PostApiAuthOauth2DeleteConsentJSONBody - -// PostApiAuthOauth2IntrospectJSONRequestBody defines body for PostApiAuthOauth2Introspect for application/json ContentType. -type PostApiAuthOauth2IntrospectJSONRequestBody PostApiAuthOauth2IntrospectJSONBody - -// PostApiAuthOauth2ParJSONRequestBody defines body for PostApiAuthOauth2Par for application/json ContentType. -type PostApiAuthOauth2ParJSONRequestBody PostApiAuthOauth2ParJSONBody - -// PostApiAuthOauth2PublicClientPreloginJSONRequestBody defines body for PostApiAuthOauth2PublicClientPrelogin for application/json ContentType. -type PostApiAuthOauth2PublicClientPreloginJSONRequestBody PostApiAuthOauth2PublicClientPreloginJSONBody - -// PostApiAuthOauth2RegisterJSONRequestBody defines body for PostApiAuthOauth2Register for application/json ContentType. -type PostApiAuthOauth2RegisterJSONRequestBody PostApiAuthOauth2RegisterJSONBody +// CreateDynamicOAuthClientRegistrationJSONRequestBody defines body for CreateDynamicOAuthClientRegistration for application/json ContentType. +type CreateDynamicOAuthClientRegistrationJSONRequestBody CreateDynamicOAuthClientRegistrationJSONBody // UpdateDynamicOAuthClientRegistrationJSONRequestBody defines body for UpdateDynamicOAuthClientRegistration for application/json ContentType. type UpdateDynamicOAuthClientRegistrationJSONRequestBody UpdateDynamicOAuthClientRegistrationJSONBody -// PostApiAuthOauth2RevokeJSONRequestBody defines body for PostApiAuthOauth2Revoke for application/json ContentType. -type PostApiAuthOauth2RevokeJSONRequestBody PostApiAuthOauth2RevokeJSONBody - -// PostApiAuthOauth2TokenJSONRequestBody defines body for PostApiAuthOauth2Token for application/json ContentType. -type PostApiAuthOauth2TokenJSONRequestBody PostApiAuthOauth2TokenJSONBody - -// PostApiAuthOauth2UpdateClientJSONRequestBody defines body for PostApiAuthOauth2UpdateClient for application/json ContentType. -type PostApiAuthOauth2UpdateClientJSONRequestBody PostApiAuthOauth2UpdateClientJSONBody - -// PostApiAuthOauth2UpdateConsentJSONRequestBody defines body for PostApiAuthOauth2UpdateConsent for application/json ContentType. -type PostApiAuthOauth2UpdateConsentJSONRequestBody PostApiAuthOauth2UpdateConsentJSONBody - -// PostApiAuthOauth2UserinfoJSONRequestBody defines body for PostApiAuthOauth2Userinfo for application/json ContentType. -type PostApiAuthOauth2UserinfoJSONRequestBody PostApiAuthOauth2UserinfoJSONBody - -// PostApiAuthOrganizationAcceptInvitationJSONRequestBody defines body for PostApiAuthOrganizationAcceptInvitation for application/json ContentType. -type PostApiAuthOrganizationAcceptInvitationJSONRequestBody PostApiAuthOrganizationAcceptInvitationJSONBody - -// PostApiAuthOrganizationCancelInvitationJSONRequestBody defines body for PostApiAuthOrganizationCancelInvitation for application/json ContentType. -type PostApiAuthOrganizationCancelInvitationJSONRequestBody PostApiAuthOrganizationCancelInvitationJSONBody - -// PostApiAuthOrganizationCheckSlugJSONRequestBody defines body for PostApiAuthOrganizationCheckSlug for application/json ContentType. -type PostApiAuthOrganizationCheckSlugJSONRequestBody PostApiAuthOrganizationCheckSlugJSONBody - -// PostApiAuthOrganizationCreateJSONRequestBody defines body for PostApiAuthOrganizationCreate for application/json ContentType. -type PostApiAuthOrganizationCreateJSONRequestBody PostApiAuthOrganizationCreateJSONBody - -// PostApiAuthOrganizationDeleteJSONRequestBody defines body for PostApiAuthOrganizationDelete for application/json ContentType. -type PostApiAuthOrganizationDeleteJSONRequestBody PostApiAuthOrganizationDeleteJSONBody - -// PostApiAuthOrganizationHasPermissionJSONRequestBody defines body for PostApiAuthOrganizationHasPermission for application/json ContentType. -type PostApiAuthOrganizationHasPermissionJSONRequestBody PostApiAuthOrganizationHasPermissionJSONBody - -// CreateOrganizationInvitationJSONRequestBody defines body for CreateOrganizationInvitation for application/json ContentType. -type CreateOrganizationInvitationJSONRequestBody CreateOrganizationInvitationJSONBody - -// PostApiAuthOrganizationLeaveJSONRequestBody defines body for PostApiAuthOrganizationLeave for application/json ContentType. -type PostApiAuthOrganizationLeaveJSONRequestBody PostApiAuthOrganizationLeaveJSONBody - -// PostApiAuthOrganizationRejectInvitationJSONRequestBody defines body for PostApiAuthOrganizationRejectInvitation for application/json ContentType. -type PostApiAuthOrganizationRejectInvitationJSONRequestBody PostApiAuthOrganizationRejectInvitationJSONBody - -// PostApiAuthOrganizationRemoveMemberJSONRequestBody defines body for PostApiAuthOrganizationRemoveMember for application/json ContentType. -type PostApiAuthOrganizationRemoveMemberJSONRequestBody PostApiAuthOrganizationRemoveMemberJSONBody - -// SetActiveOrganizationJSONRequestBody defines body for SetActiveOrganization for application/json ContentType. -type SetActiveOrganizationJSONRequestBody SetActiveOrganizationJSONBody - -// PostApiAuthOrganizationUpdateJSONRequestBody defines body for PostApiAuthOrganizationUpdate for application/json ContentType. -type PostApiAuthOrganizationUpdateJSONRequestBody PostApiAuthOrganizationUpdateJSONBody - -// UpdateOrganizationMemberRoleJSONRequestBody defines body for UpdateOrganizationMemberRole for application/json ContentType. -type UpdateOrganizationMemberRoleJSONRequestBody UpdateOrganizationMemberRoleJSONBody - -// PostApiAuthRefreshTokenJSONRequestBody defines body for PostApiAuthRefreshToken for application/json ContentType. -type PostApiAuthRefreshTokenJSONRequestBody PostApiAuthRefreshTokenJSONBody - -// RequestPasswordResetJSONRequestBody defines body for RequestPasswordReset for application/json ContentType. -type RequestPasswordResetJSONRequestBody RequestPasswordResetJSONBody - -// ResetPasswordJSONRequestBody defines body for ResetPassword for application/json ContentType. -type ResetPasswordJSONRequestBody ResetPasswordJSONBody - -// PostApiAuthRevokeOtherSessionsJSONRequestBody defines body for PostApiAuthRevokeOtherSessions for application/json ContentType. -type PostApiAuthRevokeOtherSessionsJSONRequestBody = PostApiAuthRevokeOtherSessionsJSONBody - -// PostApiAuthRevokeSessionJSONRequestBody defines body for PostApiAuthRevokeSession for application/json ContentType. -type PostApiAuthRevokeSessionJSONRequestBody PostApiAuthRevokeSessionJSONBody - -// PostApiAuthRevokeSessionsJSONRequestBody defines body for PostApiAuthRevokeSessions for application/json ContentType. -type PostApiAuthRevokeSessionsJSONRequestBody = PostApiAuthRevokeSessionsJSONBody - -// SendVerificationEmailJSONRequestBody defines body for SendVerificationEmail for application/json ContentType. -type SendVerificationEmailJSONRequestBody SendVerificationEmailJSONBody - -// SignInEmailJSONRequestBody defines body for SignInEmail for application/json ContentType. -type SignInEmailJSONRequestBody SignInEmailJSONBody - -// SocialSignInJSONRequestBody defines body for SocialSignIn for application/json ContentType. -type SocialSignInJSONRequestBody SocialSignInJSONBody - -// PostApiAuthSignInUsernameJSONRequestBody defines body for PostApiAuthSignInUsername for application/json ContentType. -type PostApiAuthSignInUsernameJSONRequestBody PostApiAuthSignInUsernameJSONBody - -// SignOutJSONRequestBody defines body for SignOut for application/json ContentType. -type SignOutJSONRequestBody = SignOutJSONBody - -// SignUpWithEmailAndPasswordJSONRequestBody defines body for SignUpWithEmailAndPassword for application/json ContentType. -type SignUpWithEmailAndPasswordJSONRequestBody SignUpWithEmailAndPasswordJSONBody - -// PostApiAuthUnlinkAccountJSONRequestBody defines body for PostApiAuthUnlinkAccount for application/json ContentType. -type PostApiAuthUnlinkAccountJSONRequestBody PostApiAuthUnlinkAccountJSONBody - -// UpdateSessionJSONRequestBody defines body for UpdateSession for application/json ContentType. -type UpdateSessionJSONRequestBody UpdateSessionJSONBody - -// UpdateUserJSONRequestBody defines body for UpdateUser for application/json ContentType. -type UpdateUserJSONRequestBody UpdateUserJSONBody - -// VerifyPasswordJSONRequestBody defines body for VerifyPassword for application/json ContentType. -type VerifyPasswordJSONRequestBody VerifyPasswordJSONBody - // CreateBackgroundJobJSONRequestBody defines body for CreateBackgroundJob for application/json ContentType. type CreateBackgroundJobJSONRequestBody CreateBackgroundJobJSONBody @@ -9433,6 +7640,1150 @@ type GrantUserEntitlementJSONRequestBody GrantUserEntitlementJSONBody // UpdateUserEntitlementJSONRequestBody defines body for UpdateUserEntitlement for application/json ContentType. type UpdateUserEntitlementJSONRequestBody UpdateUserEntitlementJSONBody +// Getter for additional properties for CreateDynamicOAuthClientRegistrationJSONBody. Returns the specified +// element and whether it was found +func (a CreateDynamicOAuthClientRegistrationJSONBody) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for CreateDynamicOAuthClientRegistrationJSONBody +func (a *CreateDynamicOAuthClientRegistrationJSONBody) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for CreateDynamicOAuthClientRegistrationJSONBody to handle AdditionalProperties +func (a *CreateDynamicOAuthClientRegistrationJSONBody) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["authorization_details_types"]; found { + err = json.Unmarshal(raw, &a.AuthorizationDetailsTypes) + if err != nil { + return fmt.Errorf("error reading 'authorization_details_types': %w", err) + } + delete(object, "authorization_details_types") + } + + if raw, found := object["backchannel_logout_session_required"]; found { + err = json.Unmarshal(raw, &a.BackchannelLogoutSessionRequired) + if err != nil { + return fmt.Errorf("error reading 'backchannel_logout_session_required': %w", err) + } + delete(object, "backchannel_logout_session_required") + } + + if raw, found := object["backchannel_logout_uri"]; found { + err = json.Unmarshal(raw, &a.BackchannelLogoutUri) + if err != nil { + return fmt.Errorf("error reading 'backchannel_logout_uri': %w", err) + } + delete(object, "backchannel_logout_uri") + } + + if raw, found := object["client_name"]; found { + err = json.Unmarshal(raw, &a.ClientName) + if err != nil { + return fmt.Errorf("error reading 'client_name': %w", err) + } + delete(object, "client_name") + } + + if raw, found := object["client_uri"]; found { + err = json.Unmarshal(raw, &a.ClientUri) + if err != nil { + return fmt.Errorf("error reading 'client_uri': %w", err) + } + delete(object, "client_uri") + } + + if raw, found := object["contacts"]; found { + err = json.Unmarshal(raw, &a.Contacts) + if err != nil { + return fmt.Errorf("error reading 'contacts': %w", err) + } + delete(object, "contacts") + } + + if raw, found := object["dpop_bound_access_tokens"]; found { + err = json.Unmarshal(raw, &a.DpopBoundAccessTokens) + if err != nil { + return fmt.Errorf("error reading 'dpop_bound_access_tokens': %w", err) + } + delete(object, "dpop_bound_access_tokens") + } + + if raw, found := object["grant_types"]; found { + err = json.Unmarshal(raw, &a.GrantTypes) + if err != nil { + return fmt.Errorf("error reading 'grant_types': %w", err) + } + delete(object, "grant_types") + } + + if raw, found := object["jwks"]; found { + err = json.Unmarshal(raw, &a.Jwks) + if err != nil { + return fmt.Errorf("error reading 'jwks': %w", err) + } + delete(object, "jwks") + } + + if raw, found := object["jwks_uri"]; found { + err = json.Unmarshal(raw, &a.JwksUri) + if err != nil { + return fmt.Errorf("error reading 'jwks_uri': %w", err) + } + delete(object, "jwks_uri") + } + + if raw, found := object["logo_uri"]; found { + err = json.Unmarshal(raw, &a.LogoUri) + if err != nil { + return fmt.Errorf("error reading 'logo_uri': %w", err) + } + delete(object, "logo_uri") + } + + if raw, found := object["policy_uri"]; found { + err = json.Unmarshal(raw, &a.PolicyUri) + if err != nil { + return fmt.Errorf("error reading 'policy_uri': %w", err) + } + delete(object, "policy_uri") + } + + if raw, found := object["post_logout_redirect_uris"]; found { + err = json.Unmarshal(raw, &a.PostLogoutRedirectUris) + if err != nil { + return fmt.Errorf("error reading 'post_logout_redirect_uris': %w", err) + } + delete(object, "post_logout_redirect_uris") + } + + if raw, found := object["redirect_uris"]; found { + err = json.Unmarshal(raw, &a.RedirectUris) + if err != nil { + return fmt.Errorf("error reading 'redirect_uris': %w", err) + } + delete(object, "redirect_uris") + } + + if raw, found := object["require_pkce"]; found { + err = json.Unmarshal(raw, &a.RequirePkce) + if err != nil { + return fmt.Errorf("error reading 'require_pkce': %w", err) + } + delete(object, "require_pkce") + } + + if raw, found := object["resources"]; found { + err = json.Unmarshal(raw, &a.Resources) + if err != nil { + return fmt.Errorf("error reading 'resources': %w", err) + } + delete(object, "resources") + } + + if raw, found := object["response_types"]; found { + err = json.Unmarshal(raw, &a.ResponseTypes) + if err != nil { + return fmt.Errorf("error reading 'response_types': %w", err) + } + delete(object, "response_types") + } + + if raw, found := object["scope"]; found { + err = json.Unmarshal(raw, &a.Scope) + if err != nil { + return fmt.Errorf("error reading 'scope': %w", err) + } + delete(object, "scope") + } + + if raw, found := object["software_id"]; found { + err = json.Unmarshal(raw, &a.SoftwareId) + if err != nil { + return fmt.Errorf("error reading 'software_id': %w", err) + } + delete(object, "software_id") + } + + if raw, found := object["software_statement"]; found { + err = json.Unmarshal(raw, &a.SoftwareStatement) + if err != nil { + return fmt.Errorf("error reading 'software_statement': %w", err) + } + delete(object, "software_statement") + } + + if raw, found := object["software_version"]; found { + err = json.Unmarshal(raw, &a.SoftwareVersion) + if err != nil { + return fmt.Errorf("error reading 'software_version': %w", err) + } + delete(object, "software_version") + } + + if raw, found := object["subject_type"]; found { + err = json.Unmarshal(raw, &a.SubjectType) + if err != nil { + return fmt.Errorf("error reading 'subject_type': %w", err) + } + delete(object, "subject_type") + } + + if raw, found := object["token_endpoint_auth_method"]; found { + err = json.Unmarshal(raw, &a.TokenEndpointAuthMethod) + if err != nil { + return fmt.Errorf("error reading 'token_endpoint_auth_method': %w", err) + } + delete(object, "token_endpoint_auth_method") + } + + if raw, found := object["tos_uri"]; found { + err = json.Unmarshal(raw, &a.TosUri) + if err != nil { + return fmt.Errorf("error reading 'tos_uri': %w", err) + } + delete(object, "tos_uri") + } + + if raw, found := object["type"]; found { + err = json.Unmarshal(raw, &a.Type) + if err != nil { + return fmt.Errorf("error reading 'type': %w", err) + } + delete(object, "type") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for CreateDynamicOAuthClientRegistrationJSONBody to handle AdditionalProperties +func (a CreateDynamicOAuthClientRegistrationJSONBody) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.AuthorizationDetailsTypes != nil { + object["authorization_details_types"], err = json.Marshal(a.AuthorizationDetailsTypes) + if err != nil { + return nil, fmt.Errorf("error marshaling 'authorization_details_types': %w", err) + } + } + + if a.BackchannelLogoutSessionRequired != nil { + object["backchannel_logout_session_required"], err = json.Marshal(a.BackchannelLogoutSessionRequired) + if err != nil { + return nil, fmt.Errorf("error marshaling 'backchannel_logout_session_required': %w", err) + } + } + + if a.BackchannelLogoutUri != nil { + object["backchannel_logout_uri"], err = json.Marshal(a.BackchannelLogoutUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'backchannel_logout_uri': %w", err) + } + } + + if a.ClientName != nil { + object["client_name"], err = json.Marshal(a.ClientName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_name': %w", err) + } + } + + if a.ClientUri != nil { + object["client_uri"], err = json.Marshal(a.ClientUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_uri': %w", err) + } + } + + if a.Contacts != nil { + object["contacts"], err = json.Marshal(a.Contacts) + if err != nil { + return nil, fmt.Errorf("error marshaling 'contacts': %w", err) + } + } + + if a.DpopBoundAccessTokens != nil { + object["dpop_bound_access_tokens"], err = json.Marshal(a.DpopBoundAccessTokens) + if err != nil { + return nil, fmt.Errorf("error marshaling 'dpop_bound_access_tokens': %w", err) + } + } + + if a.GrantTypes != nil { + object["grant_types"], err = json.Marshal(a.GrantTypes) + if err != nil { + return nil, fmt.Errorf("error marshaling 'grant_types': %w", err) + } + } + + if a.Jwks != nil { + object["jwks"], err = json.Marshal(a.Jwks) + if err != nil { + return nil, fmt.Errorf("error marshaling 'jwks': %w", err) + } + } + + if a.JwksUri != nil { + object["jwks_uri"], err = json.Marshal(a.JwksUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'jwks_uri': %w", err) + } + } + + if a.LogoUri != nil { + object["logo_uri"], err = json.Marshal(a.LogoUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'logo_uri': %w", err) + } + } + + if a.PolicyUri != nil { + object["policy_uri"], err = json.Marshal(a.PolicyUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'policy_uri': %w", err) + } + } + + if a.PostLogoutRedirectUris != nil { + object["post_logout_redirect_uris"], err = json.Marshal(a.PostLogoutRedirectUris) + if err != nil { + return nil, fmt.Errorf("error marshaling 'post_logout_redirect_uris': %w", err) + } + } + + if a.RedirectUris != nil { + object["redirect_uris"], err = json.Marshal(a.RedirectUris) + if err != nil { + return nil, fmt.Errorf("error marshaling 'redirect_uris': %w", err) + } + } + + if a.RequirePkce != nil { + object["require_pkce"], err = json.Marshal(a.RequirePkce) + if err != nil { + return nil, fmt.Errorf("error marshaling 'require_pkce': %w", err) + } + } + + if a.Resources != nil { + object["resources"], err = json.Marshal(a.Resources) + if err != nil { + return nil, fmt.Errorf("error marshaling 'resources': %w", err) + } + } + + if a.ResponseTypes != nil { + object["response_types"], err = json.Marshal(a.ResponseTypes) + if err != nil { + return nil, fmt.Errorf("error marshaling 'response_types': %w", err) + } + } + + if a.Scope != nil { + object["scope"], err = json.Marshal(a.Scope) + if err != nil { + return nil, fmt.Errorf("error marshaling 'scope': %w", err) + } + } + + if a.SoftwareId != nil { + object["software_id"], err = json.Marshal(a.SoftwareId) + if err != nil { + return nil, fmt.Errorf("error marshaling 'software_id': %w", err) + } + } + + if a.SoftwareStatement != nil { + object["software_statement"], err = json.Marshal(a.SoftwareStatement) + if err != nil { + return nil, fmt.Errorf("error marshaling 'software_statement': %w", err) + } + } + + if a.SoftwareVersion != nil { + object["software_version"], err = json.Marshal(a.SoftwareVersion) + if err != nil { + return nil, fmt.Errorf("error marshaling 'software_version': %w", err) + } + } + + if a.SubjectType != nil { + object["subject_type"], err = json.Marshal(a.SubjectType) + if err != nil { + return nil, fmt.Errorf("error marshaling 'subject_type': %w", err) + } + } + + if a.TokenEndpointAuthMethod != nil { + object["token_endpoint_auth_method"], err = json.Marshal(a.TokenEndpointAuthMethod) + if err != nil { + return nil, fmt.Errorf("error marshaling 'token_endpoint_auth_method': %w", err) + } + } + + if a.TosUri != nil { + object["tos_uri"], err = json.Marshal(a.TosUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'tos_uri': %w", err) + } + } + + if a.Type != nil { + object["type"], err = json.Marshal(a.Type) + if err != nil { + return nil, fmt.Errorf("error marshaling 'type': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for CreateDynamicOAuthClientRegistrationJSONBodyJwks1. Returns the specified +// element and whether it was found +func (a CreateDynamicOAuthClientRegistrationJSONBodyJwks1) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for CreateDynamicOAuthClientRegistrationJSONBodyJwks1 +func (a *CreateDynamicOAuthClientRegistrationJSONBodyJwks1) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for CreateDynamicOAuthClientRegistrationJSONBodyJwks1 to handle AdditionalProperties +func (a *CreateDynamicOAuthClientRegistrationJSONBodyJwks1) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["keys"]; found { + err = json.Unmarshal(raw, &a.Keys) + if err != nil { + return fmt.Errorf("error reading 'keys': %w", err) + } + delete(object, "keys") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for CreateDynamicOAuthClientRegistrationJSONBodyJwks1 to handle AdditionalProperties +func (a CreateDynamicOAuthClientRegistrationJSONBodyJwks1) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.Keys != nil { + object["keys"], err = json.Marshal(a.Keys) + if err != nil { + return nil, fmt.Errorf("error marshaling 'keys': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1. Returns the specified +// element and whether it was found +func (a CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1 +func (a *CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1 to handle AdditionalProperties +func (a *CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["keys"]; found { + err = json.Unmarshal(raw, &a.Keys) + if err != nil { + return fmt.Errorf("error reading 'keys': %w", err) + } + delete(object, "keys") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1 to handle AdditionalProperties +func (a CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.Keys != nil { + object["keys"], err = json.Marshal(a.Keys) + if err != nil { + return nil, fmt.Errorf("error marshaling 'keys': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for CreateDynamicOAuthClientRegistration201JSONResponseBody. Returns the specified +// element and whether it was found +func (a CreateDynamicOAuthClientRegistration201JSONResponseBody) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for CreateDynamicOAuthClientRegistration201JSONResponseBody +func (a *CreateDynamicOAuthClientRegistration201JSONResponseBody) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for CreateDynamicOAuthClientRegistration201JSONResponseBody to handle AdditionalProperties +func (a *CreateDynamicOAuthClientRegistration201JSONResponseBody) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["authorization_details_types"]; found { + err = json.Unmarshal(raw, &a.AuthorizationDetailsTypes) + if err != nil { + return fmt.Errorf("error reading 'authorization_details_types': %w", err) + } + delete(object, "authorization_details_types") + } + + if raw, found := object["backchannel_logout_session_required"]; found { + err = json.Unmarshal(raw, &a.BackchannelLogoutSessionRequired) + if err != nil { + return fmt.Errorf("error reading 'backchannel_logout_session_required': %w", err) + } + delete(object, "backchannel_logout_session_required") + } + + if raw, found := object["backchannel_logout_uri"]; found { + err = json.Unmarshal(raw, &a.BackchannelLogoutUri) + if err != nil { + return fmt.Errorf("error reading 'backchannel_logout_uri': %w", err) + } + delete(object, "backchannel_logout_uri") + } + + if raw, found := object["client_id"]; found { + err = json.Unmarshal(raw, &a.ClientId) + if err != nil { + return fmt.Errorf("error reading 'client_id': %w", err) + } + delete(object, "client_id") + } + + if raw, found := object["client_id_issued_at"]; found { + err = json.Unmarshal(raw, &a.ClientIdIssuedAt) + if err != nil { + return fmt.Errorf("error reading 'client_id_issued_at': %w", err) + } + delete(object, "client_id_issued_at") + } + + if raw, found := object["client_name"]; found { + err = json.Unmarshal(raw, &a.ClientName) + if err != nil { + return fmt.Errorf("error reading 'client_name': %w", err) + } + delete(object, "client_name") + } + + if raw, found := object["client_secret"]; found { + err = json.Unmarshal(raw, &a.ClientSecret) + if err != nil { + return fmt.Errorf("error reading 'client_secret': %w", err) + } + delete(object, "client_secret") + } + + if raw, found := object["client_secret_expires_at"]; found { + err = json.Unmarshal(raw, &a.ClientSecretExpiresAt) + if err != nil { + return fmt.Errorf("error reading 'client_secret_expires_at': %w", err) + } + delete(object, "client_secret_expires_at") + } + + if raw, found := object["client_uri"]; found { + err = json.Unmarshal(raw, &a.ClientUri) + if err != nil { + return fmt.Errorf("error reading 'client_uri': %w", err) + } + delete(object, "client_uri") + } + + if raw, found := object["contacts"]; found { + err = json.Unmarshal(raw, &a.Contacts) + if err != nil { + return fmt.Errorf("error reading 'contacts': %w", err) + } + delete(object, "contacts") + } + + if raw, found := object["dpop_bound_access_tokens"]; found { + err = json.Unmarshal(raw, &a.DpopBoundAccessTokens) + if err != nil { + return fmt.Errorf("error reading 'dpop_bound_access_tokens': %w", err) + } + delete(object, "dpop_bound_access_tokens") + } + + if raw, found := object["grant_types"]; found { + err = json.Unmarshal(raw, &a.GrantTypes) + if err != nil { + return fmt.Errorf("error reading 'grant_types': %w", err) + } + delete(object, "grant_types") + } + + if raw, found := object["jwks"]; found { + err = json.Unmarshal(raw, &a.Jwks) + if err != nil { + return fmt.Errorf("error reading 'jwks': %w", err) + } + delete(object, "jwks") + } + + if raw, found := object["jwks_uri"]; found { + err = json.Unmarshal(raw, &a.JwksUri) + if err != nil { + return fmt.Errorf("error reading 'jwks_uri': %w", err) + } + delete(object, "jwks_uri") + } + + if raw, found := object["logo_uri"]; found { + err = json.Unmarshal(raw, &a.LogoUri) + if err != nil { + return fmt.Errorf("error reading 'logo_uri': %w", err) + } + delete(object, "logo_uri") + } + + if raw, found := object["policy_uri"]; found { + err = json.Unmarshal(raw, &a.PolicyUri) + if err != nil { + return fmt.Errorf("error reading 'policy_uri': %w", err) + } + delete(object, "policy_uri") + } + + if raw, found := object["post_logout_redirect_uris"]; found { + err = json.Unmarshal(raw, &a.PostLogoutRedirectUris) + if err != nil { + return fmt.Errorf("error reading 'post_logout_redirect_uris': %w", err) + } + delete(object, "post_logout_redirect_uris") + } + + if raw, found := object["redirect_uris"]; found { + err = json.Unmarshal(raw, &a.RedirectUris) + if err != nil { + return fmt.Errorf("error reading 'redirect_uris': %w", err) + } + delete(object, "redirect_uris") + } + + if raw, found := object["registration_access_token"]; found { + err = json.Unmarshal(raw, &a.RegistrationAccessToken) + if err != nil { + return fmt.Errorf("error reading 'registration_access_token': %w", err) + } + delete(object, "registration_access_token") + } + + if raw, found := object["registration_client_uri"]; found { + err = json.Unmarshal(raw, &a.RegistrationClientUri) + if err != nil { + return fmt.Errorf("error reading 'registration_client_uri': %w", err) + } + delete(object, "registration_client_uri") + } + + if raw, found := object["require_pkce"]; found { + err = json.Unmarshal(raw, &a.RequirePkce) + if err != nil { + return fmt.Errorf("error reading 'require_pkce': %w", err) + } + delete(object, "require_pkce") + } + + if raw, found := object["resources"]; found { + err = json.Unmarshal(raw, &a.Resources) + if err != nil { + return fmt.Errorf("error reading 'resources': %w", err) + } + delete(object, "resources") + } + + if raw, found := object["response_types"]; found { + err = json.Unmarshal(raw, &a.ResponseTypes) + if err != nil { + return fmt.Errorf("error reading 'response_types': %w", err) + } + delete(object, "response_types") + } + + if raw, found := object["scope"]; found { + err = json.Unmarshal(raw, &a.Scope) + if err != nil { + return fmt.Errorf("error reading 'scope': %w", err) + } + delete(object, "scope") + } + + if raw, found := object["software_id"]; found { + err = json.Unmarshal(raw, &a.SoftwareId) + if err != nil { + return fmt.Errorf("error reading 'software_id': %w", err) + } + delete(object, "software_id") + } + + if raw, found := object["software_statement"]; found { + err = json.Unmarshal(raw, &a.SoftwareStatement) + if err != nil { + return fmt.Errorf("error reading 'software_statement': %w", err) + } + delete(object, "software_statement") + } + + if raw, found := object["software_version"]; found { + err = json.Unmarshal(raw, &a.SoftwareVersion) + if err != nil { + return fmt.Errorf("error reading 'software_version': %w", err) + } + delete(object, "software_version") + } + + if raw, found := object["subject_type"]; found { + err = json.Unmarshal(raw, &a.SubjectType) + if err != nil { + return fmt.Errorf("error reading 'subject_type': %w", err) + } + delete(object, "subject_type") + } + + if raw, found := object["token_endpoint_auth_method"]; found { + err = json.Unmarshal(raw, &a.TokenEndpointAuthMethod) + if err != nil { + return fmt.Errorf("error reading 'token_endpoint_auth_method': %w", err) + } + delete(object, "token_endpoint_auth_method") + } + + if raw, found := object["tos_uri"]; found { + err = json.Unmarshal(raw, &a.TosUri) + if err != nil { + return fmt.Errorf("error reading 'tos_uri': %w", err) + } + delete(object, "tos_uri") + } + + if raw, found := object["type"]; found { + err = json.Unmarshal(raw, &a.Type) + if err != nil { + return fmt.Errorf("error reading 'type': %w", err) + } + delete(object, "type") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for CreateDynamicOAuthClientRegistration201JSONResponseBody to handle AdditionalProperties +func (a CreateDynamicOAuthClientRegistration201JSONResponseBody) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.AuthorizationDetailsTypes != nil { + object["authorization_details_types"], err = json.Marshal(a.AuthorizationDetailsTypes) + if err != nil { + return nil, fmt.Errorf("error marshaling 'authorization_details_types': %w", err) + } + } + + if a.BackchannelLogoutSessionRequired != nil { + object["backchannel_logout_session_required"], err = json.Marshal(a.BackchannelLogoutSessionRequired) + if err != nil { + return nil, fmt.Errorf("error marshaling 'backchannel_logout_session_required': %w", err) + } + } + + if a.BackchannelLogoutUri != nil { + object["backchannel_logout_uri"], err = json.Marshal(a.BackchannelLogoutUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'backchannel_logout_uri': %w", err) + } + } + + object["client_id"], err = json.Marshal(a.ClientId) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_id': %w", err) + } + + if a.ClientIdIssuedAt != nil { + object["client_id_issued_at"], err = json.Marshal(a.ClientIdIssuedAt) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_id_issued_at': %w", err) + } + } + + if a.ClientName != nil { + object["client_name"], err = json.Marshal(a.ClientName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_name': %w", err) + } + } + + if a.ClientSecret != nil { + object["client_secret"], err = json.Marshal(a.ClientSecret) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_secret': %w", err) + } + } + + if a.ClientSecretExpiresAt != nil { + object["client_secret_expires_at"], err = json.Marshal(a.ClientSecretExpiresAt) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_secret_expires_at': %w", err) + } + } + + if a.ClientUri != nil { + object["client_uri"], err = json.Marshal(a.ClientUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_uri': %w", err) + } + } + + if a.Contacts != nil { + object["contacts"], err = json.Marshal(a.Contacts) + if err != nil { + return nil, fmt.Errorf("error marshaling 'contacts': %w", err) + } + } + + if a.DpopBoundAccessTokens != nil { + object["dpop_bound_access_tokens"], err = json.Marshal(a.DpopBoundAccessTokens) + if err != nil { + return nil, fmt.Errorf("error marshaling 'dpop_bound_access_tokens': %w", err) + } + } + + if a.GrantTypes != nil { + object["grant_types"], err = json.Marshal(a.GrantTypes) + if err != nil { + return nil, fmt.Errorf("error marshaling 'grant_types': %w", err) + } + } + + if a.Jwks != nil { + object["jwks"], err = json.Marshal(a.Jwks) + if err != nil { + return nil, fmt.Errorf("error marshaling 'jwks': %w", err) + } + } + + if a.JwksUri != nil { + object["jwks_uri"], err = json.Marshal(a.JwksUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'jwks_uri': %w", err) + } + } + + if a.LogoUri != nil { + object["logo_uri"], err = json.Marshal(a.LogoUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'logo_uri': %w", err) + } + } + + if a.PolicyUri != nil { + object["policy_uri"], err = json.Marshal(a.PolicyUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'policy_uri': %w", err) + } + } + + if a.PostLogoutRedirectUris != nil { + object["post_logout_redirect_uris"], err = json.Marshal(a.PostLogoutRedirectUris) + if err != nil { + return nil, fmt.Errorf("error marshaling 'post_logout_redirect_uris': %w", err) + } + } + + if a.RedirectUris != nil { + object["redirect_uris"], err = json.Marshal(a.RedirectUris) + if err != nil { + return nil, fmt.Errorf("error marshaling 'redirect_uris': %w", err) + } + } + + object["registration_access_token"], err = json.Marshal(a.RegistrationAccessToken) + if err != nil { + return nil, fmt.Errorf("error marshaling 'registration_access_token': %w", err) + } + + object["registration_client_uri"], err = json.Marshal(a.RegistrationClientUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'registration_client_uri': %w", err) + } + + if a.RequirePkce != nil { + object["require_pkce"], err = json.Marshal(a.RequirePkce) + if err != nil { + return nil, fmt.Errorf("error marshaling 'require_pkce': %w", err) + } + } + + if a.Resources != nil { + object["resources"], err = json.Marshal(a.Resources) + if err != nil { + return nil, fmt.Errorf("error marshaling 'resources': %w", err) + } + } + + if a.ResponseTypes != nil { + object["response_types"], err = json.Marshal(a.ResponseTypes) + if err != nil { + return nil, fmt.Errorf("error marshaling 'response_types': %w", err) + } + } + + if a.Scope != nil { + object["scope"], err = json.Marshal(a.Scope) + if err != nil { + return nil, fmt.Errorf("error marshaling 'scope': %w", err) + } + } + + if a.SoftwareId != nil { + object["software_id"], err = json.Marshal(a.SoftwareId) + if err != nil { + return nil, fmt.Errorf("error marshaling 'software_id': %w", err) + } + } + + if a.SoftwareStatement != nil { + object["software_statement"], err = json.Marshal(a.SoftwareStatement) + if err != nil { + return nil, fmt.Errorf("error marshaling 'software_statement': %w", err) + } + } + + if a.SoftwareVersion != nil { + object["software_version"], err = json.Marshal(a.SoftwareVersion) + if err != nil { + return nil, fmt.Errorf("error marshaling 'software_version': %w", err) + } + } + + if a.SubjectType != nil { + object["subject_type"], err = json.Marshal(a.SubjectType) + if err != nil { + return nil, fmt.Errorf("error marshaling 'subject_type': %w", err) + } + } + + if a.TokenEndpointAuthMethod != nil { + object["token_endpoint_auth_method"], err = json.Marshal(a.TokenEndpointAuthMethod) + if err != nil { + return nil, fmt.Errorf("error marshaling 'token_endpoint_auth_method': %w", err) + } + } + + if a.TosUri != nil { + object["tos_uri"], err = json.Marshal(a.TosUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'tos_uri': %w", err) + } + } + + if a.Type != nil { + object["type"], err = json.Marshal(a.Type) + if err != nil { + return nil, fmt.Errorf("error marshaling 'type': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1. Returns the specified +// element and whether it was found +func (a GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1 +func (a *GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1 to handle AdditionalProperties +func (a *GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["keys"]; found { + err = json.Unmarshal(raw, &a.Keys) + if err != nil { + return fmt.Errorf("error reading 'keys': %w", err) + } + delete(object, "keys") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1 to handle AdditionalProperties +func (a GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.Keys != nil { + object["keys"], err = json.Marshal(a.Keys) + if err != nil { + return nil, fmt.Errorf("error marshaling 'keys': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for GetDynamicOAuthClientRegistration200JSONResponseBody. Returns the specified // element and whether it was found func (a GetDynamicOAuthClientRegistration200JSONResponseBody) Get(fieldName string) (value interface{}, found bool) { @@ -9458,6 +8809,30 @@ func (a *GetDynamicOAuthClientRegistration200JSONResponseBody) UnmarshalJSON(b [ return err } + if raw, found := object["authorization_details_types"]; found { + err = json.Unmarshal(raw, &a.AuthorizationDetailsTypes) + if err != nil { + return fmt.Errorf("error reading 'authorization_details_types': %w", err) + } + delete(object, "authorization_details_types") + } + + if raw, found := object["backchannel_logout_session_required"]; found { + err = json.Unmarshal(raw, &a.BackchannelLogoutSessionRequired) + if err != nil { + return fmt.Errorf("error reading 'backchannel_logout_session_required': %w", err) + } + delete(object, "backchannel_logout_session_required") + } + + if raw, found := object["backchannel_logout_uri"]; found { + err = json.Unmarshal(raw, &a.BackchannelLogoutUri) + if err != nil { + return fmt.Errorf("error reading 'backchannel_logout_uri': %w", err) + } + delete(object, "backchannel_logout_uri") + } + if raw, found := object["client_id"]; found { err = json.Unmarshal(raw, &a.ClientId) if err != nil { @@ -9466,6 +8841,118 @@ func (a *GetDynamicOAuthClientRegistration200JSONResponseBody) UnmarshalJSON(b [ delete(object, "client_id") } + if raw, found := object["client_id_issued_at"]; found { + err = json.Unmarshal(raw, &a.ClientIdIssuedAt) + if err != nil { + return fmt.Errorf("error reading 'client_id_issued_at': %w", err) + } + delete(object, "client_id_issued_at") + } + + if raw, found := object["client_name"]; found { + err = json.Unmarshal(raw, &a.ClientName) + if err != nil { + return fmt.Errorf("error reading 'client_name': %w", err) + } + delete(object, "client_name") + } + + if raw, found := object["client_secret"]; found { + err = json.Unmarshal(raw, &a.ClientSecret) + if err != nil { + return fmt.Errorf("error reading 'client_secret': %w", err) + } + delete(object, "client_secret") + } + + if raw, found := object["client_secret_expires_at"]; found { + err = json.Unmarshal(raw, &a.ClientSecretExpiresAt) + if err != nil { + return fmt.Errorf("error reading 'client_secret_expires_at': %w", err) + } + delete(object, "client_secret_expires_at") + } + + if raw, found := object["client_uri"]; found { + err = json.Unmarshal(raw, &a.ClientUri) + if err != nil { + return fmt.Errorf("error reading 'client_uri': %w", err) + } + delete(object, "client_uri") + } + + if raw, found := object["contacts"]; found { + err = json.Unmarshal(raw, &a.Contacts) + if err != nil { + return fmt.Errorf("error reading 'contacts': %w", err) + } + delete(object, "contacts") + } + + if raw, found := object["dpop_bound_access_tokens"]; found { + err = json.Unmarshal(raw, &a.DpopBoundAccessTokens) + if err != nil { + return fmt.Errorf("error reading 'dpop_bound_access_tokens': %w", err) + } + delete(object, "dpop_bound_access_tokens") + } + + if raw, found := object["grant_types"]; found { + err = json.Unmarshal(raw, &a.GrantTypes) + if err != nil { + return fmt.Errorf("error reading 'grant_types': %w", err) + } + delete(object, "grant_types") + } + + if raw, found := object["jwks"]; found { + err = json.Unmarshal(raw, &a.Jwks) + if err != nil { + return fmt.Errorf("error reading 'jwks': %w", err) + } + delete(object, "jwks") + } + + if raw, found := object["jwks_uri"]; found { + err = json.Unmarshal(raw, &a.JwksUri) + if err != nil { + return fmt.Errorf("error reading 'jwks_uri': %w", err) + } + delete(object, "jwks_uri") + } + + if raw, found := object["logo_uri"]; found { + err = json.Unmarshal(raw, &a.LogoUri) + if err != nil { + return fmt.Errorf("error reading 'logo_uri': %w", err) + } + delete(object, "logo_uri") + } + + if raw, found := object["policy_uri"]; found { + err = json.Unmarshal(raw, &a.PolicyUri) + if err != nil { + return fmt.Errorf("error reading 'policy_uri': %w", err) + } + delete(object, "policy_uri") + } + + if raw, found := object["post_logout_redirect_uris"]; found { + err = json.Unmarshal(raw, &a.PostLogoutRedirectUris) + if err != nil { + return fmt.Errorf("error reading 'post_logout_redirect_uris': %w", err) + } + delete(object, "post_logout_redirect_uris") + } + + if raw, found := object["redirect_uris"]; found { + err = json.Unmarshal(raw, &a.RedirectUris) + if err != nil { + return fmt.Errorf("error reading 'redirect_uris': %w", err) + } + delete(object, "redirect_uris") + } + if raw, found := object["registration_access_token"]; found { err = json.Unmarshal(raw, &a.RegistrationAccessToken) if err != nil { @@ -9482,6 +8969,30 @@ func (a *GetDynamicOAuthClientRegistration200JSONResponseBody) UnmarshalJSON(b [ delete(object, "registration_client_uri") } + if raw, found := object["require_pkce"]; found { + err = json.Unmarshal(raw, &a.RequirePkce) + if err != nil { + return fmt.Errorf("error reading 'require_pkce': %w", err) + } + delete(object, "require_pkce") + } + + if raw, found := object["resources"]; found { + err = json.Unmarshal(raw, &a.Resources) + if err != nil { + return fmt.Errorf("error reading 'resources': %w", err) + } + delete(object, "resources") + } + + if raw, found := object["response_types"]; found { + err = json.Unmarshal(raw, &a.ResponseTypes) + if err != nil { + return fmt.Errorf("error reading 'response_types': %w", err) + } + delete(object, "response_types") + } + if raw, found := object["scope"]; found { err = json.Unmarshal(raw, &a.Scope) if err != nil { @@ -9490,6 +9001,62 @@ func (a *GetDynamicOAuthClientRegistration200JSONResponseBody) UnmarshalJSON(b [ delete(object, "scope") } + if raw, found := object["software_id"]; found { + err = json.Unmarshal(raw, &a.SoftwareId) + if err != nil { + return fmt.Errorf("error reading 'software_id': %w", err) + } + delete(object, "software_id") + } + + if raw, found := object["software_statement"]; found { + err = json.Unmarshal(raw, &a.SoftwareStatement) + if err != nil { + return fmt.Errorf("error reading 'software_statement': %w", err) + } + delete(object, "software_statement") + } + + if raw, found := object["software_version"]; found { + err = json.Unmarshal(raw, &a.SoftwareVersion) + if err != nil { + return fmt.Errorf("error reading 'software_version': %w", err) + } + delete(object, "software_version") + } + + if raw, found := object["subject_type"]; found { + err = json.Unmarshal(raw, &a.SubjectType) + if err != nil { + return fmt.Errorf("error reading 'subject_type': %w", err) + } + delete(object, "subject_type") + } + + if raw, found := object["token_endpoint_auth_method"]; found { + err = json.Unmarshal(raw, &a.TokenEndpointAuthMethod) + if err != nil { + return fmt.Errorf("error reading 'token_endpoint_auth_method': %w", err) + } + delete(object, "token_endpoint_auth_method") + } + + if raw, found := object["tos_uri"]; found { + err = json.Unmarshal(raw, &a.TosUri) + if err != nil { + return fmt.Errorf("error reading 'tos_uri': %w", err) + } + delete(object, "tos_uri") + } + + if raw, found := object["type"]; found { + err = json.Unmarshal(raw, &a.Type) + if err != nil { + return fmt.Errorf("error reading 'type': %w", err) + } + delete(object, "type") + } + if len(object) != 0 { a.AdditionalProperties = make(map[string]interface{}) for fieldName, fieldBuf := range object { @@ -9509,11 +9076,130 @@ func (a GetDynamicOAuthClientRegistration200JSONResponseBody) MarshalJSON() ([]b var err error object := make(map[string]json.RawMessage) + if a.AuthorizationDetailsTypes != nil { + object["authorization_details_types"], err = json.Marshal(a.AuthorizationDetailsTypes) + if err != nil { + return nil, fmt.Errorf("error marshaling 'authorization_details_types': %w", err) + } + } + + if a.BackchannelLogoutSessionRequired != nil { + object["backchannel_logout_session_required"], err = json.Marshal(a.BackchannelLogoutSessionRequired) + if err != nil { + return nil, fmt.Errorf("error marshaling 'backchannel_logout_session_required': %w", err) + } + } + + if a.BackchannelLogoutUri != nil { + object["backchannel_logout_uri"], err = json.Marshal(a.BackchannelLogoutUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'backchannel_logout_uri': %w", err) + } + } + object["client_id"], err = json.Marshal(a.ClientId) if err != nil { return nil, fmt.Errorf("error marshaling 'client_id': %w", err) } + if a.ClientIdIssuedAt != nil { + object["client_id_issued_at"], err = json.Marshal(a.ClientIdIssuedAt) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_id_issued_at': %w", err) + } + } + + if a.ClientName != nil { + object["client_name"], err = json.Marshal(a.ClientName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_name': %w", err) + } + } + + if a.ClientSecret != nil { + object["client_secret"], err = json.Marshal(a.ClientSecret) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_secret': %w", err) + } + } + + if a.ClientSecretExpiresAt != nil { + object["client_secret_expires_at"], err = json.Marshal(a.ClientSecretExpiresAt) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_secret_expires_at': %w", err) + } + } + + if a.ClientUri != nil { + object["client_uri"], err = json.Marshal(a.ClientUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_uri': %w", err) + } + } + + if a.Contacts != nil { + object["contacts"], err = json.Marshal(a.Contacts) + if err != nil { + return nil, fmt.Errorf("error marshaling 'contacts': %w", err) + } + } + + if a.DpopBoundAccessTokens != nil { + object["dpop_bound_access_tokens"], err = json.Marshal(a.DpopBoundAccessTokens) + if err != nil { + return nil, fmt.Errorf("error marshaling 'dpop_bound_access_tokens': %w", err) + } + } + + if a.GrantTypes != nil { + object["grant_types"], err = json.Marshal(a.GrantTypes) + if err != nil { + return nil, fmt.Errorf("error marshaling 'grant_types': %w", err) + } + } + + if a.Jwks != nil { + object["jwks"], err = json.Marshal(a.Jwks) + if err != nil { + return nil, fmt.Errorf("error marshaling 'jwks': %w", err) + } + } + + if a.JwksUri != nil { + object["jwks_uri"], err = json.Marshal(a.JwksUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'jwks_uri': %w", err) + } + } + + if a.LogoUri != nil { + object["logo_uri"], err = json.Marshal(a.LogoUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'logo_uri': %w", err) + } + } + + if a.PolicyUri != nil { + object["policy_uri"], err = json.Marshal(a.PolicyUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'policy_uri': %w", err) + } + } + + if a.PostLogoutRedirectUris != nil { + object["post_logout_redirect_uris"], err = json.Marshal(a.PostLogoutRedirectUris) + if err != nil { + return nil, fmt.Errorf("error marshaling 'post_logout_redirect_uris': %w", err) + } + } + + if a.RedirectUris != nil { + object["redirect_uris"], err = json.Marshal(a.RedirectUris) + if err != nil { + return nil, fmt.Errorf("error marshaling 'redirect_uris': %w", err) + } + } + object["registration_access_token"], err = json.Marshal(a.RegistrationAccessToken) if err != nil { return nil, fmt.Errorf("error marshaling 'registration_access_token': %w", err) @@ -9524,6 +9210,27 @@ func (a GetDynamicOAuthClientRegistration200JSONResponseBody) MarshalJSON() ([]b return nil, fmt.Errorf("error marshaling 'registration_client_uri': %w", err) } + if a.RequirePkce != nil { + object["require_pkce"], err = json.Marshal(a.RequirePkce) + if err != nil { + return nil, fmt.Errorf("error marshaling 'require_pkce': %w", err) + } + } + + if a.Resources != nil { + object["resources"], err = json.Marshal(a.Resources) + if err != nil { + return nil, fmt.Errorf("error marshaling 'resources': %w", err) + } + } + + if a.ResponseTypes != nil { + object["response_types"], err = json.Marshal(a.ResponseTypes) + if err != nil { + return nil, fmt.Errorf("error marshaling 'response_types': %w", err) + } + } + if a.Scope != nil { object["scope"], err = json.Marshal(a.Scope) if err != nil { @@ -9531,6 +9238,123 @@ func (a GetDynamicOAuthClientRegistration200JSONResponseBody) MarshalJSON() ([]b } } + if a.SoftwareId != nil { + object["software_id"], err = json.Marshal(a.SoftwareId) + if err != nil { + return nil, fmt.Errorf("error marshaling 'software_id': %w", err) + } + } + + if a.SoftwareStatement != nil { + object["software_statement"], err = json.Marshal(a.SoftwareStatement) + if err != nil { + return nil, fmt.Errorf("error marshaling 'software_statement': %w", err) + } + } + + if a.SoftwareVersion != nil { + object["software_version"], err = json.Marshal(a.SoftwareVersion) + if err != nil { + return nil, fmt.Errorf("error marshaling 'software_version': %w", err) + } + } + + if a.SubjectType != nil { + object["subject_type"], err = json.Marshal(a.SubjectType) + if err != nil { + return nil, fmt.Errorf("error marshaling 'subject_type': %w", err) + } + } + + if a.TokenEndpointAuthMethod != nil { + object["token_endpoint_auth_method"], err = json.Marshal(a.TokenEndpointAuthMethod) + if err != nil { + return nil, fmt.Errorf("error marshaling 'token_endpoint_auth_method': %w", err) + } + } + + if a.TosUri != nil { + object["tos_uri"], err = json.Marshal(a.TosUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'tos_uri': %w", err) + } + } + + if a.Type != nil { + object["type"], err = json.Marshal(a.Type) + if err != nil { + return nil, fmt.Errorf("error marshaling 'type': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1. Returns the specified +// element and whether it was found +func (a UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1 +func (a *UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1 to handle AdditionalProperties +func (a *UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["keys"]; found { + err = json.Unmarshal(raw, &a.Keys) + if err != nil { + return fmt.Errorf("error reading 'keys': %w", err) + } + delete(object, "keys") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1 to handle AdditionalProperties +func (a UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.Keys != nil { + object["keys"], err = json.Marshal(a.Keys) + if err != nil { + return nil, fmt.Errorf("error marshaling 'keys': %w", err) + } + } + for fieldName, field := range a.AdditionalProperties { object[fieldName], err = json.Marshal(field) if err != nil { @@ -9565,6 +9389,30 @@ func (a *UpdateDynamicOAuthClientRegistration200JSONResponseBody) UnmarshalJSON( return err } + if raw, found := object["authorization_details_types"]; found { + err = json.Unmarshal(raw, &a.AuthorizationDetailsTypes) + if err != nil { + return fmt.Errorf("error reading 'authorization_details_types': %w", err) + } + delete(object, "authorization_details_types") + } + + if raw, found := object["backchannel_logout_session_required"]; found { + err = json.Unmarshal(raw, &a.BackchannelLogoutSessionRequired) + if err != nil { + return fmt.Errorf("error reading 'backchannel_logout_session_required': %w", err) + } + delete(object, "backchannel_logout_session_required") + } + + if raw, found := object["backchannel_logout_uri"]; found { + err = json.Unmarshal(raw, &a.BackchannelLogoutUri) + if err != nil { + return fmt.Errorf("error reading 'backchannel_logout_uri': %w", err) + } + delete(object, "backchannel_logout_uri") + } + if raw, found := object["client_id"]; found { err = json.Unmarshal(raw, &a.ClientId) if err != nil { @@ -9573,6 +9421,118 @@ func (a *UpdateDynamicOAuthClientRegistration200JSONResponseBody) UnmarshalJSON( delete(object, "client_id") } + if raw, found := object["client_id_issued_at"]; found { + err = json.Unmarshal(raw, &a.ClientIdIssuedAt) + if err != nil { + return fmt.Errorf("error reading 'client_id_issued_at': %w", err) + } + delete(object, "client_id_issued_at") + } + + if raw, found := object["client_name"]; found { + err = json.Unmarshal(raw, &a.ClientName) + if err != nil { + return fmt.Errorf("error reading 'client_name': %w", err) + } + delete(object, "client_name") + } + + if raw, found := object["client_secret"]; found { + err = json.Unmarshal(raw, &a.ClientSecret) + if err != nil { + return fmt.Errorf("error reading 'client_secret': %w", err) + } + delete(object, "client_secret") + } + + if raw, found := object["client_secret_expires_at"]; found { + err = json.Unmarshal(raw, &a.ClientSecretExpiresAt) + if err != nil { + return fmt.Errorf("error reading 'client_secret_expires_at': %w", err) + } + delete(object, "client_secret_expires_at") + } + + if raw, found := object["client_uri"]; found { + err = json.Unmarshal(raw, &a.ClientUri) + if err != nil { + return fmt.Errorf("error reading 'client_uri': %w", err) + } + delete(object, "client_uri") + } + + if raw, found := object["contacts"]; found { + err = json.Unmarshal(raw, &a.Contacts) + if err != nil { + return fmt.Errorf("error reading 'contacts': %w", err) + } + delete(object, "contacts") + } + + if raw, found := object["dpop_bound_access_tokens"]; found { + err = json.Unmarshal(raw, &a.DpopBoundAccessTokens) + if err != nil { + return fmt.Errorf("error reading 'dpop_bound_access_tokens': %w", err) + } + delete(object, "dpop_bound_access_tokens") + } + + if raw, found := object["grant_types"]; found { + err = json.Unmarshal(raw, &a.GrantTypes) + if err != nil { + return fmt.Errorf("error reading 'grant_types': %w", err) + } + delete(object, "grant_types") + } + + if raw, found := object["jwks"]; found { + err = json.Unmarshal(raw, &a.Jwks) + if err != nil { + return fmt.Errorf("error reading 'jwks': %w", err) + } + delete(object, "jwks") + } + + if raw, found := object["jwks_uri"]; found { + err = json.Unmarshal(raw, &a.JwksUri) + if err != nil { + return fmt.Errorf("error reading 'jwks_uri': %w", err) + } + delete(object, "jwks_uri") + } + + if raw, found := object["logo_uri"]; found { + err = json.Unmarshal(raw, &a.LogoUri) + if err != nil { + return fmt.Errorf("error reading 'logo_uri': %w", err) + } + delete(object, "logo_uri") + } + + if raw, found := object["policy_uri"]; found { + err = json.Unmarshal(raw, &a.PolicyUri) + if err != nil { + return fmt.Errorf("error reading 'policy_uri': %w", err) + } + delete(object, "policy_uri") + } + + if raw, found := object["post_logout_redirect_uris"]; found { + err = json.Unmarshal(raw, &a.PostLogoutRedirectUris) + if err != nil { + return fmt.Errorf("error reading 'post_logout_redirect_uris': %w", err) + } + delete(object, "post_logout_redirect_uris") + } + + if raw, found := object["redirect_uris"]; found { + err = json.Unmarshal(raw, &a.RedirectUris) + if err != nil { + return fmt.Errorf("error reading 'redirect_uris': %w", err) + } + delete(object, "redirect_uris") + } + if raw, found := object["registration_access_token"]; found { err = json.Unmarshal(raw, &a.RegistrationAccessToken) if err != nil { @@ -9589,6 +9549,30 @@ func (a *UpdateDynamicOAuthClientRegistration200JSONResponseBody) UnmarshalJSON( delete(object, "registration_client_uri") } + if raw, found := object["require_pkce"]; found { + err = json.Unmarshal(raw, &a.RequirePkce) + if err != nil { + return fmt.Errorf("error reading 'require_pkce': %w", err) + } + delete(object, "require_pkce") + } + + if raw, found := object["resources"]; found { + err = json.Unmarshal(raw, &a.Resources) + if err != nil { + return fmt.Errorf("error reading 'resources': %w", err) + } + delete(object, "resources") + } + + if raw, found := object["response_types"]; found { + err = json.Unmarshal(raw, &a.ResponseTypes) + if err != nil { + return fmt.Errorf("error reading 'response_types': %w", err) + } + delete(object, "response_types") + } + if raw, found := object["scope"]; found { err = json.Unmarshal(raw, &a.Scope) if err != nil { @@ -9597,6 +9581,62 @@ func (a *UpdateDynamicOAuthClientRegistration200JSONResponseBody) UnmarshalJSON( delete(object, "scope") } + if raw, found := object["software_id"]; found { + err = json.Unmarshal(raw, &a.SoftwareId) + if err != nil { + return fmt.Errorf("error reading 'software_id': %w", err) + } + delete(object, "software_id") + } + + if raw, found := object["software_statement"]; found { + err = json.Unmarshal(raw, &a.SoftwareStatement) + if err != nil { + return fmt.Errorf("error reading 'software_statement': %w", err) + } + delete(object, "software_statement") + } + + if raw, found := object["software_version"]; found { + err = json.Unmarshal(raw, &a.SoftwareVersion) + if err != nil { + return fmt.Errorf("error reading 'software_version': %w", err) + } + delete(object, "software_version") + } + + if raw, found := object["subject_type"]; found { + err = json.Unmarshal(raw, &a.SubjectType) + if err != nil { + return fmt.Errorf("error reading 'subject_type': %w", err) + } + delete(object, "subject_type") + } + + if raw, found := object["token_endpoint_auth_method"]; found { + err = json.Unmarshal(raw, &a.TokenEndpointAuthMethod) + if err != nil { + return fmt.Errorf("error reading 'token_endpoint_auth_method': %w", err) + } + delete(object, "token_endpoint_auth_method") + } + + if raw, found := object["tos_uri"]; found { + err = json.Unmarshal(raw, &a.TosUri) + if err != nil { + return fmt.Errorf("error reading 'tos_uri': %w", err) + } + delete(object, "tos_uri") + } + + if raw, found := object["type"]; found { + err = json.Unmarshal(raw, &a.Type) + if err != nil { + return fmt.Errorf("error reading 'type': %w", err) + } + delete(object, "type") + } + if len(object) != 0 { a.AdditionalProperties = make(map[string]interface{}) for fieldName, fieldBuf := range object { @@ -9616,11 +9656,130 @@ func (a UpdateDynamicOAuthClientRegistration200JSONResponseBody) MarshalJSON() ( var err error object := make(map[string]json.RawMessage) + if a.AuthorizationDetailsTypes != nil { + object["authorization_details_types"], err = json.Marshal(a.AuthorizationDetailsTypes) + if err != nil { + return nil, fmt.Errorf("error marshaling 'authorization_details_types': %w", err) + } + } + + if a.BackchannelLogoutSessionRequired != nil { + object["backchannel_logout_session_required"], err = json.Marshal(a.BackchannelLogoutSessionRequired) + if err != nil { + return nil, fmt.Errorf("error marshaling 'backchannel_logout_session_required': %w", err) + } + } + + if a.BackchannelLogoutUri != nil { + object["backchannel_logout_uri"], err = json.Marshal(a.BackchannelLogoutUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'backchannel_logout_uri': %w", err) + } + } + object["client_id"], err = json.Marshal(a.ClientId) if err != nil { return nil, fmt.Errorf("error marshaling 'client_id': %w", err) } + if a.ClientIdIssuedAt != nil { + object["client_id_issued_at"], err = json.Marshal(a.ClientIdIssuedAt) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_id_issued_at': %w", err) + } + } + + if a.ClientName != nil { + object["client_name"], err = json.Marshal(a.ClientName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_name': %w", err) + } + } + + if a.ClientSecret != nil { + object["client_secret"], err = json.Marshal(a.ClientSecret) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_secret': %w", err) + } + } + + if a.ClientSecretExpiresAt != nil { + object["client_secret_expires_at"], err = json.Marshal(a.ClientSecretExpiresAt) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_secret_expires_at': %w", err) + } + } + + if a.ClientUri != nil { + object["client_uri"], err = json.Marshal(a.ClientUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'client_uri': %w", err) + } + } + + if a.Contacts != nil { + object["contacts"], err = json.Marshal(a.Contacts) + if err != nil { + return nil, fmt.Errorf("error marshaling 'contacts': %w", err) + } + } + + if a.DpopBoundAccessTokens != nil { + object["dpop_bound_access_tokens"], err = json.Marshal(a.DpopBoundAccessTokens) + if err != nil { + return nil, fmt.Errorf("error marshaling 'dpop_bound_access_tokens': %w", err) + } + } + + if a.GrantTypes != nil { + object["grant_types"], err = json.Marshal(a.GrantTypes) + if err != nil { + return nil, fmt.Errorf("error marshaling 'grant_types': %w", err) + } + } + + if a.Jwks != nil { + object["jwks"], err = json.Marshal(a.Jwks) + if err != nil { + return nil, fmt.Errorf("error marshaling 'jwks': %w", err) + } + } + + if a.JwksUri != nil { + object["jwks_uri"], err = json.Marshal(a.JwksUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'jwks_uri': %w", err) + } + } + + if a.LogoUri != nil { + object["logo_uri"], err = json.Marshal(a.LogoUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'logo_uri': %w", err) + } + } + + if a.PolicyUri != nil { + object["policy_uri"], err = json.Marshal(a.PolicyUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'policy_uri': %w", err) + } + } + + if a.PostLogoutRedirectUris != nil { + object["post_logout_redirect_uris"], err = json.Marshal(a.PostLogoutRedirectUris) + if err != nil { + return nil, fmt.Errorf("error marshaling 'post_logout_redirect_uris': %w", err) + } + } + + if a.RedirectUris != nil { + object["redirect_uris"], err = json.Marshal(a.RedirectUris) + if err != nil { + return nil, fmt.Errorf("error marshaling 'redirect_uris': %w", err) + } + } + object["registration_access_token"], err = json.Marshal(a.RegistrationAccessToken) if err != nil { return nil, fmt.Errorf("error marshaling 'registration_access_token': %w", err) @@ -9631,6 +9790,27 @@ func (a UpdateDynamicOAuthClientRegistration200JSONResponseBody) MarshalJSON() ( return nil, fmt.Errorf("error marshaling 'registration_client_uri': %w", err) } + if a.RequirePkce != nil { + object["require_pkce"], err = json.Marshal(a.RequirePkce) + if err != nil { + return nil, fmt.Errorf("error marshaling 'require_pkce': %w", err) + } + } + + if a.Resources != nil { + object["resources"], err = json.Marshal(a.Resources) + if err != nil { + return nil, fmt.Errorf("error marshaling 'resources': %w", err) + } + } + + if a.ResponseTypes != nil { + object["response_types"], err = json.Marshal(a.ResponseTypes) + if err != nil { + return nil, fmt.Errorf("error marshaling 'response_types': %w", err) + } + } + if a.Scope != nil { object["scope"], err = json.Marshal(a.Scope) if err != nil { @@ -9638,6 +9818,55 @@ func (a UpdateDynamicOAuthClientRegistration200JSONResponseBody) MarshalJSON() ( } } + if a.SoftwareId != nil { + object["software_id"], err = json.Marshal(a.SoftwareId) + if err != nil { + return nil, fmt.Errorf("error marshaling 'software_id': %w", err) + } + } + + if a.SoftwareStatement != nil { + object["software_statement"], err = json.Marshal(a.SoftwareStatement) + if err != nil { + return nil, fmt.Errorf("error marshaling 'software_statement': %w", err) + } + } + + if a.SoftwareVersion != nil { + object["software_version"], err = json.Marshal(a.SoftwareVersion) + if err != nil { + return nil, fmt.Errorf("error marshaling 'software_version': %w", err) + } + } + + if a.SubjectType != nil { + object["subject_type"], err = json.Marshal(a.SubjectType) + if err != nil { + return nil, fmt.Errorf("error marshaling 'subject_type': %w", err) + } + } + + if a.TokenEndpointAuthMethod != nil { + object["token_endpoint_auth_method"], err = json.Marshal(a.TokenEndpointAuthMethod) + if err != nil { + return nil, fmt.Errorf("error marshaling 'token_endpoint_auth_method': %w", err) + } + } + + if a.TosUri != nil { + object["tos_uri"], err = json.Marshal(a.TosUri) + if err != nil { + return nil, fmt.Errorf("error marshaling 'tos_uri': %w", err) + } + } + + if a.Type != nil { + object["type"], err = json.Marshal(a.Type) + if err != nil { + return nil, fmt.Errorf("error marshaling 'type': %w", err) + } + } + for fieldName, field := range a.AdditionalProperties { object[fieldName], err = json.Marshal(field) if err != nil { @@ -10181,22 +10410,22 @@ func (t *UpdateImageDomainSettings) UnmarshalJSON(b []byte) error { return err } -// AsCreateUserJSONBodyRole0 returns the union data inside the CreateUserJSONBody_Role as a CreateUserJSONBodyRole0 -func (t CreateUserJSONBody_Role) AsCreateUserJSONBodyRole0() (CreateUserJSONBodyRole0, error) { - var body CreateUserJSONBodyRole0 +// AsCreateDynamicOAuthClientRegistrationJSONBodyJwks0 returns the union data inside the CreateDynamicOAuthClientRegistrationJSONBody_Jwks as a CreateDynamicOAuthClientRegistrationJSONBodyJwks0 +func (t CreateDynamicOAuthClientRegistrationJSONBody_Jwks) AsCreateDynamicOAuthClientRegistrationJSONBodyJwks0() (CreateDynamicOAuthClientRegistrationJSONBodyJwks0, error) { + var body CreateDynamicOAuthClientRegistrationJSONBodyJwks0 err := json.Unmarshal(t.union, &body) return body, err } -// FromCreateUserJSONBodyRole0 overwrites any union data inside the CreateUserJSONBody_Role as the provided CreateUserJSONBodyRole0 -func (t *CreateUserJSONBody_Role) FromCreateUserJSONBodyRole0(v CreateUserJSONBodyRole0) error { +// FromCreateDynamicOAuthClientRegistrationJSONBodyJwks0 overwrites any union data inside the CreateDynamicOAuthClientRegistrationJSONBody_Jwks as the provided CreateDynamicOAuthClientRegistrationJSONBodyJwks0 +func (t *CreateDynamicOAuthClientRegistrationJSONBody_Jwks) FromCreateDynamicOAuthClientRegistrationJSONBodyJwks0(v CreateDynamicOAuthClientRegistrationJSONBodyJwks0) error { b, err := json.Marshal(v) t.union = b return err } -// MergeCreateUserJSONBodyRole0 performs a merge with any union data inside the CreateUserJSONBody_Role, using the provided CreateUserJSONBodyRole0 -func (t *CreateUserJSONBody_Role) MergeCreateUserJSONBodyRole0(v CreateUserJSONBodyRole0) error { +// MergeCreateDynamicOAuthClientRegistrationJSONBodyJwks0 performs a merge with any union data inside the CreateDynamicOAuthClientRegistrationJSONBody_Jwks, using the provided CreateDynamicOAuthClientRegistrationJSONBodyJwks0 +func (t *CreateDynamicOAuthClientRegistrationJSONBody_Jwks) MergeCreateDynamicOAuthClientRegistrationJSONBodyJwks0(v CreateDynamicOAuthClientRegistrationJSONBodyJwks0) error { b, err := json.Marshal(v) if err != nil { return err @@ -10207,22 +10436,22 @@ func (t *CreateUserJSONBody_Role) MergeCreateUserJSONBodyRole0(v CreateUserJSONB return err } -// AsCreateUserJSONBodyRole1 returns the union data inside the CreateUserJSONBody_Role as a CreateUserJSONBodyRole1 -func (t CreateUserJSONBody_Role) AsCreateUserJSONBodyRole1() (CreateUserJSONBodyRole1, error) { - var body CreateUserJSONBodyRole1 +// AsCreateDynamicOAuthClientRegistrationJSONBodyJwks1 returns the union data inside the CreateDynamicOAuthClientRegistrationJSONBody_Jwks as a CreateDynamicOAuthClientRegistrationJSONBodyJwks1 +func (t CreateDynamicOAuthClientRegistrationJSONBody_Jwks) AsCreateDynamicOAuthClientRegistrationJSONBodyJwks1() (CreateDynamicOAuthClientRegistrationJSONBodyJwks1, error) { + var body CreateDynamicOAuthClientRegistrationJSONBodyJwks1 err := json.Unmarshal(t.union, &body) return body, err } -// FromCreateUserJSONBodyRole1 overwrites any union data inside the CreateUserJSONBody_Role as the provided CreateUserJSONBodyRole1 -func (t *CreateUserJSONBody_Role) FromCreateUserJSONBodyRole1(v CreateUserJSONBodyRole1) error { +// FromCreateDynamicOAuthClientRegistrationJSONBodyJwks1 overwrites any union data inside the CreateDynamicOAuthClientRegistrationJSONBody_Jwks as the provided CreateDynamicOAuthClientRegistrationJSONBodyJwks1 +func (t *CreateDynamicOAuthClientRegistrationJSONBody_Jwks) FromCreateDynamicOAuthClientRegistrationJSONBodyJwks1(v CreateDynamicOAuthClientRegistrationJSONBodyJwks1) error { b, err := json.Marshal(v) t.union = b return err } -// MergeCreateUserJSONBodyRole1 performs a merge with any union data inside the CreateUserJSONBody_Role, using the provided CreateUserJSONBodyRole1 -func (t *CreateUserJSONBody_Role) MergeCreateUserJSONBodyRole1(v CreateUserJSONBodyRole1) error { +// MergeCreateDynamicOAuthClientRegistrationJSONBodyJwks1 performs a merge with any union data inside the CreateDynamicOAuthClientRegistrationJSONBody_Jwks, using the provided CreateDynamicOAuthClientRegistrationJSONBodyJwks1 +func (t *CreateDynamicOAuthClientRegistrationJSONBody_Jwks) MergeCreateDynamicOAuthClientRegistrationJSONBodyJwks1(v CreateDynamicOAuthClientRegistrationJSONBodyJwks1) error { b, err := json.Marshal(v) if err != nil { return err @@ -10233,32 +10462,32 @@ func (t *CreateUserJSONBody_Role) MergeCreateUserJSONBodyRole1(v CreateUserJSONB return err } -func (t CreateUserJSONBody_Role) MarshalJSON() ([]byte, error) { +func (t CreateDynamicOAuthClientRegistrationJSONBody_Jwks) MarshalJSON() ([]byte, error) { b, err := t.union.MarshalJSON() return b, err } -func (t *CreateUserJSONBody_Role) UnmarshalJSON(b []byte) error { +func (t *CreateDynamicOAuthClientRegistrationJSONBody_Jwks) UnmarshalJSON(b []byte) error { err := t.union.UnmarshalJSON(b) return err } -// AsListUsersParamsFilterValue00 returns the union data inside the ListUsersParamsFilterValue0 as a ListUsersParamsFilterValue00 -func (t ListUsersParamsFilterValue0) AsListUsersParamsFilterValue00() (ListUsersParamsFilterValue00, error) { - var body ListUsersParamsFilterValue00 +// AsCreateDynamicOAuthClientRegistration201JSONResponseBodyJwks0 returns the union data inside the CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks as a CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks0 +func (t CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks) AsCreateDynamicOAuthClientRegistration201JSONResponseBodyJwks0() (CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks0, error) { + var body CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks0 err := json.Unmarshal(t.union, &body) return body, err } -// FromListUsersParamsFilterValue00 overwrites any union data inside the ListUsersParamsFilterValue0 as the provided ListUsersParamsFilterValue00 -func (t *ListUsersParamsFilterValue0) FromListUsersParamsFilterValue00(v ListUsersParamsFilterValue00) error { +// FromCreateDynamicOAuthClientRegistration201JSONResponseBodyJwks0 overwrites any union data inside the CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks as the provided CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks0 +func (t *CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks) FromCreateDynamicOAuthClientRegistration201JSONResponseBodyJwks0(v CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks0) error { b, err := json.Marshal(v) t.union = b return err } -// MergeListUsersParamsFilterValue00 performs a merge with any union data inside the ListUsersParamsFilterValue0, using the provided ListUsersParamsFilterValue00 -func (t *ListUsersParamsFilterValue0) MergeListUsersParamsFilterValue00(v ListUsersParamsFilterValue00) error { +// MergeCreateDynamicOAuthClientRegistration201JSONResponseBodyJwks0 performs a merge with any union data inside the CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks, using the provided CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks0 +func (t *CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks) MergeCreateDynamicOAuthClientRegistration201JSONResponseBodyJwks0(v CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks0) error { b, err := json.Marshal(v) if err != nil { return err @@ -10269,22 +10498,22 @@ func (t *ListUsersParamsFilterValue0) MergeListUsersParamsFilterValue00(v ListUs return err } -// AsListUsersParamsFilterValue01 returns the union data inside the ListUsersParamsFilterValue0 as a ListUsersParamsFilterValue01 -func (t ListUsersParamsFilterValue0) AsListUsersParamsFilterValue01() (ListUsersParamsFilterValue01, error) { - var body ListUsersParamsFilterValue01 +// AsCreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1 returns the union data inside the CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks as a CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1 +func (t CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks) AsCreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1() (CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1, error) { + var body CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1 err := json.Unmarshal(t.union, &body) return body, err } -// FromListUsersParamsFilterValue01 overwrites any union data inside the ListUsersParamsFilterValue0 as the provided ListUsersParamsFilterValue01 -func (t *ListUsersParamsFilterValue0) FromListUsersParamsFilterValue01(v ListUsersParamsFilterValue01) error { +// FromCreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1 overwrites any union data inside the CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks as the provided CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1 +func (t *CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks) FromCreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1(v CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1) error { b, err := json.Marshal(v) t.union = b return err } -// MergeListUsersParamsFilterValue01 performs a merge with any union data inside the ListUsersParamsFilterValue0, using the provided ListUsersParamsFilterValue01 -func (t *ListUsersParamsFilterValue0) MergeListUsersParamsFilterValue01(v ListUsersParamsFilterValue01) error { +// MergeCreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1 performs a merge with any union data inside the CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks, using the provided CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1 +func (t *CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks) MergeCreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1(v CreateDynamicOAuthClientRegistration201JSONResponseBodyJwks1) error { b, err := json.Marshal(v) if err != nil { return err @@ -10295,32 +10524,32 @@ func (t *ListUsersParamsFilterValue0) MergeListUsersParamsFilterValue01(v ListUs return err } -func (t ListUsersParamsFilterValue0) MarshalJSON() ([]byte, error) { +func (t CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks) MarshalJSON() ([]byte, error) { b, err := t.union.MarshalJSON() return b, err } -func (t *ListUsersParamsFilterValue0) UnmarshalJSON(b []byte) error { +func (t *CreateDynamicOAuthClientRegistration201JSONResponseBody_Jwks) UnmarshalJSON(b []byte) error { err := t.union.UnmarshalJSON(b) return err } -// AsListUsersParamsFilterValue000 returns the union data inside the ListUsersParamsFilterValue00 as a ListUsersParamsFilterValue000 -func (t ListUsersParamsFilterValue00) AsListUsersParamsFilterValue000() (ListUsersParamsFilterValue000, error) { - var body ListUsersParamsFilterValue000 +// AsGetDynamicOAuthClientRegistration200JSONResponseBodyJwks0 returns the union data inside the GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks as a GetDynamicOAuthClientRegistration200JSONResponseBodyJwks0 +func (t GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks) AsGetDynamicOAuthClientRegistration200JSONResponseBodyJwks0() (GetDynamicOAuthClientRegistration200JSONResponseBodyJwks0, error) { + var body GetDynamicOAuthClientRegistration200JSONResponseBodyJwks0 err := json.Unmarshal(t.union, &body) return body, err } -// FromListUsersParamsFilterValue000 overwrites any union data inside the ListUsersParamsFilterValue00 as the provided ListUsersParamsFilterValue000 -func (t *ListUsersParamsFilterValue00) FromListUsersParamsFilterValue000(v ListUsersParamsFilterValue000) error { +// FromGetDynamicOAuthClientRegistration200JSONResponseBodyJwks0 overwrites any union data inside the GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks as the provided GetDynamicOAuthClientRegistration200JSONResponseBodyJwks0 +func (t *GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks) FromGetDynamicOAuthClientRegistration200JSONResponseBodyJwks0(v GetDynamicOAuthClientRegistration200JSONResponseBodyJwks0) error { b, err := json.Marshal(v) t.union = b return err } -// MergeListUsersParamsFilterValue000 performs a merge with any union data inside the ListUsersParamsFilterValue00, using the provided ListUsersParamsFilterValue000 -func (t *ListUsersParamsFilterValue00) MergeListUsersParamsFilterValue000(v ListUsersParamsFilterValue000) error { +// MergeGetDynamicOAuthClientRegistration200JSONResponseBodyJwks0 performs a merge with any union data inside the GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks, using the provided GetDynamicOAuthClientRegistration200JSONResponseBodyJwks0 +func (t *GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks) MergeGetDynamicOAuthClientRegistration200JSONResponseBodyJwks0(v GetDynamicOAuthClientRegistration200JSONResponseBodyJwks0) error { b, err := json.Marshal(v) if err != nil { return err @@ -10331,22 +10560,22 @@ func (t *ListUsersParamsFilterValue00) MergeListUsersParamsFilterValue000(v List return err } -// AsListUsersParamsFilterValue001 returns the union data inside the ListUsersParamsFilterValue00 as a ListUsersParamsFilterValue001 -func (t ListUsersParamsFilterValue00) AsListUsersParamsFilterValue001() (ListUsersParamsFilterValue001, error) { - var body ListUsersParamsFilterValue001 +// AsGetDynamicOAuthClientRegistration200JSONResponseBodyJwks1 returns the union data inside the GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks as a GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1 +func (t GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks) AsGetDynamicOAuthClientRegistration200JSONResponseBodyJwks1() (GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1, error) { + var body GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1 err := json.Unmarshal(t.union, &body) return body, err } -// FromListUsersParamsFilterValue001 overwrites any union data inside the ListUsersParamsFilterValue00 as the provided ListUsersParamsFilterValue001 -func (t *ListUsersParamsFilterValue00) FromListUsersParamsFilterValue001(v ListUsersParamsFilterValue001) error { +// FromGetDynamicOAuthClientRegistration200JSONResponseBodyJwks1 overwrites any union data inside the GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks as the provided GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1 +func (t *GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks) FromGetDynamicOAuthClientRegistration200JSONResponseBodyJwks1(v GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1) error { b, err := json.Marshal(v) t.union = b return err } -// MergeListUsersParamsFilterValue001 performs a merge with any union data inside the ListUsersParamsFilterValue00, using the provided ListUsersParamsFilterValue001 -func (t *ListUsersParamsFilterValue00) MergeListUsersParamsFilterValue001(v ListUsersParamsFilterValue001) error { +// MergeGetDynamicOAuthClientRegistration200JSONResponseBodyJwks1 performs a merge with any union data inside the GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks, using the provided GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1 +func (t *GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks) MergeGetDynamicOAuthClientRegistration200JSONResponseBodyJwks1(v GetDynamicOAuthClientRegistration200JSONResponseBodyJwks1) error { b, err := json.Marshal(v) if err != nil { return err @@ -10357,32 +10586,32 @@ func (t *ListUsersParamsFilterValue00) MergeListUsersParamsFilterValue001(v List return err } -func (t ListUsersParamsFilterValue00) MarshalJSON() ([]byte, error) { +func (t GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks) MarshalJSON() ([]byte, error) { b, err := t.union.MarshalJSON() return b, err } -func (t *ListUsersParamsFilterValue00) UnmarshalJSON(b []byte) error { +func (t *GetDynamicOAuthClientRegistration200JSONResponseBody_Jwks) UnmarshalJSON(b []byte) error { err := t.union.UnmarshalJSON(b) return err } -// AsListUsersParamsFilterValue0000 returns the union data inside the ListUsersParamsFilterValue000 as a ListUsersParamsFilterValue0000 -func (t ListUsersParamsFilterValue000) AsListUsersParamsFilterValue0000() (ListUsersParamsFilterValue0000, error) { - var body ListUsersParamsFilterValue0000 +// AsUpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks0 returns the union data inside the UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks as a UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks0 +func (t UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks) AsUpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks0() (UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks0, error) { + var body UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks0 err := json.Unmarshal(t.union, &body) return body, err } -// FromListUsersParamsFilterValue0000 overwrites any union data inside the ListUsersParamsFilterValue000 as the provided ListUsersParamsFilterValue0000 -func (t *ListUsersParamsFilterValue000) FromListUsersParamsFilterValue0000(v ListUsersParamsFilterValue0000) error { +// FromUpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks0 overwrites any union data inside the UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks as the provided UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks0 +func (t *UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks) FromUpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks0(v UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks0) error { b, err := json.Marshal(v) t.union = b return err } -// MergeListUsersParamsFilterValue0000 performs a merge with any union data inside the ListUsersParamsFilterValue000, using the provided ListUsersParamsFilterValue0000 -func (t *ListUsersParamsFilterValue000) MergeListUsersParamsFilterValue0000(v ListUsersParamsFilterValue0000) error { +// MergeUpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks0 performs a merge with any union data inside the UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks, using the provided UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks0 +func (t *UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks) MergeUpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks0(v UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks0) error { b, err := json.Marshal(v) if err != nil { return err @@ -10393,22 +10622,22 @@ func (t *ListUsersParamsFilterValue000) MergeListUsersParamsFilterValue0000(v Li return err } -// AsListUsersParamsFilterValue0001 returns the union data inside the ListUsersParamsFilterValue000 as a ListUsersParamsFilterValue0001 -func (t ListUsersParamsFilterValue000) AsListUsersParamsFilterValue0001() (ListUsersParamsFilterValue0001, error) { - var body ListUsersParamsFilterValue0001 +// AsUpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1 returns the union data inside the UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks as a UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1 +func (t UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks) AsUpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1() (UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1, error) { + var body UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1 err := json.Unmarshal(t.union, &body) return body, err } -// FromListUsersParamsFilterValue0001 overwrites any union data inside the ListUsersParamsFilterValue000 as the provided ListUsersParamsFilterValue0001 -func (t *ListUsersParamsFilterValue000) FromListUsersParamsFilterValue0001(v ListUsersParamsFilterValue0001) error { +// FromUpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1 overwrites any union data inside the UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks as the provided UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1 +func (t *UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks) FromUpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1(v UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1) error { b, err := json.Marshal(v) t.union = b return err } -// MergeListUsersParamsFilterValue0001 performs a merge with any union data inside the ListUsersParamsFilterValue000, using the provided ListUsersParamsFilterValue0001 -func (t *ListUsersParamsFilterValue000) MergeListUsersParamsFilterValue0001(v ListUsersParamsFilterValue0001) error { +// MergeUpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1 performs a merge with any union data inside the UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks, using the provided UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1 +func (t *UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks) MergeUpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1(v UpdateDynamicOAuthClientRegistration200JSONResponseBodyJwks1) error { b, err := json.Marshal(v) if err != nil { return err @@ -10419,756 +10648,12 @@ func (t *ListUsersParamsFilterValue000) MergeListUsersParamsFilterValue0001(v Li return err } -func (t ListUsersParamsFilterValue000) MarshalJSON() ([]byte, error) { +func (t UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks) MarshalJSON() ([]byte, error) { b, err := t.union.MarshalJSON() return b, err } -func (t *ListUsersParamsFilterValue000) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsSetUserRoleJSONBodyRole0 returns the union data inside the SetUserRoleJSONBody_Role as a SetUserRoleJSONBodyRole0 -func (t SetUserRoleJSONBody_Role) AsSetUserRoleJSONBodyRole0() (SetUserRoleJSONBodyRole0, error) { - var body SetUserRoleJSONBodyRole0 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromSetUserRoleJSONBodyRole0 overwrites any union data inside the SetUserRoleJSONBody_Role as the provided SetUserRoleJSONBodyRole0 -func (t *SetUserRoleJSONBody_Role) FromSetUserRoleJSONBodyRole0(v SetUserRoleJSONBodyRole0) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeSetUserRoleJSONBodyRole0 performs a merge with any union data inside the SetUserRoleJSONBody_Role, using the provided SetUserRoleJSONBodyRole0 -func (t *SetUserRoleJSONBody_Role) MergeSetUserRoleJSONBodyRole0(v SetUserRoleJSONBodyRole0) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsSetUserRoleJSONBodyRole1 returns the union data inside the SetUserRoleJSONBody_Role as a SetUserRoleJSONBodyRole1 -func (t SetUserRoleJSONBody_Role) AsSetUserRoleJSONBodyRole1() (SetUserRoleJSONBodyRole1, error) { - var body SetUserRoleJSONBodyRole1 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromSetUserRoleJSONBodyRole1 overwrites any union data inside the SetUserRoleJSONBody_Role as the provided SetUserRoleJSONBodyRole1 -func (t *SetUserRoleJSONBody_Role) FromSetUserRoleJSONBodyRole1(v SetUserRoleJSONBodyRole1) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeSetUserRoleJSONBodyRole1 performs a merge with any union data inside the SetUserRoleJSONBody_Role, using the provided SetUserRoleJSONBodyRole1 -func (t *SetUserRoleJSONBody_Role) MergeSetUserRoleJSONBodyRole1(v SetUserRoleJSONBodyRole1) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t SetUserRoleJSONBody_Role) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *SetUserRoleJSONBody_Role) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsPostApiAuthGetAccessTokenJSONBody0 returns the union data inside the PostApiAuthGetAccessTokenJSONBody as a PostApiAuthGetAccessTokenJSONBody0 -func (t PostApiAuthGetAccessTokenJSONBody) AsPostApiAuthGetAccessTokenJSONBody0() (PostApiAuthGetAccessTokenJSONBody0, error) { - var body PostApiAuthGetAccessTokenJSONBody0 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPostApiAuthGetAccessTokenJSONBody0 overwrites any union data inside the PostApiAuthGetAccessTokenJSONBody as the provided PostApiAuthGetAccessTokenJSONBody0 -func (t *PostApiAuthGetAccessTokenJSONBody) FromPostApiAuthGetAccessTokenJSONBody0(v PostApiAuthGetAccessTokenJSONBody0) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePostApiAuthGetAccessTokenJSONBody0 performs a merge with any union data inside the PostApiAuthGetAccessTokenJSONBody, using the provided PostApiAuthGetAccessTokenJSONBody0 -func (t *PostApiAuthGetAccessTokenJSONBody) MergePostApiAuthGetAccessTokenJSONBody0(v PostApiAuthGetAccessTokenJSONBody0) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsPostApiAuthGetAccessTokenJSONBody1 returns the union data inside the PostApiAuthGetAccessTokenJSONBody as a PostApiAuthGetAccessTokenJSONBody1 -func (t PostApiAuthGetAccessTokenJSONBody) AsPostApiAuthGetAccessTokenJSONBody1() (PostApiAuthGetAccessTokenJSONBody1, error) { - var body PostApiAuthGetAccessTokenJSONBody1 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPostApiAuthGetAccessTokenJSONBody1 overwrites any union data inside the PostApiAuthGetAccessTokenJSONBody as the provided PostApiAuthGetAccessTokenJSONBody1 -func (t *PostApiAuthGetAccessTokenJSONBody) FromPostApiAuthGetAccessTokenJSONBody1(v PostApiAuthGetAccessTokenJSONBody1) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePostApiAuthGetAccessTokenJSONBody1 performs a merge with any union data inside the PostApiAuthGetAccessTokenJSONBody, using the provided PostApiAuthGetAccessTokenJSONBody1 -func (t *PostApiAuthGetAccessTokenJSONBody) MergePostApiAuthGetAccessTokenJSONBody1(v PostApiAuthGetAccessTokenJSONBody1) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t PostApiAuthGetAccessTokenJSONBody) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *PostApiAuthGetAccessTokenJSONBody) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsLinkSocialAccountJSONBodyProvider0 returns the union data inside the LinkSocialAccountJSONBody_Provider as a LinkSocialAccountJSONBodyProvider0 -func (t LinkSocialAccountJSONBody_Provider) AsLinkSocialAccountJSONBodyProvider0() (LinkSocialAccountJSONBodyProvider0, error) { - var body LinkSocialAccountJSONBodyProvider0 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromLinkSocialAccountJSONBodyProvider0 overwrites any union data inside the LinkSocialAccountJSONBody_Provider as the provided LinkSocialAccountJSONBodyProvider0 -func (t *LinkSocialAccountJSONBody_Provider) FromLinkSocialAccountJSONBodyProvider0(v LinkSocialAccountJSONBodyProvider0) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeLinkSocialAccountJSONBodyProvider0 performs a merge with any union data inside the LinkSocialAccountJSONBody_Provider, using the provided LinkSocialAccountJSONBodyProvider0 -func (t *LinkSocialAccountJSONBody_Provider) MergeLinkSocialAccountJSONBodyProvider0(v LinkSocialAccountJSONBodyProvider0) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsLinkSocialAccountJSONBodyProvider1 returns the union data inside the LinkSocialAccountJSONBody_Provider as a LinkSocialAccountJSONBodyProvider1 -func (t LinkSocialAccountJSONBody_Provider) AsLinkSocialAccountJSONBodyProvider1() (LinkSocialAccountJSONBodyProvider1, error) { - var body LinkSocialAccountJSONBodyProvider1 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromLinkSocialAccountJSONBodyProvider1 overwrites any union data inside the LinkSocialAccountJSONBody_Provider as the provided LinkSocialAccountJSONBodyProvider1 -func (t *LinkSocialAccountJSONBody_Provider) FromLinkSocialAccountJSONBodyProvider1(v LinkSocialAccountJSONBodyProvider1) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeLinkSocialAccountJSONBodyProvider1 performs a merge with any union data inside the LinkSocialAccountJSONBody_Provider, using the provided LinkSocialAccountJSONBodyProvider1 -func (t *LinkSocialAccountJSONBody_Provider) MergeLinkSocialAccountJSONBodyProvider1(v LinkSocialAccountJSONBodyProvider1) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t LinkSocialAccountJSONBody_Provider) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *LinkSocialAccountJSONBody_Provider) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsPostApiAuthOauth2ConsentJSONBodyClaims0 returns the union data inside the PostApiAuthOauth2ConsentJSONBody_Claims as a PostApiAuthOauth2ConsentJSONBodyClaims0 -func (t PostApiAuthOauth2ConsentJSONBody_Claims) AsPostApiAuthOauth2ConsentJSONBodyClaims0() (PostApiAuthOauth2ConsentJSONBodyClaims0, error) { - var body PostApiAuthOauth2ConsentJSONBodyClaims0 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPostApiAuthOauth2ConsentJSONBodyClaims0 overwrites any union data inside the PostApiAuthOauth2ConsentJSONBody_Claims as the provided PostApiAuthOauth2ConsentJSONBodyClaims0 -func (t *PostApiAuthOauth2ConsentJSONBody_Claims) FromPostApiAuthOauth2ConsentJSONBodyClaims0(v PostApiAuthOauth2ConsentJSONBodyClaims0) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePostApiAuthOauth2ConsentJSONBodyClaims0 performs a merge with any union data inside the PostApiAuthOauth2ConsentJSONBody_Claims, using the provided PostApiAuthOauth2ConsentJSONBodyClaims0 -func (t *PostApiAuthOauth2ConsentJSONBody_Claims) MergePostApiAuthOauth2ConsentJSONBodyClaims0(v PostApiAuthOauth2ConsentJSONBodyClaims0) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsPostApiAuthOauth2ConsentJSONBodyClaims1 returns the union data inside the PostApiAuthOauth2ConsentJSONBody_Claims as a PostApiAuthOauth2ConsentJSONBodyClaims1 -func (t PostApiAuthOauth2ConsentJSONBody_Claims) AsPostApiAuthOauth2ConsentJSONBodyClaims1() (PostApiAuthOauth2ConsentJSONBodyClaims1, error) { - var body PostApiAuthOauth2ConsentJSONBodyClaims1 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPostApiAuthOauth2ConsentJSONBodyClaims1 overwrites any union data inside the PostApiAuthOauth2ConsentJSONBody_Claims as the provided PostApiAuthOauth2ConsentJSONBodyClaims1 -func (t *PostApiAuthOauth2ConsentJSONBody_Claims) FromPostApiAuthOauth2ConsentJSONBodyClaims1(v PostApiAuthOauth2ConsentJSONBodyClaims1) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePostApiAuthOauth2ConsentJSONBodyClaims1 performs a merge with any union data inside the PostApiAuthOauth2ConsentJSONBody_Claims, using the provided PostApiAuthOauth2ConsentJSONBodyClaims1 -func (t *PostApiAuthOauth2ConsentJSONBody_Claims) MergePostApiAuthOauth2ConsentJSONBodyClaims1(v PostApiAuthOauth2ConsentJSONBodyClaims1) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t PostApiAuthOauth2ConsentJSONBody_Claims) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *PostApiAuthOauth2ConsentJSONBody_Claims) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsPostApiAuthOauth2CreateClientJSONBodyJwks0 returns the union data inside the PostApiAuthOauth2CreateClientJSONBody_Jwks as a PostApiAuthOauth2CreateClientJSONBodyJwks0 -func (t PostApiAuthOauth2CreateClientJSONBody_Jwks) AsPostApiAuthOauth2CreateClientJSONBodyJwks0() (PostApiAuthOauth2CreateClientJSONBodyJwks0, error) { - var body PostApiAuthOauth2CreateClientJSONBodyJwks0 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPostApiAuthOauth2CreateClientJSONBodyJwks0 overwrites any union data inside the PostApiAuthOauth2CreateClientJSONBody_Jwks as the provided PostApiAuthOauth2CreateClientJSONBodyJwks0 -func (t *PostApiAuthOauth2CreateClientJSONBody_Jwks) FromPostApiAuthOauth2CreateClientJSONBodyJwks0(v PostApiAuthOauth2CreateClientJSONBodyJwks0) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePostApiAuthOauth2CreateClientJSONBodyJwks0 performs a merge with any union data inside the PostApiAuthOauth2CreateClientJSONBody_Jwks, using the provided PostApiAuthOauth2CreateClientJSONBodyJwks0 -func (t *PostApiAuthOauth2CreateClientJSONBody_Jwks) MergePostApiAuthOauth2CreateClientJSONBodyJwks0(v PostApiAuthOauth2CreateClientJSONBodyJwks0) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsPostApiAuthOauth2CreateClientJSONBodyJwks1 returns the union data inside the PostApiAuthOauth2CreateClientJSONBody_Jwks as a PostApiAuthOauth2CreateClientJSONBodyJwks1 -func (t PostApiAuthOauth2CreateClientJSONBody_Jwks) AsPostApiAuthOauth2CreateClientJSONBodyJwks1() (PostApiAuthOauth2CreateClientJSONBodyJwks1, error) { - var body PostApiAuthOauth2CreateClientJSONBodyJwks1 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPostApiAuthOauth2CreateClientJSONBodyJwks1 overwrites any union data inside the PostApiAuthOauth2CreateClientJSONBody_Jwks as the provided PostApiAuthOauth2CreateClientJSONBodyJwks1 -func (t *PostApiAuthOauth2CreateClientJSONBody_Jwks) FromPostApiAuthOauth2CreateClientJSONBodyJwks1(v PostApiAuthOauth2CreateClientJSONBodyJwks1) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePostApiAuthOauth2CreateClientJSONBodyJwks1 performs a merge with any union data inside the PostApiAuthOauth2CreateClientJSONBody_Jwks, using the provided PostApiAuthOauth2CreateClientJSONBodyJwks1 -func (t *PostApiAuthOauth2CreateClientJSONBody_Jwks) MergePostApiAuthOauth2CreateClientJSONBodyJwks1(v PostApiAuthOauth2CreateClientJSONBodyJwks1) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t PostApiAuthOauth2CreateClientJSONBody_Jwks) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *PostApiAuthOauth2CreateClientJSONBody_Jwks) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsPostApiAuthOauth2RegisterJSONBodyJwks0 returns the union data inside the PostApiAuthOauth2RegisterJSONBody_Jwks as a PostApiAuthOauth2RegisterJSONBodyJwks0 -func (t PostApiAuthOauth2RegisterJSONBody_Jwks) AsPostApiAuthOauth2RegisterJSONBodyJwks0() (PostApiAuthOauth2RegisterJSONBodyJwks0, error) { - var body PostApiAuthOauth2RegisterJSONBodyJwks0 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPostApiAuthOauth2RegisterJSONBodyJwks0 overwrites any union data inside the PostApiAuthOauth2RegisterJSONBody_Jwks as the provided PostApiAuthOauth2RegisterJSONBodyJwks0 -func (t *PostApiAuthOauth2RegisterJSONBody_Jwks) FromPostApiAuthOauth2RegisterJSONBodyJwks0(v PostApiAuthOauth2RegisterJSONBodyJwks0) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePostApiAuthOauth2RegisterJSONBodyJwks0 performs a merge with any union data inside the PostApiAuthOauth2RegisterJSONBody_Jwks, using the provided PostApiAuthOauth2RegisterJSONBodyJwks0 -func (t *PostApiAuthOauth2RegisterJSONBody_Jwks) MergePostApiAuthOauth2RegisterJSONBodyJwks0(v PostApiAuthOauth2RegisterJSONBodyJwks0) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsPostApiAuthOauth2RegisterJSONBodyJwks1 returns the union data inside the PostApiAuthOauth2RegisterJSONBody_Jwks as a PostApiAuthOauth2RegisterJSONBodyJwks1 -func (t PostApiAuthOauth2RegisterJSONBody_Jwks) AsPostApiAuthOauth2RegisterJSONBodyJwks1() (PostApiAuthOauth2RegisterJSONBodyJwks1, error) { - var body PostApiAuthOauth2RegisterJSONBodyJwks1 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPostApiAuthOauth2RegisterJSONBodyJwks1 overwrites any union data inside the PostApiAuthOauth2RegisterJSONBody_Jwks as the provided PostApiAuthOauth2RegisterJSONBodyJwks1 -func (t *PostApiAuthOauth2RegisterJSONBody_Jwks) FromPostApiAuthOauth2RegisterJSONBodyJwks1(v PostApiAuthOauth2RegisterJSONBodyJwks1) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePostApiAuthOauth2RegisterJSONBodyJwks1 performs a merge with any union data inside the PostApiAuthOauth2RegisterJSONBody_Jwks, using the provided PostApiAuthOauth2RegisterJSONBodyJwks1 -func (t *PostApiAuthOauth2RegisterJSONBody_Jwks) MergePostApiAuthOauth2RegisterJSONBodyJwks1(v PostApiAuthOauth2RegisterJSONBodyJwks1) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t PostApiAuthOauth2RegisterJSONBody_Jwks) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *PostApiAuthOauth2RegisterJSONBody_Jwks) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsPostApiAuthOauth2TokenJSONBodyResource0 returns the union data inside the PostApiAuthOauth2TokenJSONBody_Resource as a PostApiAuthOauth2TokenJSONBodyResource0 -func (t PostApiAuthOauth2TokenJSONBody_Resource) AsPostApiAuthOauth2TokenJSONBodyResource0() (PostApiAuthOauth2TokenJSONBodyResource0, error) { - var body PostApiAuthOauth2TokenJSONBodyResource0 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPostApiAuthOauth2TokenJSONBodyResource0 overwrites any union data inside the PostApiAuthOauth2TokenJSONBody_Resource as the provided PostApiAuthOauth2TokenJSONBodyResource0 -func (t *PostApiAuthOauth2TokenJSONBody_Resource) FromPostApiAuthOauth2TokenJSONBodyResource0(v PostApiAuthOauth2TokenJSONBodyResource0) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePostApiAuthOauth2TokenJSONBodyResource0 performs a merge with any union data inside the PostApiAuthOauth2TokenJSONBody_Resource, using the provided PostApiAuthOauth2TokenJSONBodyResource0 -func (t *PostApiAuthOauth2TokenJSONBody_Resource) MergePostApiAuthOauth2TokenJSONBodyResource0(v PostApiAuthOauth2TokenJSONBodyResource0) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsPostApiAuthOauth2TokenJSONBodyResource1 returns the union data inside the PostApiAuthOauth2TokenJSONBody_Resource as a PostApiAuthOauth2TokenJSONBodyResource1 -func (t PostApiAuthOauth2TokenJSONBody_Resource) AsPostApiAuthOauth2TokenJSONBodyResource1() (PostApiAuthOauth2TokenJSONBodyResource1, error) { - var body PostApiAuthOauth2TokenJSONBodyResource1 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPostApiAuthOauth2TokenJSONBodyResource1 overwrites any union data inside the PostApiAuthOauth2TokenJSONBody_Resource as the provided PostApiAuthOauth2TokenJSONBodyResource1 -func (t *PostApiAuthOauth2TokenJSONBody_Resource) FromPostApiAuthOauth2TokenJSONBodyResource1(v PostApiAuthOauth2TokenJSONBodyResource1) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePostApiAuthOauth2TokenJSONBodyResource1 performs a merge with any union data inside the PostApiAuthOauth2TokenJSONBody_Resource, using the provided PostApiAuthOauth2TokenJSONBodyResource1 -func (t *PostApiAuthOauth2TokenJSONBody_Resource) MergePostApiAuthOauth2TokenJSONBodyResource1(v PostApiAuthOauth2TokenJSONBodyResource1) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t PostApiAuthOauth2TokenJSONBody_Resource) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *PostApiAuthOauth2TokenJSONBody_Resource) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsCreateOrganizationInvitationJSONBodyRole0 returns the union data inside the CreateOrganizationInvitationJSONBody_Role as a CreateOrganizationInvitationJSONBodyRole0 -func (t CreateOrganizationInvitationJSONBody_Role) AsCreateOrganizationInvitationJSONBodyRole0() (CreateOrganizationInvitationJSONBodyRole0, error) { - var body CreateOrganizationInvitationJSONBodyRole0 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromCreateOrganizationInvitationJSONBodyRole0 overwrites any union data inside the CreateOrganizationInvitationJSONBody_Role as the provided CreateOrganizationInvitationJSONBodyRole0 -func (t *CreateOrganizationInvitationJSONBody_Role) FromCreateOrganizationInvitationJSONBodyRole0(v CreateOrganizationInvitationJSONBodyRole0) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeCreateOrganizationInvitationJSONBodyRole0 performs a merge with any union data inside the CreateOrganizationInvitationJSONBody_Role, using the provided CreateOrganizationInvitationJSONBodyRole0 -func (t *CreateOrganizationInvitationJSONBody_Role) MergeCreateOrganizationInvitationJSONBodyRole0(v CreateOrganizationInvitationJSONBodyRole0) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsCreateOrganizationInvitationJSONBodyRole1 returns the union data inside the CreateOrganizationInvitationJSONBody_Role as a CreateOrganizationInvitationJSONBodyRole1 -func (t CreateOrganizationInvitationJSONBody_Role) AsCreateOrganizationInvitationJSONBodyRole1() (CreateOrganizationInvitationJSONBodyRole1, error) { - var body CreateOrganizationInvitationJSONBodyRole1 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromCreateOrganizationInvitationJSONBodyRole1 overwrites any union data inside the CreateOrganizationInvitationJSONBody_Role as the provided CreateOrganizationInvitationJSONBodyRole1 -func (t *CreateOrganizationInvitationJSONBody_Role) FromCreateOrganizationInvitationJSONBodyRole1(v CreateOrganizationInvitationJSONBodyRole1) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeCreateOrganizationInvitationJSONBodyRole1 performs a merge with any union data inside the CreateOrganizationInvitationJSONBody_Role, using the provided CreateOrganizationInvitationJSONBodyRole1 -func (t *CreateOrganizationInvitationJSONBody_Role) MergeCreateOrganizationInvitationJSONBodyRole1(v CreateOrganizationInvitationJSONBodyRole1) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t CreateOrganizationInvitationJSONBody_Role) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *CreateOrganizationInvitationJSONBody_Role) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsCreateOrganizationInvitationJSONBodyTeamId0 returns the union data inside the CreateOrganizationInvitationJSONBody_TeamId as a CreateOrganizationInvitationJSONBodyTeamId0 -func (t CreateOrganizationInvitationJSONBody_TeamId) AsCreateOrganizationInvitationJSONBodyTeamId0() (CreateOrganizationInvitationJSONBodyTeamId0, error) { - var body CreateOrganizationInvitationJSONBodyTeamId0 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromCreateOrganizationInvitationJSONBodyTeamId0 overwrites any union data inside the CreateOrganizationInvitationJSONBody_TeamId as the provided CreateOrganizationInvitationJSONBodyTeamId0 -func (t *CreateOrganizationInvitationJSONBody_TeamId) FromCreateOrganizationInvitationJSONBodyTeamId0(v CreateOrganizationInvitationJSONBodyTeamId0) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeCreateOrganizationInvitationJSONBodyTeamId0 performs a merge with any union data inside the CreateOrganizationInvitationJSONBody_TeamId, using the provided CreateOrganizationInvitationJSONBodyTeamId0 -func (t *CreateOrganizationInvitationJSONBody_TeamId) MergeCreateOrganizationInvitationJSONBodyTeamId0(v CreateOrganizationInvitationJSONBodyTeamId0) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsCreateOrganizationInvitationJSONBodyTeamId1 returns the union data inside the CreateOrganizationInvitationJSONBody_TeamId as a CreateOrganizationInvitationJSONBodyTeamId1 -func (t CreateOrganizationInvitationJSONBody_TeamId) AsCreateOrganizationInvitationJSONBodyTeamId1() (CreateOrganizationInvitationJSONBodyTeamId1, error) { - var body CreateOrganizationInvitationJSONBodyTeamId1 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromCreateOrganizationInvitationJSONBodyTeamId1 overwrites any union data inside the CreateOrganizationInvitationJSONBody_TeamId as the provided CreateOrganizationInvitationJSONBodyTeamId1 -func (t *CreateOrganizationInvitationJSONBody_TeamId) FromCreateOrganizationInvitationJSONBodyTeamId1(v CreateOrganizationInvitationJSONBodyTeamId1) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeCreateOrganizationInvitationJSONBodyTeamId1 performs a merge with any union data inside the CreateOrganizationInvitationJSONBody_TeamId, using the provided CreateOrganizationInvitationJSONBodyTeamId1 -func (t *CreateOrganizationInvitationJSONBody_TeamId) MergeCreateOrganizationInvitationJSONBodyTeamId1(v CreateOrganizationInvitationJSONBodyTeamId1) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t CreateOrganizationInvitationJSONBody_TeamId) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *CreateOrganizationInvitationJSONBody_TeamId) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsUpdateOrganizationMemberRoleJSONBodyRole0 returns the union data inside the UpdateOrganizationMemberRoleJSONBody_Role as a UpdateOrganizationMemberRoleJSONBodyRole0 -func (t UpdateOrganizationMemberRoleJSONBody_Role) AsUpdateOrganizationMemberRoleJSONBodyRole0() (UpdateOrganizationMemberRoleJSONBodyRole0, error) { - var body UpdateOrganizationMemberRoleJSONBodyRole0 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromUpdateOrganizationMemberRoleJSONBodyRole0 overwrites any union data inside the UpdateOrganizationMemberRoleJSONBody_Role as the provided UpdateOrganizationMemberRoleJSONBodyRole0 -func (t *UpdateOrganizationMemberRoleJSONBody_Role) FromUpdateOrganizationMemberRoleJSONBodyRole0(v UpdateOrganizationMemberRoleJSONBodyRole0) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeUpdateOrganizationMemberRoleJSONBodyRole0 performs a merge with any union data inside the UpdateOrganizationMemberRoleJSONBody_Role, using the provided UpdateOrganizationMemberRoleJSONBodyRole0 -func (t *UpdateOrganizationMemberRoleJSONBody_Role) MergeUpdateOrganizationMemberRoleJSONBodyRole0(v UpdateOrganizationMemberRoleJSONBodyRole0) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsUpdateOrganizationMemberRoleJSONBodyRole1 returns the union data inside the UpdateOrganizationMemberRoleJSONBody_Role as a UpdateOrganizationMemberRoleJSONBodyRole1 -func (t UpdateOrganizationMemberRoleJSONBody_Role) AsUpdateOrganizationMemberRoleJSONBodyRole1() (UpdateOrganizationMemberRoleJSONBodyRole1, error) { - var body UpdateOrganizationMemberRoleJSONBodyRole1 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromUpdateOrganizationMemberRoleJSONBodyRole1 overwrites any union data inside the UpdateOrganizationMemberRoleJSONBody_Role as the provided UpdateOrganizationMemberRoleJSONBodyRole1 -func (t *UpdateOrganizationMemberRoleJSONBody_Role) FromUpdateOrganizationMemberRoleJSONBodyRole1(v UpdateOrganizationMemberRoleJSONBodyRole1) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeUpdateOrganizationMemberRoleJSONBodyRole1 performs a merge with any union data inside the UpdateOrganizationMemberRoleJSONBody_Role, using the provided UpdateOrganizationMemberRoleJSONBodyRole1 -func (t *UpdateOrganizationMemberRoleJSONBody_Role) MergeUpdateOrganizationMemberRoleJSONBodyRole1(v UpdateOrganizationMemberRoleJSONBodyRole1) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t UpdateOrganizationMemberRoleJSONBody_Role) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *UpdateOrganizationMemberRoleJSONBody_Role) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsPostApiAuthRefreshTokenJSONBody0 returns the union data inside the PostApiAuthRefreshTokenJSONBody as a PostApiAuthRefreshTokenJSONBody0 -func (t PostApiAuthRefreshTokenJSONBody) AsPostApiAuthRefreshTokenJSONBody0() (PostApiAuthRefreshTokenJSONBody0, error) { - var body PostApiAuthRefreshTokenJSONBody0 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPostApiAuthRefreshTokenJSONBody0 overwrites any union data inside the PostApiAuthRefreshTokenJSONBody as the provided PostApiAuthRefreshTokenJSONBody0 -func (t *PostApiAuthRefreshTokenJSONBody) FromPostApiAuthRefreshTokenJSONBody0(v PostApiAuthRefreshTokenJSONBody0) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePostApiAuthRefreshTokenJSONBody0 performs a merge with any union data inside the PostApiAuthRefreshTokenJSONBody, using the provided PostApiAuthRefreshTokenJSONBody0 -func (t *PostApiAuthRefreshTokenJSONBody) MergePostApiAuthRefreshTokenJSONBody0(v PostApiAuthRefreshTokenJSONBody0) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsPostApiAuthRefreshTokenJSONBody1 returns the union data inside the PostApiAuthRefreshTokenJSONBody as a PostApiAuthRefreshTokenJSONBody1 -func (t PostApiAuthRefreshTokenJSONBody) AsPostApiAuthRefreshTokenJSONBody1() (PostApiAuthRefreshTokenJSONBody1, error) { - var body PostApiAuthRefreshTokenJSONBody1 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPostApiAuthRefreshTokenJSONBody1 overwrites any union data inside the PostApiAuthRefreshTokenJSONBody as the provided PostApiAuthRefreshTokenJSONBody1 -func (t *PostApiAuthRefreshTokenJSONBody) FromPostApiAuthRefreshTokenJSONBody1(v PostApiAuthRefreshTokenJSONBody1) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePostApiAuthRefreshTokenJSONBody1 performs a merge with any union data inside the PostApiAuthRefreshTokenJSONBody, using the provided PostApiAuthRefreshTokenJSONBody1 -func (t *PostApiAuthRefreshTokenJSONBody) MergePostApiAuthRefreshTokenJSONBody1(v PostApiAuthRefreshTokenJSONBody1) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t PostApiAuthRefreshTokenJSONBody) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *PostApiAuthRefreshTokenJSONBody) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsSocialSignInJSONBodyProvider0 returns the union data inside the SocialSignInJSONBody_Provider as a SocialSignInJSONBodyProvider0 -func (t SocialSignInJSONBody_Provider) AsSocialSignInJSONBodyProvider0() (SocialSignInJSONBodyProvider0, error) { - var body SocialSignInJSONBodyProvider0 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromSocialSignInJSONBodyProvider0 overwrites any union data inside the SocialSignInJSONBody_Provider as the provided SocialSignInJSONBodyProvider0 -func (t *SocialSignInJSONBody_Provider) FromSocialSignInJSONBodyProvider0(v SocialSignInJSONBodyProvider0) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeSocialSignInJSONBodyProvider0 performs a merge with any union data inside the SocialSignInJSONBody_Provider, using the provided SocialSignInJSONBodyProvider0 -func (t *SocialSignInJSONBody_Provider) MergeSocialSignInJSONBodyProvider0(v SocialSignInJSONBodyProvider0) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsSocialSignInJSONBodyProvider1 returns the union data inside the SocialSignInJSONBody_Provider as a SocialSignInJSONBodyProvider1 -func (t SocialSignInJSONBody_Provider) AsSocialSignInJSONBodyProvider1() (SocialSignInJSONBodyProvider1, error) { - var body SocialSignInJSONBodyProvider1 - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromSocialSignInJSONBodyProvider1 overwrites any union data inside the SocialSignInJSONBody_Provider as the provided SocialSignInJSONBodyProvider1 -func (t *SocialSignInJSONBody_Provider) FromSocialSignInJSONBodyProvider1(v SocialSignInJSONBodyProvider1) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeSocialSignInJSONBodyProvider1 performs a merge with any union data inside the SocialSignInJSONBody_Provider, using the provided SocialSignInJSONBodyProvider1 -func (t *SocialSignInJSONBody_Provider) MergeSocialSignInJSONBodyProvider1(v SocialSignInJSONBodyProvider1) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t SocialSignInJSONBody_Provider) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *SocialSignInJSONBody_Provider) UnmarshalJSON(b []byte) error { +func (t *UpdateDynamicOAuthClientRegistration200JSONResponseBody_Jwks) UnmarshalJSON(b []byte) error { err := t.union.UnmarshalJSON(b) return err } @@ -11308,259 +10793,23 @@ func WithRequestEditorFn(fn RequestEditorFn) ClientOption { // The interface specification for the client above. type ClientInterface interface { - // GetApiAuthAccountInfo request - GetApiAuthAccountInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateDeviceAuthorizationWithBody request with any body + CreateDeviceAuthorizationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // BanUserWithBody request with any body - BanUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateDeviceAuthorization(ctx context.Context, body CreateDeviceAuthorizationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - BanUser(ctx context.Context, body BanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateDeviceAccessTokenWithBody request with any body + CreateDeviceAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateUserWithBody request with any body - CreateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateUser(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetUser request - GetUser(ctx context.Context, params *GetUserParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthAdminHasPermissionWithBody request with any body - PostApiAuthAdminHasPermissionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthAdminHasPermission(ctx context.Context, body PostApiAuthAdminHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ImpersonateUserWithBody request with any body - ImpersonateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - ImpersonateUser(ctx context.Context, body ImpersonateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // AdminListUserSessionsWithBody request with any body - AdminListUserSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - AdminListUserSessions(ctx context.Context, body AdminListUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListUsers request - ListUsers(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // RemoveUserWithBody request with any body - RemoveUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - RemoveUser(ctx context.Context, body RemoveUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // RevokeUserSessionWithBody request with any body - RevokeUserSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - RevokeUserSession(ctx context.Context, body RevokeUserSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // RevokeUserSessionsWithBody request with any body - RevokeUserSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - RevokeUserSessions(ctx context.Context, body RevokeUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // SetUserRoleWithBody request with any body - SetUserRoleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - SetUserRole(ctx context.Context, body SetUserRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // SetUserPasswordWithBody request with any body - SetUserPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - SetUserPassword(ctx context.Context, body SetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthAdminStopImpersonating request - PostApiAuthAdminStopImpersonating(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UnbanUserWithBody request with any body - UnbanUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UnbanUser(ctx context.Context, body UnbanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // AdminUpdateUserWithBody request with any body - AdminUpdateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - AdminUpdateUser(ctx context.Context, body AdminUpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthApiKeyCreateWithBody request with any body - PostApiAuthApiKeyCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthApiKeyCreate(ctx context.Context, body PostApiAuthApiKeyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthApiKeyDeleteWithBody request with any body - PostApiAuthApiKeyDeleteWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthApiKeyDelete(ctx context.Context, body PostApiAuthApiKeyDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthApiKeyGet request - GetApiAuthApiKeyGet(ctx context.Context, params *GetApiAuthApiKeyGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthApiKeyList request - GetApiAuthApiKeyList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthApiKeyUpdateWithBody request with any body - PostApiAuthApiKeyUpdateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthApiKeyUpdate(ctx context.Context, body PostApiAuthApiKeyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthCallbackId request - GetApiAuthCallbackId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthCallbackIdWithBody request with any body - PostApiAuthCallbackIdWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthCallbackId(ctx context.Context, id string, body PostApiAuthCallbackIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ChangeEmailWithBody request with any body - ChangeEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - ChangeEmail(ctx context.Context, body ChangeEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ChangePasswordWithBody request with any body - ChangePasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - ChangePassword(ctx context.Context, body ChangePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteUserWithBody request with any body - DeleteUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteUser(ctx context.Context, body DeleteUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthDeleteUserCallback request - GetApiAuthDeleteUserCallback(ctx context.Context, params *GetApiAuthDeleteUserCallbackParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthDevice request - GetApiAuthDevice(ctx context.Context, params *GetApiAuthDeviceParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthDeviceApproveWithBody request with any body - PostApiAuthDeviceApproveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthDeviceApprove(ctx context.Context, body PostApiAuthDeviceApproveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthDeviceCodeWithBody request with any body - PostApiAuthDeviceCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthDeviceCode(ctx context.Context, body PostApiAuthDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthDeviceDenyWithBody request with any body - PostApiAuthDeviceDenyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthDeviceDeny(ctx context.Context, body PostApiAuthDeviceDenyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthDeviceTokenWithBody request with any body - PostApiAuthDeviceTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthDeviceToken(ctx context.Context, body PostApiAuthDeviceTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthError request - GetApiAuthError(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthGetAccessTokenWithBody request with any body - PostApiAuthGetAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthGetAccessToken(ctx context.Context, body PostApiAuthGetAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSession request - GetSession(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSessionPostWithBody request with any body - GetSessionPostWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - GetSessionPost(ctx context.Context, body GetSessionPostJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthIsUsernameAvailableWithBody request with any body - PostApiAuthIsUsernameAvailableWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthIsUsernameAvailable(ctx context.Context, body PostApiAuthIsUsernameAvailableJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetJSONWebKeySet request - GetJSONWebKeySet(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // LinkSocialAccountWithBody request with any body - LinkSocialAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - LinkSocialAccount(ctx context.Context, body LinkSocialAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListUserAccounts request - ListUserAccounts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListUserSessions request - ListUserSessions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateDeviceAccessToken(ctx context.Context, body CreateDeviceAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListAuthorizationDetailsCatalog request ListAuthorizationDetailsCatalog(ctx context.Context, params *ListAuthorizationDetailsCatalogParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetApiAuthOauth2Authorize request - GetApiAuthOauth2Authorize(ctx context.Context, params *GetApiAuthOauth2AuthorizeParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateDynamicOAuthClientRegistrationWithBody request with any body + CreateDynamicOAuthClientRegistrationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // PostApiAuthOauth2Authorize request - PostApiAuthOauth2Authorize(ctx context.Context, params *PostApiAuthOauth2AuthorizeParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOauth2ClientRotateSecretWithBody request with any body - PostApiAuthOauth2ClientRotateSecretWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOauth2ClientRotateSecret(ctx context.Context, body PostApiAuthOauth2ClientRotateSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOauth2ConsentWithBody request with any body - PostApiAuthOauth2ConsentWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOauth2Consent(ctx context.Context, body PostApiAuthOauth2ConsentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOauth2ContinueWithBody request with any body - PostApiAuthOauth2ContinueWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOauth2Continue(ctx context.Context, body PostApiAuthOauth2ContinueJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOauth2CreateClientWithBody request with any body - PostApiAuthOauth2CreateClientWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOauth2CreateClient(ctx context.Context, body PostApiAuthOauth2CreateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOauth2DeleteClientWithBody request with any body - PostApiAuthOauth2DeleteClientWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOauth2DeleteClient(ctx context.Context, body PostApiAuthOauth2DeleteClientJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOauth2DeleteConsentWithBody request with any body - PostApiAuthOauth2DeleteConsentWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOauth2DeleteConsent(ctx context.Context, body PostApiAuthOauth2DeleteConsentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthOauth2EndSession request - GetApiAuthOauth2EndSession(ctx context.Context, params *GetApiAuthOauth2EndSessionParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthOauth2GetClient request - GetApiAuthOauth2GetClient(ctx context.Context, params *GetApiAuthOauth2GetClientParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthOauth2GetClients request - GetApiAuthOauth2GetClients(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthOauth2GetConsent request - GetApiAuthOauth2GetConsent(ctx context.Context, params *GetApiAuthOauth2GetConsentParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthOauth2GetConsents request - GetApiAuthOauth2GetConsents(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOauth2IntrospectWithBody request with any body - PostApiAuthOauth2IntrospectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOauth2Introspect(ctx context.Context, body PostApiAuthOauth2IntrospectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOauth2ParWithBody request with any body - PostApiAuthOauth2ParWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOauth2Par(ctx context.Context, body PostApiAuthOauth2ParJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthOauth2PublicClient request - GetApiAuthOauth2PublicClient(ctx context.Context, params *GetApiAuthOauth2PublicClientParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOauth2PublicClientPreloginWithBody request with any body - PostApiAuthOauth2PublicClientPreloginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOauth2PublicClientPrelogin(ctx context.Context, body PostApiAuthOauth2PublicClientPreloginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOauth2RegisterWithBody request with any body - PostApiAuthOauth2RegisterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOauth2Register(ctx context.Context, body PostApiAuthOauth2RegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateDynamicOAuthClientRegistration(ctx context.Context, body CreateDynamicOAuthClientRegistrationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteDynamicOAuthClientRegistration request DeleteDynamicOAuthClientRegistration(ctx context.Context, clientId string, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -11573,218 +10822,6 @@ type ClientInterface interface { UpdateDynamicOAuthClientRegistration(ctx context.Context, clientId string, body UpdateDynamicOAuthClientRegistrationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // PostApiAuthOauth2RevokeWithBody request with any body - PostApiAuthOauth2RevokeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOauth2Revoke(ctx context.Context, body PostApiAuthOauth2RevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOauth2TokenWithBody request with any body - PostApiAuthOauth2TokenWithBody(ctx context.Context, params *PostApiAuthOauth2TokenParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOauth2Token(ctx context.Context, params *PostApiAuthOauth2TokenParams, body PostApiAuthOauth2TokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOauth2UpdateClientWithBody request with any body - PostApiAuthOauth2UpdateClientWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOauth2UpdateClient(ctx context.Context, body PostApiAuthOauth2UpdateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOauth2UpdateConsentWithBody request with any body - PostApiAuthOauth2UpdateConsentWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOauth2UpdateConsent(ctx context.Context, body PostApiAuthOauth2UpdateConsentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthOauth2Userinfo request - GetApiAuthOauth2Userinfo(ctx context.Context, params *GetApiAuthOauth2UserinfoParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOauth2UserinfoWithBody request with any body - PostApiAuthOauth2UserinfoWithBody(ctx context.Context, params *PostApiAuthOauth2UserinfoParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOauth2Userinfo(ctx context.Context, params *PostApiAuthOauth2UserinfoParams, body PostApiAuthOauth2UserinfoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthOk request - GetApiAuthOk(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOrganizationAcceptInvitationWithBody request with any body - PostApiAuthOrganizationAcceptInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOrganizationAcceptInvitation(ctx context.Context, body PostApiAuthOrganizationAcceptInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOrganizationCancelInvitationWithBody request with any body - PostApiAuthOrganizationCancelInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOrganizationCancelInvitation(ctx context.Context, body PostApiAuthOrganizationCancelInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOrganizationCheckSlugWithBody request with any body - PostApiAuthOrganizationCheckSlugWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOrganizationCheckSlug(ctx context.Context, body PostApiAuthOrganizationCheckSlugJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOrganizationCreateWithBody request with any body - PostApiAuthOrganizationCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOrganizationCreate(ctx context.Context, body PostApiAuthOrganizationCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOrganizationDeleteWithBody request with any body - PostApiAuthOrganizationDeleteWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOrganizationDelete(ctx context.Context, body PostApiAuthOrganizationDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthOrganizationGetActiveMember request - GetApiAuthOrganizationGetActiveMember(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthOrganizationGetActiveMemberRole request - GetApiAuthOrganizationGetActiveMemberRole(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetFullOrganization request - GetFullOrganization(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthOrganizationGetInvitation request - GetApiAuthOrganizationGetInvitation(ctx context.Context, params *GetApiAuthOrganizationGetInvitationParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganization request - GetOrganization(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOrganizationHasPermissionWithBody request with any body - PostApiAuthOrganizationHasPermissionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOrganizationHasPermission(ctx context.Context, body PostApiAuthOrganizationHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateOrganizationInvitationWithBody request with any body - CreateOrganizationInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateOrganizationInvitation(ctx context.Context, body CreateOrganizationInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOrganizationLeaveWithBody request with any body - PostApiAuthOrganizationLeaveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOrganizationLeave(ctx context.Context, body PostApiAuthOrganizationLeaveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthOrganizationList request - GetApiAuthOrganizationList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthOrganizationListInvitations request - GetApiAuthOrganizationListInvitations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthOrganizationListMembers request - GetApiAuthOrganizationListMembers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthOrganizationListUserInvitations request - GetApiAuthOrganizationListUserInvitations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOrganizationRejectInvitationWithBody request with any body - PostApiAuthOrganizationRejectInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOrganizationRejectInvitation(ctx context.Context, body PostApiAuthOrganizationRejectInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOrganizationRemoveMemberWithBody request with any body - PostApiAuthOrganizationRemoveMemberWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOrganizationRemoveMember(ctx context.Context, body PostApiAuthOrganizationRemoveMemberJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // SetActiveOrganizationWithBody request with any body - SetActiveOrganizationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - SetActiveOrganization(ctx context.Context, body SetActiveOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthOrganizationUpdateWithBody request with any body - PostApiAuthOrganizationUpdateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthOrganizationUpdate(ctx context.Context, body PostApiAuthOrganizationUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateOrganizationMemberRoleWithBody request with any body - UpdateOrganizationMemberRoleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateOrganizationMemberRole(ctx context.Context, body UpdateOrganizationMemberRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthRefreshTokenWithBody request with any body - PostApiAuthRefreshTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthRefreshToken(ctx context.Context, body PostApiAuthRefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // RequestPasswordResetWithBody request with any body - RequestPasswordResetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - RequestPasswordReset(ctx context.Context, body RequestPasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ResetPasswordWithBody request with any body - ResetPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - ResetPassword(ctx context.Context, body ResetPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ResetPasswordCallback request - ResetPasswordCallback(ctx context.Context, token string, params *ResetPasswordCallbackParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthRevokeOtherSessionsWithBody request with any body - PostApiAuthRevokeOtherSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthRevokeOtherSessions(ctx context.Context, body PostApiAuthRevokeOtherSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthRevokeSessionWithBody request with any body - PostApiAuthRevokeSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthRevokeSession(ctx context.Context, body PostApiAuthRevokeSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthRevokeSessionsWithBody request with any body - PostApiAuthRevokeSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthRevokeSessions(ctx context.Context, body PostApiAuthRevokeSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // SendVerificationEmailWithBody request with any body - SendVerificationEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - SendVerificationEmail(ctx context.Context, body SendVerificationEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // SignInEmailWithBody request with any body - SignInEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - SignInEmail(ctx context.Context, body SignInEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // SocialSignInWithBody request with any body - SocialSignInWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - SocialSignIn(ctx context.Context, body SocialSignInJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthSignInUsernameWithBody request with any body - PostApiAuthSignInUsernameWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthSignInUsername(ctx context.Context, body PostApiAuthSignInUsernameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // SignOutWithBody request with any body - SignOutWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - SignOut(ctx context.Context, body SignOutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // SignUpWithEmailAndPasswordWithBody request with any body - SignUpWithEmailAndPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - SignUpWithEmailAndPassword(ctx context.Context, body SignUpWithEmailAndPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetJSONWebToken request - GetJSONWebToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostApiAuthUnlinkAccountWithBody request with any body - PostApiAuthUnlinkAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostApiAuthUnlinkAccount(ctx context.Context, body PostApiAuthUnlinkAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateSessionWithBody request with any body - UpdateSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateSession(ctx context.Context, body UpdateSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateUserWithBody request with any body - UpdateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateUser(ctx context.Context, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetApiAuthVerifyEmail request - GetApiAuthVerifyEmail(ctx context.Context, params *GetApiAuthVerifyEmailParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // VerifyPasswordWithBody request with any body - VerifyPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - VerifyPassword(ctx context.Context, body VerifyPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListBackgroundJobs request ListBackgroundJobs(ctx context.Context, params *ListBackgroundJobsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -12359,8 +11396,8 @@ type ClientInterface interface { GetUserProfile(ctx context.Context, username string, reqEditors ...RequestEditorFn) (*http.Response, error) } -func (c *Client) GetApiAuthAccountInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthAccountInfoRequest(c.Server) +func (c *Client) CreateDeviceAuthorizationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDeviceAuthorizationRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -12371,8 +11408,8 @@ func (c *Client) GetApiAuthAccountInfo(ctx context.Context, reqEditors ...Reques return c.Client.Do(req) } -func (c *Client) BanUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewBanUserRequestWithBody(c.Server, contentType, body) +func (c *Client) CreateDeviceAuthorization(ctx context.Context, body CreateDeviceAuthorizationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDeviceAuthorizationRequest(c.Server, body) if err != nil { return nil, err } @@ -12383,8 +11420,8 @@ func (c *Client) BanUserWithBody(ctx context.Context, contentType string, body i return c.Client.Do(req) } -func (c *Client) BanUser(ctx context.Context, body BanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewBanUserRequest(c.Server, body) +func (c *Client) CreateDeviceAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDeviceAccessTokenRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -12395,776 +11432,8 @@ func (c *Client) BanUser(ctx context.Context, body BanUserJSONRequestBody, reqEd return c.Client.Do(req) } -func (c *Client) CreateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateUserRequestWithBody(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) CreateUser(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateUserRequest(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) GetUser(ctx context.Context, params *GetUserParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetUserRequest(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) PostApiAuthAdminHasPermissionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthAdminHasPermissionRequestWithBody(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) PostApiAuthAdminHasPermission(ctx context.Context, body PostApiAuthAdminHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthAdminHasPermissionRequest(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) ImpersonateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewImpersonateUserRequestWithBody(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) ImpersonateUser(ctx context.Context, body ImpersonateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewImpersonateUserRequest(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) AdminListUserSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAdminListUserSessionsRequestWithBody(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) AdminListUserSessions(ctx context.Context, body AdminListUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAdminListUserSessionsRequest(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) ListUsers(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListUsersRequest(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) RemoveUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRemoveUserRequestWithBody(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) RemoveUser(ctx context.Context, body RemoveUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRemoveUserRequest(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) RevokeUserSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRevokeUserSessionRequestWithBody(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) RevokeUserSession(ctx context.Context, body RevokeUserSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRevokeUserSessionRequest(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) RevokeUserSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRevokeUserSessionsRequestWithBody(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) RevokeUserSessions(ctx context.Context, body RevokeUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRevokeUserSessionsRequest(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) SetUserRoleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSetUserRoleRequestWithBody(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) SetUserRole(ctx context.Context, body SetUserRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSetUserRoleRequest(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) SetUserPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSetUserPasswordRequestWithBody(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) SetUserPassword(ctx context.Context, body SetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSetUserPasswordRequest(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) PostApiAuthAdminStopImpersonating(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthAdminStopImpersonatingRequest(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) UnbanUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUnbanUserRequestWithBody(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) UnbanUser(ctx context.Context, body UnbanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUnbanUserRequest(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) AdminUpdateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAdminUpdateUserRequestWithBody(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) AdminUpdateUser(ctx context.Context, body AdminUpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAdminUpdateUserRequest(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) PostApiAuthApiKeyCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthApiKeyCreateRequestWithBody(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) PostApiAuthApiKeyCreate(ctx context.Context, body PostApiAuthApiKeyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthApiKeyCreateRequest(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) PostApiAuthApiKeyDeleteWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthApiKeyDeleteRequestWithBody(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) PostApiAuthApiKeyDelete(ctx context.Context, body PostApiAuthApiKeyDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthApiKeyDeleteRequest(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) GetApiAuthApiKeyGet(ctx context.Context, params *GetApiAuthApiKeyGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthApiKeyGetRequest(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) GetApiAuthApiKeyList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthApiKeyListRequest(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) PostApiAuthApiKeyUpdateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthApiKeyUpdateRequestWithBody(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) PostApiAuthApiKeyUpdate(ctx context.Context, body PostApiAuthApiKeyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthApiKeyUpdateRequest(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) GetApiAuthCallbackId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthCallbackIdRequest(c.Server, id) - 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) PostApiAuthCallbackIdWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthCallbackIdRequestWithBody(c.Server, id, 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) PostApiAuthCallbackId(ctx context.Context, id string, body PostApiAuthCallbackIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthCallbackIdRequest(c.Server, id, 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) ChangeEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewChangeEmailRequestWithBody(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) ChangeEmail(ctx context.Context, body ChangeEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewChangeEmailRequest(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) ChangePasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewChangePasswordRequestWithBody(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) ChangePassword(ctx context.Context, body ChangePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewChangePasswordRequest(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) DeleteUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteUserRequestWithBody(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) DeleteUser(ctx context.Context, body DeleteUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteUserRequest(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) GetApiAuthDeleteUserCallback(ctx context.Context, params *GetApiAuthDeleteUserCallbackParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthDeleteUserCallbackRequest(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) GetApiAuthDevice(ctx context.Context, params *GetApiAuthDeviceParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthDeviceRequest(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) PostApiAuthDeviceApproveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthDeviceApproveRequestWithBody(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) PostApiAuthDeviceApprove(ctx context.Context, body PostApiAuthDeviceApproveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthDeviceApproveRequest(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) PostApiAuthDeviceCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthDeviceCodeRequestWithBody(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) PostApiAuthDeviceCode(ctx context.Context, body PostApiAuthDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthDeviceCodeRequest(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) PostApiAuthDeviceDenyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthDeviceDenyRequestWithBody(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) PostApiAuthDeviceDeny(ctx context.Context, body PostApiAuthDeviceDenyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthDeviceDenyRequest(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) PostApiAuthDeviceTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthDeviceTokenRequestWithBody(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) PostApiAuthDeviceToken(ctx context.Context, body PostApiAuthDeviceTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthDeviceTokenRequest(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) GetApiAuthError(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthErrorRequest(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) PostApiAuthGetAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthGetAccessTokenRequestWithBody(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) PostApiAuthGetAccessToken(ctx context.Context, body PostApiAuthGetAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthGetAccessTokenRequest(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) GetSession(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSessionRequest(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) GetSessionPostWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSessionPostRequestWithBody(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) GetSessionPost(ctx context.Context, body GetSessionPostJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSessionPostRequest(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) PostApiAuthIsUsernameAvailableWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthIsUsernameAvailableRequestWithBody(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) PostApiAuthIsUsernameAvailable(ctx context.Context, body PostApiAuthIsUsernameAvailableJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthIsUsernameAvailableRequest(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) GetJSONWebKeySet(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetJSONWebKeySetRequest(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) LinkSocialAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewLinkSocialAccountRequestWithBody(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) LinkSocialAccount(ctx context.Context, body LinkSocialAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewLinkSocialAccountRequest(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) ListUserAccounts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListUserAccountsRequest(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) ListUserSessions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListUserSessionsRequest(c.Server) +func (c *Client) CreateDeviceAccessToken(ctx context.Context, body CreateDeviceAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDeviceAccessTokenRequest(c.Server, body) if err != nil { return nil, err } @@ -13187,8 +11456,8 @@ func (c *Client) ListAuthorizationDetailsCatalog(ctx context.Context, params *Li return c.Client.Do(req) } -func (c *Client) GetApiAuthOauth2Authorize(ctx context.Context, params *GetApiAuthOauth2AuthorizeParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOauth2AuthorizeRequest(c.Server, params) +func (c *Client) CreateDynamicOAuthClientRegistrationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDynamicOAuthClientRegistrationRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -13199,320 +11468,8 @@ func (c *Client) GetApiAuthOauth2Authorize(ctx context.Context, params *GetApiAu return c.Client.Do(req) } -func (c *Client) PostApiAuthOauth2Authorize(ctx context.Context, params *PostApiAuthOauth2AuthorizeParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2AuthorizeRequest(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) PostApiAuthOauth2ClientRotateSecretWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2ClientRotateSecretRequestWithBody(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) PostApiAuthOauth2ClientRotateSecret(ctx context.Context, body PostApiAuthOauth2ClientRotateSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2ClientRotateSecretRequest(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) PostApiAuthOauth2ConsentWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2ConsentRequestWithBody(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) PostApiAuthOauth2Consent(ctx context.Context, body PostApiAuthOauth2ConsentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2ConsentRequest(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) PostApiAuthOauth2ContinueWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2ContinueRequestWithBody(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) PostApiAuthOauth2Continue(ctx context.Context, body PostApiAuthOauth2ContinueJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2ContinueRequest(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) PostApiAuthOauth2CreateClientWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2CreateClientRequestWithBody(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) PostApiAuthOauth2CreateClient(ctx context.Context, body PostApiAuthOauth2CreateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2CreateClientRequest(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) PostApiAuthOauth2DeleteClientWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2DeleteClientRequestWithBody(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) PostApiAuthOauth2DeleteClient(ctx context.Context, body PostApiAuthOauth2DeleteClientJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2DeleteClientRequest(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) PostApiAuthOauth2DeleteConsentWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2DeleteConsentRequestWithBody(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) PostApiAuthOauth2DeleteConsent(ctx context.Context, body PostApiAuthOauth2DeleteConsentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2DeleteConsentRequest(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) GetApiAuthOauth2EndSession(ctx context.Context, params *GetApiAuthOauth2EndSessionParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOauth2EndSessionRequest(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) GetApiAuthOauth2GetClient(ctx context.Context, params *GetApiAuthOauth2GetClientParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOauth2GetClientRequest(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) GetApiAuthOauth2GetClients(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOauth2GetClientsRequest(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) GetApiAuthOauth2GetConsent(ctx context.Context, params *GetApiAuthOauth2GetConsentParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOauth2GetConsentRequest(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) GetApiAuthOauth2GetConsents(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOauth2GetConsentsRequest(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) PostApiAuthOauth2IntrospectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2IntrospectRequestWithBody(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) PostApiAuthOauth2Introspect(ctx context.Context, body PostApiAuthOauth2IntrospectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2IntrospectRequest(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) PostApiAuthOauth2ParWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2ParRequestWithBody(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) PostApiAuthOauth2Par(ctx context.Context, body PostApiAuthOauth2ParJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2ParRequest(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) GetApiAuthOauth2PublicClient(ctx context.Context, params *GetApiAuthOauth2PublicClientParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOauth2PublicClientRequest(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) PostApiAuthOauth2PublicClientPreloginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2PublicClientPreloginRequestWithBody(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) PostApiAuthOauth2PublicClientPrelogin(ctx context.Context, body PostApiAuthOauth2PublicClientPreloginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2PublicClientPreloginRequest(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) PostApiAuthOauth2RegisterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2RegisterRequestWithBody(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) PostApiAuthOauth2Register(ctx context.Context, body PostApiAuthOauth2RegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2RegisterRequest(c.Server, body) +func (c *Client) CreateDynamicOAuthClientRegistration(ctx context.Context, body CreateDynamicOAuthClientRegistrationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateDynamicOAuthClientRegistrationRequest(c.Server, body) if err != nil { return nil, err } @@ -13571,990 +11528,6 @@ func (c *Client) UpdateDynamicOAuthClientRegistration(ctx context.Context, clien return c.Client.Do(req) } -func (c *Client) PostApiAuthOauth2RevokeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2RevokeRequestWithBody(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) PostApiAuthOauth2Revoke(ctx context.Context, body PostApiAuthOauth2RevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2RevokeRequest(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) PostApiAuthOauth2TokenWithBody(ctx context.Context, params *PostApiAuthOauth2TokenParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2TokenRequestWithBody(c.Server, params, 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) PostApiAuthOauth2Token(ctx context.Context, params *PostApiAuthOauth2TokenParams, body PostApiAuthOauth2TokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2TokenRequest(c.Server, params, 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) PostApiAuthOauth2UpdateClientWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2UpdateClientRequestWithBody(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) PostApiAuthOauth2UpdateClient(ctx context.Context, body PostApiAuthOauth2UpdateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2UpdateClientRequest(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) PostApiAuthOauth2UpdateConsentWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2UpdateConsentRequestWithBody(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) PostApiAuthOauth2UpdateConsent(ctx context.Context, body PostApiAuthOauth2UpdateConsentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2UpdateConsentRequest(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) GetApiAuthOauth2Userinfo(ctx context.Context, params *GetApiAuthOauth2UserinfoParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOauth2UserinfoRequest(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) PostApiAuthOauth2UserinfoWithBody(ctx context.Context, params *PostApiAuthOauth2UserinfoParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2UserinfoRequestWithBody(c.Server, params, 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) PostApiAuthOauth2Userinfo(ctx context.Context, params *PostApiAuthOauth2UserinfoParams, body PostApiAuthOauth2UserinfoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOauth2UserinfoRequest(c.Server, params, 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) GetApiAuthOk(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOkRequest(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) PostApiAuthOrganizationAcceptInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationAcceptInvitationRequestWithBody(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) PostApiAuthOrganizationAcceptInvitation(ctx context.Context, body PostApiAuthOrganizationAcceptInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationAcceptInvitationRequest(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) PostApiAuthOrganizationCancelInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationCancelInvitationRequestWithBody(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) PostApiAuthOrganizationCancelInvitation(ctx context.Context, body PostApiAuthOrganizationCancelInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationCancelInvitationRequest(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) PostApiAuthOrganizationCheckSlugWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationCheckSlugRequestWithBody(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) PostApiAuthOrganizationCheckSlug(ctx context.Context, body PostApiAuthOrganizationCheckSlugJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationCheckSlugRequest(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) PostApiAuthOrganizationCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationCreateRequestWithBody(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) PostApiAuthOrganizationCreate(ctx context.Context, body PostApiAuthOrganizationCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationCreateRequest(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) PostApiAuthOrganizationDeleteWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationDeleteRequestWithBody(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) PostApiAuthOrganizationDelete(ctx context.Context, body PostApiAuthOrganizationDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationDeleteRequest(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) GetApiAuthOrganizationGetActiveMember(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOrganizationGetActiveMemberRequest(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) GetApiAuthOrganizationGetActiveMemberRole(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOrganizationGetActiveMemberRoleRequest(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) GetFullOrganization(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetFullOrganizationRequest(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) GetApiAuthOrganizationGetInvitation(ctx context.Context, params *GetApiAuthOrganizationGetInvitationParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOrganizationGetInvitationRequest(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) GetOrganization(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationRequest(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) PostApiAuthOrganizationHasPermissionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationHasPermissionRequestWithBody(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) PostApiAuthOrganizationHasPermission(ctx context.Context, body PostApiAuthOrganizationHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationHasPermissionRequest(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) CreateOrganizationInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateOrganizationInvitationRequestWithBody(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) CreateOrganizationInvitation(ctx context.Context, body CreateOrganizationInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateOrganizationInvitationRequest(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) PostApiAuthOrganizationLeaveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationLeaveRequestWithBody(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) PostApiAuthOrganizationLeave(ctx context.Context, body PostApiAuthOrganizationLeaveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationLeaveRequest(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) GetApiAuthOrganizationList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOrganizationListRequest(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) GetApiAuthOrganizationListInvitations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOrganizationListInvitationsRequest(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) GetApiAuthOrganizationListMembers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOrganizationListMembersRequest(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) GetApiAuthOrganizationListUserInvitations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthOrganizationListUserInvitationsRequest(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) PostApiAuthOrganizationRejectInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationRejectInvitationRequestWithBody(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) PostApiAuthOrganizationRejectInvitation(ctx context.Context, body PostApiAuthOrganizationRejectInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationRejectInvitationRequest(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) PostApiAuthOrganizationRemoveMemberWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationRemoveMemberRequestWithBody(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) PostApiAuthOrganizationRemoveMember(ctx context.Context, body PostApiAuthOrganizationRemoveMemberJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationRemoveMemberRequest(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) SetActiveOrganizationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSetActiveOrganizationRequestWithBody(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) SetActiveOrganization(ctx context.Context, body SetActiveOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSetActiveOrganizationRequest(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) PostApiAuthOrganizationUpdateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationUpdateRequestWithBody(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) PostApiAuthOrganizationUpdate(ctx context.Context, body PostApiAuthOrganizationUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthOrganizationUpdateRequest(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) UpdateOrganizationMemberRoleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateOrganizationMemberRoleRequestWithBody(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) UpdateOrganizationMemberRole(ctx context.Context, body UpdateOrganizationMemberRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateOrganizationMemberRoleRequest(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) PostApiAuthRefreshTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthRefreshTokenRequestWithBody(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) PostApiAuthRefreshToken(ctx context.Context, body PostApiAuthRefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthRefreshTokenRequest(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) RequestPasswordResetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRequestPasswordResetRequestWithBody(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) RequestPasswordReset(ctx context.Context, body RequestPasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRequestPasswordResetRequest(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) ResetPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewResetPasswordRequestWithBody(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) ResetPassword(ctx context.Context, body ResetPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewResetPasswordRequest(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) ResetPasswordCallback(ctx context.Context, token string, params *ResetPasswordCallbackParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewResetPasswordCallbackRequest(c.Server, token, 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) PostApiAuthRevokeOtherSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthRevokeOtherSessionsRequestWithBody(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) PostApiAuthRevokeOtherSessions(ctx context.Context, body PostApiAuthRevokeOtherSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthRevokeOtherSessionsRequest(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) PostApiAuthRevokeSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthRevokeSessionRequestWithBody(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) PostApiAuthRevokeSession(ctx context.Context, body PostApiAuthRevokeSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthRevokeSessionRequest(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) PostApiAuthRevokeSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthRevokeSessionsRequestWithBody(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) PostApiAuthRevokeSessions(ctx context.Context, body PostApiAuthRevokeSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthRevokeSessionsRequest(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) SendVerificationEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSendVerificationEmailRequestWithBody(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) SendVerificationEmail(ctx context.Context, body SendVerificationEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSendVerificationEmailRequest(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) SignInEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSignInEmailRequestWithBody(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) SignInEmail(ctx context.Context, body SignInEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSignInEmailRequest(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) SocialSignInWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSocialSignInRequestWithBody(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) SocialSignIn(ctx context.Context, body SocialSignInJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSocialSignInRequest(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) PostApiAuthSignInUsernameWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthSignInUsernameRequestWithBody(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) PostApiAuthSignInUsername(ctx context.Context, body PostApiAuthSignInUsernameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthSignInUsernameRequest(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) SignOutWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSignOutRequestWithBody(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) SignOut(ctx context.Context, body SignOutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSignOutRequest(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) SignUpWithEmailAndPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSignUpWithEmailAndPasswordRequestWithBody(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) SignUpWithEmailAndPassword(ctx context.Context, body SignUpWithEmailAndPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSignUpWithEmailAndPasswordRequest(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) GetJSONWebToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetJSONWebTokenRequest(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) PostApiAuthUnlinkAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthUnlinkAccountRequestWithBody(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) PostApiAuthUnlinkAccount(ctx context.Context, body PostApiAuthUnlinkAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostApiAuthUnlinkAccountRequest(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) UpdateSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSessionRequestWithBody(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) UpdateSession(ctx context.Context, body UpdateSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSessionRequest(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) UpdateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateUserRequestWithBody(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) UpdateUser(ctx context.Context, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateUserRequest(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) GetApiAuthVerifyEmail(ctx context.Context, params *GetApiAuthVerifyEmailParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetApiAuthVerifyEmailRequest(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) VerifyPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewVerifyPasswordRequestWithBody(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) VerifyPassword(ctx context.Context, body VerifyPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewVerifyPasswordRequest(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) ListBackgroundJobs(ctx context.Context, params *ListBackgroundJobsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListBackgroundJobsRequest(c.Server, params) if err != nil { @@ -17063,1343 +14036,19 @@ func (c *Client) GetUserProfile(ctx context.Context, username string, reqEditors return c.Client.Do(req) } -// NewGetApiAuthAccountInfoRequest generates requests for GetApiAuthAccountInfo -func NewGetApiAuthAccountInfoRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/account-info") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewBanUserRequest calls the generic BanUser builder with application/json body -func NewBanUserRequest(server string, body BanUserJSONRequestBody) (*http.Request, error) { +// NewCreateDeviceAuthorizationRequest calls the generic CreateDeviceAuthorization builder with application/json body +func NewCreateDeviceAuthorizationRequest(server string, body CreateDeviceAuthorizationJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewBanUserRequestWithBody(server, "application/json", bodyReader) + return NewCreateDeviceAuthorizationRequestWithBody(server, "application/json", bodyReader) } -// NewBanUserRequestWithBody generates requests for BanUser with any type of body -func NewBanUserRequestWithBody(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("/api/auth/admin/ban-user") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewCreateUserRequest calls the generic CreateUser builder with application/json body -func NewCreateUserRequest(server string, body CreateUserJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateUserRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreateUserRequestWithBody generates requests for CreateUser with any type of body -func NewCreateUserRequestWithBody(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("/api/auth/admin/create-user") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetUserRequest generates requests for GetUser -func NewGetUserRequest(server string, params *GetUserParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/admin/get-user") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "id", *params.Id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostApiAuthAdminHasPermissionRequest calls the generic PostApiAuthAdminHasPermission builder with application/json body -func NewPostApiAuthAdminHasPermissionRequest(server string, body PostApiAuthAdminHasPermissionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthAdminHasPermissionRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthAdminHasPermissionRequestWithBody generates requests for PostApiAuthAdminHasPermission with any type of body -func NewPostApiAuthAdminHasPermissionRequestWithBody(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("/api/auth/admin/has-permission") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewImpersonateUserRequest calls the generic ImpersonateUser builder with application/json body -func NewImpersonateUserRequest(server string, body ImpersonateUserJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewImpersonateUserRequestWithBody(server, "application/json", bodyReader) -} - -// NewImpersonateUserRequestWithBody generates requests for ImpersonateUser with any type of body -func NewImpersonateUserRequestWithBody(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("/api/auth/admin/impersonate-user") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewAdminListUserSessionsRequest calls the generic AdminListUserSessions builder with application/json body -func NewAdminListUserSessionsRequest(server string, body AdminListUserSessionsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewAdminListUserSessionsRequestWithBody(server, "application/json", bodyReader) -} - -// NewAdminListUserSessionsRequestWithBody generates requests for AdminListUserSessions with any type of body -func NewAdminListUserSessionsRequestWithBody(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("/api/auth/admin/list-user-sessions") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewListUsersRequest generates requests for ListUsers -func NewListUsersRequest(server string, params *ListUsersParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/admin/list-users") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.SearchValue != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "searchValue", *params.SearchValue, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.SearchField != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "searchField", *params.SearchField, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.SearchOperator != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "searchOperator", *params.SearchOperator, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Limit != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Offset != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.SortBy != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sortBy", *params.SortBy, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.SortDirection != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sortDirection", *params.SortDirection, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.FilterField != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "filterField", *params.FilterField, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.FilterValue != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "filterValue", *params.FilterValue, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.FilterOperator != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "filterOperator", *params.FilterOperator, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewRemoveUserRequest calls the generic RemoveUser builder with application/json body -func NewRemoveUserRequest(server string, body RemoveUserJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewRemoveUserRequestWithBody(server, "application/json", bodyReader) -} - -// NewRemoveUserRequestWithBody generates requests for RemoveUser with any type of body -func NewRemoveUserRequestWithBody(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("/api/auth/admin/remove-user") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewRevokeUserSessionRequest calls the generic RevokeUserSession builder with application/json body -func NewRevokeUserSessionRequest(server string, body RevokeUserSessionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewRevokeUserSessionRequestWithBody(server, "application/json", bodyReader) -} - -// NewRevokeUserSessionRequestWithBody generates requests for RevokeUserSession with any type of body -func NewRevokeUserSessionRequestWithBody(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("/api/auth/admin/revoke-user-session") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewRevokeUserSessionsRequest calls the generic RevokeUserSessions builder with application/json body -func NewRevokeUserSessionsRequest(server string, body RevokeUserSessionsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewRevokeUserSessionsRequestWithBody(server, "application/json", bodyReader) -} - -// NewRevokeUserSessionsRequestWithBody generates requests for RevokeUserSessions with any type of body -func NewRevokeUserSessionsRequestWithBody(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("/api/auth/admin/revoke-user-sessions") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewSetUserRoleRequest calls the generic SetUserRole builder with application/json body -func NewSetUserRoleRequest(server string, body SetUserRoleJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewSetUserRoleRequestWithBody(server, "application/json", bodyReader) -} - -// NewSetUserRoleRequestWithBody generates requests for SetUserRole with any type of body -func NewSetUserRoleRequestWithBody(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("/api/auth/admin/set-role") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewSetUserPasswordRequest calls the generic SetUserPassword builder with application/json body -func NewSetUserPasswordRequest(server string, body SetUserPasswordJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewSetUserPasswordRequestWithBody(server, "application/json", bodyReader) -} - -// NewSetUserPasswordRequestWithBody generates requests for SetUserPassword with any type of body -func NewSetUserPasswordRequestWithBody(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("/api/auth/admin/set-user-password") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthAdminStopImpersonatingRequest generates requests for PostApiAuthAdminStopImpersonating -func NewPostApiAuthAdminStopImpersonatingRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/admin/stop-impersonating") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewUnbanUserRequest calls the generic UnbanUser builder with application/json body -func NewUnbanUserRequest(server string, body UnbanUserJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUnbanUserRequestWithBody(server, "application/json", bodyReader) -} - -// NewUnbanUserRequestWithBody generates requests for UnbanUser with any type of body -func NewUnbanUserRequestWithBody(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("/api/auth/admin/unban-user") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewAdminUpdateUserRequest calls the generic AdminUpdateUser builder with application/json body -func NewAdminUpdateUserRequest(server string, body AdminUpdateUserJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewAdminUpdateUserRequestWithBody(server, "application/json", bodyReader) -} - -// NewAdminUpdateUserRequestWithBody generates requests for AdminUpdateUser with any type of body -func NewAdminUpdateUserRequestWithBody(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("/api/auth/admin/update-user") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthApiKeyCreateRequest calls the generic PostApiAuthApiKeyCreate builder with application/json body -func NewPostApiAuthApiKeyCreateRequest(server string, body PostApiAuthApiKeyCreateJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthApiKeyCreateRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthApiKeyCreateRequestWithBody generates requests for PostApiAuthApiKeyCreate with any type of body -func NewPostApiAuthApiKeyCreateRequestWithBody(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("/api/auth/api-key/create") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthApiKeyDeleteRequest calls the generic PostApiAuthApiKeyDelete builder with application/json body -func NewPostApiAuthApiKeyDeleteRequest(server string, body PostApiAuthApiKeyDeleteJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthApiKeyDeleteRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthApiKeyDeleteRequestWithBody generates requests for PostApiAuthApiKeyDelete with any type of body -func NewPostApiAuthApiKeyDeleteRequestWithBody(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("/api/auth/api-key/delete") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetApiAuthApiKeyGetRequest generates requests for GetApiAuthApiKeyGet -func NewGetApiAuthApiKeyGetRequest(server string, params *GetApiAuthApiKeyGetParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/api-key/get") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.ConfigId != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "configId", *params.ConfigId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "id", *params.Id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetApiAuthApiKeyListRequest generates requests for GetApiAuthApiKeyList -func NewGetApiAuthApiKeyListRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/api-key/list") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostApiAuthApiKeyUpdateRequest calls the generic PostApiAuthApiKeyUpdate builder with application/json body -func NewPostApiAuthApiKeyUpdateRequest(server string, body PostApiAuthApiKeyUpdateJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthApiKeyUpdateRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthApiKeyUpdateRequestWithBody generates requests for PostApiAuthApiKeyUpdate with any type of body -func NewPostApiAuthApiKeyUpdateRequestWithBody(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("/api/auth/api-key/update") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetApiAuthCallbackIdRequest generates requests for GetApiAuthCallbackId -func NewGetApiAuthCallbackIdRequest(server string, id string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/callback/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostApiAuthCallbackIdRequest calls the generic PostApiAuthCallbackId builder with application/json body -func NewPostApiAuthCallbackIdRequest(server string, id string, body PostApiAuthCallbackIdJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthCallbackIdRequestWithBody(server, id, "application/json", bodyReader) -} - -// NewPostApiAuthCallbackIdRequestWithBody generates requests for PostApiAuthCallbackId with any type of body -func NewPostApiAuthCallbackIdRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/callback/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewChangeEmailRequest calls the generic ChangeEmail builder with application/json body -func NewChangeEmailRequest(server string, body ChangeEmailJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewChangeEmailRequestWithBody(server, "application/json", bodyReader) -} - -// NewChangeEmailRequestWithBody generates requests for ChangeEmail with any type of body -func NewChangeEmailRequestWithBody(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("/api/auth/change-email") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewChangePasswordRequest calls the generic ChangePassword builder with application/json body -func NewChangePasswordRequest(server string, body ChangePasswordJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewChangePasswordRequestWithBody(server, "application/json", bodyReader) -} - -// NewChangePasswordRequestWithBody generates requests for ChangePassword with any type of body -func NewChangePasswordRequestWithBody(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("/api/auth/change-password") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteUserRequest calls the generic DeleteUser builder with application/json body -func NewDeleteUserRequest(server string, body DeleteUserJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteUserRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteUserRequestWithBody generates requests for DeleteUser with any type of body -func NewDeleteUserRequestWithBody(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("/api/auth/delete-user") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetApiAuthDeleteUserCallbackRequest generates requests for GetApiAuthDeleteUserCallback -func NewGetApiAuthDeleteUserCallbackRequest(server string, params *GetApiAuthDeleteUserCallbackParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/delete-user/callback") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.Token != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "token", *params.Token, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.CallbackURL != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "callbackURL", *params.CallbackURL, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetApiAuthDeviceRequest generates requests for GetApiAuthDevice -func NewGetApiAuthDeviceRequest(server string, params *GetApiAuthDeviceParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/device") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.UserCode != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "user_code", *params.UserCode, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostApiAuthDeviceApproveRequest calls the generic PostApiAuthDeviceApprove builder with application/json body -func NewPostApiAuthDeviceApproveRequest(server string, body PostApiAuthDeviceApproveJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthDeviceApproveRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthDeviceApproveRequestWithBody generates requests for PostApiAuthDeviceApprove with any type of body -func NewPostApiAuthDeviceApproveRequestWithBody(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("/api/auth/device/approve") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthDeviceCodeRequest calls the generic PostApiAuthDeviceCode builder with application/json body -func NewPostApiAuthDeviceCodeRequest(server string, body PostApiAuthDeviceCodeJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthDeviceCodeRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthDeviceCodeRequestWithBody generates requests for PostApiAuthDeviceCode with any type of body -func NewPostApiAuthDeviceCodeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateDeviceAuthorizationRequestWithBody generates requests for CreateDeviceAuthorization with any type of body +func NewCreateDeviceAuthorizationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -18427,59 +14076,19 @@ func NewPostApiAuthDeviceCodeRequestWithBody(server string, contentType string, return req, nil } -// NewPostApiAuthDeviceDenyRequest calls the generic PostApiAuthDeviceDeny builder with application/json body -func NewPostApiAuthDeviceDenyRequest(server string, body PostApiAuthDeviceDenyJSONRequestBody) (*http.Request, error) { +// NewCreateDeviceAccessTokenRequest calls the generic CreateDeviceAccessToken builder with application/json body +func NewCreateDeviceAccessTokenRequest(server string, body CreateDeviceAccessTokenJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostApiAuthDeviceDenyRequestWithBody(server, "application/json", bodyReader) + return NewCreateDeviceAccessTokenRequestWithBody(server, "application/json", bodyReader) } -// NewPostApiAuthDeviceDenyRequestWithBody generates requests for PostApiAuthDeviceDeny with any type of body -func NewPostApiAuthDeviceDenyRequestWithBody(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("/api/auth/device/deny") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthDeviceTokenRequest calls the generic PostApiAuthDeviceToken builder with application/json body -func NewPostApiAuthDeviceTokenRequest(server string, body PostApiAuthDeviceTokenJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthDeviceTokenRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthDeviceTokenRequestWithBody generates requests for PostApiAuthDeviceToken with any type of body -func NewPostApiAuthDeviceTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateDeviceAccessTokenRequestWithBody generates requests for CreateDeviceAccessToken with any type of body +func NewCreateDeviceAccessTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -18507,301 +14116,6 @@ func NewPostApiAuthDeviceTokenRequestWithBody(server string, contentType string, return req, nil } -// NewGetApiAuthErrorRequest generates requests for GetApiAuthError -func NewGetApiAuthErrorRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/error") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostApiAuthGetAccessTokenRequest calls the generic PostApiAuthGetAccessToken builder with application/json body -func NewPostApiAuthGetAccessTokenRequest(server string, body PostApiAuthGetAccessTokenJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthGetAccessTokenRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthGetAccessTokenRequestWithBody generates requests for PostApiAuthGetAccessToken with any type of body -func NewPostApiAuthGetAccessTokenRequestWithBody(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("/api/auth/get-access-token") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetSessionRequest generates requests for GetSession -func NewGetSessionRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/get-session") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetSessionPostRequest calls the generic GetSessionPost builder with application/json body -func NewGetSessionPostRequest(server string, body GetSessionPostJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewGetSessionPostRequestWithBody(server, "application/json", bodyReader) -} - -// NewGetSessionPostRequestWithBody generates requests for GetSessionPost with any type of body -func NewGetSessionPostRequestWithBody(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("/api/auth/get-session") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthIsUsernameAvailableRequest calls the generic PostApiAuthIsUsernameAvailable builder with application/json body -func NewPostApiAuthIsUsernameAvailableRequest(server string, body PostApiAuthIsUsernameAvailableJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthIsUsernameAvailableRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthIsUsernameAvailableRequestWithBody generates requests for PostApiAuthIsUsernameAvailable with any type of body -func NewPostApiAuthIsUsernameAvailableRequestWithBody(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("/api/auth/is-username-available") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetJSONWebKeySetRequest generates requests for GetJSONWebKeySet -func NewGetJSONWebKeySetRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/jwks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewLinkSocialAccountRequest calls the generic LinkSocialAccount builder with application/json body -func NewLinkSocialAccountRequest(server string, body LinkSocialAccountJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewLinkSocialAccountRequestWithBody(server, "application/json", bodyReader) -} - -// NewLinkSocialAccountRequestWithBody generates requests for LinkSocialAccount with any type of body -func NewLinkSocialAccountRequestWithBody(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("/api/auth/link-social") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewListUserAccountsRequest generates requests for ListUserAccounts -func NewListUserAccountsRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/list-accounts") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListUserSessionsRequest generates requests for ListUserSessions -func NewListUserSessionsRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/list-sessions") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - // NewListAuthorizationDetailsCatalogRequest generates requests for ListAuthorizationDetailsCatalog func NewListAuthorizationDetailsCatalogRequest(server string, params *ListAuthorizationDetailsCatalogParams) (*http.Request, error) { var err error @@ -18868,1049 +14182,19 @@ func NewListAuthorizationDetailsCatalogRequest(server string, params *ListAuthor return req, nil } -// NewGetApiAuthOauth2AuthorizeRequest generates requests for GetApiAuthOauth2Authorize -func NewGetApiAuthOauth2AuthorizeRequest(server string, params *GetApiAuthOauth2AuthorizeParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/oauth2/authorize") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.ResponseType != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "response_type", *params.ResponseType, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "client_id", params.ClientId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - if params.RedirectUri != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "redirect_uri", *params.RedirectUri, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "uri"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Scope != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "scope", *params.Scope, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.State != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "state", *params.State, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.RequestUri != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "request_uri", *params.RequestUri, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.CodeChallenge != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "code_challenge", *params.CodeChallenge, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.CodeChallengeMethod != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "code_challenge_method", *params.CodeChallengeMethod, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Nonce != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "nonce", *params.Nonce, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.MaxAge != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "max_age", *params.MaxAge, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Resource != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "resource", *params.Resource, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Prompt != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "prompt", *params.Prompt, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostApiAuthOauth2AuthorizeRequest generates requests for PostApiAuthOauth2Authorize -func NewPostApiAuthOauth2AuthorizeRequest(server string, params *PostApiAuthOauth2AuthorizeParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/oauth2/authorize") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.ResponseType != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "response_type", *params.ResponseType, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "client_id", params.ClientId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - if params.RedirectUri != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "redirect_uri", *params.RedirectUri, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "uri"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Scope != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "scope", *params.Scope, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.State != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "state", *params.State, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.RequestUri != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "request_uri", *params.RequestUri, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.CodeChallenge != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "code_challenge", *params.CodeChallenge, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.CodeChallengeMethod != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "code_challenge_method", *params.CodeChallengeMethod, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Nonce != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "nonce", *params.Nonce, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.MaxAge != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "max_age", *params.MaxAge, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Resource != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "resource", *params.Resource, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "array", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.Prompt != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "prompt", *params.Prompt, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostApiAuthOauth2ClientRotateSecretRequest calls the generic PostApiAuthOauth2ClientRotateSecret builder with application/json body -func NewPostApiAuthOauth2ClientRotateSecretRequest(server string, body PostApiAuthOauth2ClientRotateSecretJSONRequestBody) (*http.Request, error) { +// NewCreateDynamicOAuthClientRegistrationRequest calls the generic CreateDynamicOAuthClientRegistration builder with application/json body +func NewCreateDynamicOAuthClientRegistrationRequest(server string, body CreateDynamicOAuthClientRegistrationJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOauth2ClientRotateSecretRequestWithBody(server, "application/json", bodyReader) + return NewCreateDynamicOAuthClientRegistrationRequestWithBody(server, "application/json", bodyReader) } -// NewPostApiAuthOauth2ClientRotateSecretRequestWithBody generates requests for PostApiAuthOauth2ClientRotateSecret with any type of body -func NewPostApiAuthOauth2ClientRotateSecretRequestWithBody(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("/api/auth/oauth2/client/rotate-secret") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOauth2ConsentRequest calls the generic PostApiAuthOauth2Consent builder with application/json body -func NewPostApiAuthOauth2ConsentRequest(server string, body PostApiAuthOauth2ConsentJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOauth2ConsentRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOauth2ConsentRequestWithBody generates requests for PostApiAuthOauth2Consent with any type of body -func NewPostApiAuthOauth2ConsentRequestWithBody(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("/api/auth/oauth2/consent") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOauth2ContinueRequest calls the generic PostApiAuthOauth2Continue builder with application/json body -func NewPostApiAuthOauth2ContinueRequest(server string, body PostApiAuthOauth2ContinueJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOauth2ContinueRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOauth2ContinueRequestWithBody generates requests for PostApiAuthOauth2Continue with any type of body -func NewPostApiAuthOauth2ContinueRequestWithBody(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("/api/auth/oauth2/continue") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOauth2CreateClientRequest calls the generic PostApiAuthOauth2CreateClient builder with application/json body -func NewPostApiAuthOauth2CreateClientRequest(server string, body PostApiAuthOauth2CreateClientJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOauth2CreateClientRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOauth2CreateClientRequestWithBody generates requests for PostApiAuthOauth2CreateClient with any type of body -func NewPostApiAuthOauth2CreateClientRequestWithBody(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("/api/auth/oauth2/create-client") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOauth2DeleteClientRequest calls the generic PostApiAuthOauth2DeleteClient builder with application/json body -func NewPostApiAuthOauth2DeleteClientRequest(server string, body PostApiAuthOauth2DeleteClientJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOauth2DeleteClientRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOauth2DeleteClientRequestWithBody generates requests for PostApiAuthOauth2DeleteClient with any type of body -func NewPostApiAuthOauth2DeleteClientRequestWithBody(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("/api/auth/oauth2/delete-client") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOauth2DeleteConsentRequest calls the generic PostApiAuthOauth2DeleteConsent builder with application/json body -func NewPostApiAuthOauth2DeleteConsentRequest(server string, body PostApiAuthOauth2DeleteConsentJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOauth2DeleteConsentRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOauth2DeleteConsentRequestWithBody generates requests for PostApiAuthOauth2DeleteConsent with any type of body -func NewPostApiAuthOauth2DeleteConsentRequestWithBody(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("/api/auth/oauth2/delete-consent") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetApiAuthOauth2EndSessionRequest generates requests for GetApiAuthOauth2EndSession -func NewGetApiAuthOauth2EndSessionRequest(server string, params *GetApiAuthOauth2EndSessionParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/oauth2/end-session") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.IdTokenHint != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "id_token_hint", *params.IdTokenHint, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.ClientId != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "client_id", *params.ClientId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.PostLogoutRedirectUri != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "post_logout_redirect_uri", *params.PostLogoutRedirectUri, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if params.State != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "state", *params.State, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetApiAuthOauth2GetClientRequest generates requests for GetApiAuthOauth2GetClient -func NewGetApiAuthOauth2GetClientRequest(server string, params *GetApiAuthOauth2GetClientParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/oauth2/get-client") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.ClientId != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "client_id", *params.ClientId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetApiAuthOauth2GetClientsRequest generates requests for GetApiAuthOauth2GetClients -func NewGetApiAuthOauth2GetClientsRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/oauth2/get-clients") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetApiAuthOauth2GetConsentRequest generates requests for GetApiAuthOauth2GetConsent -func NewGetApiAuthOauth2GetConsentRequest(server string, params *GetApiAuthOauth2GetConsentParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/oauth2/get-consent") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "id", *params.Id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetApiAuthOauth2GetConsentsRequest generates requests for GetApiAuthOauth2GetConsents -func NewGetApiAuthOauth2GetConsentsRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/oauth2/get-consents") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostApiAuthOauth2IntrospectRequest calls the generic PostApiAuthOauth2Introspect builder with application/json body -func NewPostApiAuthOauth2IntrospectRequest(server string, body PostApiAuthOauth2IntrospectJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOauth2IntrospectRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOauth2IntrospectRequestWithBody generates requests for PostApiAuthOauth2Introspect with any type of body -func NewPostApiAuthOauth2IntrospectRequestWithBody(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("/api/auth/oauth2/introspect") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOauth2ParRequest calls the generic PostApiAuthOauth2Par builder with application/json body -func NewPostApiAuthOauth2ParRequest(server string, body PostApiAuthOauth2ParJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOauth2ParRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOauth2ParRequestWithBody generates requests for PostApiAuthOauth2Par with any type of body -func NewPostApiAuthOauth2ParRequestWithBody(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("/api/auth/oauth2/par") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetApiAuthOauth2PublicClientRequest generates requests for GetApiAuthOauth2PublicClient -func NewGetApiAuthOauth2PublicClientRequest(server string, params *GetApiAuthOauth2PublicClientParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/oauth2/public-client") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.ClientId != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "client_id", *params.ClientId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostApiAuthOauth2PublicClientPreloginRequest calls the generic PostApiAuthOauth2PublicClientPrelogin builder with application/json body -func NewPostApiAuthOauth2PublicClientPreloginRequest(server string, body PostApiAuthOauth2PublicClientPreloginJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOauth2PublicClientPreloginRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOauth2PublicClientPreloginRequestWithBody generates requests for PostApiAuthOauth2PublicClientPrelogin with any type of body -func NewPostApiAuthOauth2PublicClientPreloginRequestWithBody(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("/api/auth/oauth2/public-client-prelogin") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOauth2RegisterRequest calls the generic PostApiAuthOauth2Register builder with application/json body -func NewPostApiAuthOauth2RegisterRequest(server string, body PostApiAuthOauth2RegisterJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOauth2RegisterRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOauth2RegisterRequestWithBody generates requests for PostApiAuthOauth2Register with any type of body -func NewPostApiAuthOauth2RegisterRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateDynamicOAuthClientRegistrationRequestWithBody generates requests for CreateDynamicOAuthClientRegistration with any type of body +func NewCreateDynamicOAuthClientRegistrationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -20053,1903 +14337,6 @@ func NewUpdateDynamicOAuthClientRegistrationRequestWithBody(server string, clien return req, nil } -// NewPostApiAuthOauth2RevokeRequest calls the generic PostApiAuthOauth2Revoke builder with application/json body -func NewPostApiAuthOauth2RevokeRequest(server string, body PostApiAuthOauth2RevokeJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOauth2RevokeRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOauth2RevokeRequestWithBody generates requests for PostApiAuthOauth2Revoke with any type of body -func NewPostApiAuthOauth2RevokeRequestWithBody(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("/api/auth/oauth2/revoke") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOauth2TokenRequest calls the generic PostApiAuthOauth2Token builder with application/json body -func NewPostApiAuthOauth2TokenRequest(server string, params *PostApiAuthOauth2TokenParams, body PostApiAuthOauth2TokenJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOauth2TokenRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostApiAuthOauth2TokenRequestWithBody generates requests for PostApiAuthOauth2Token with any type of body -func NewPostApiAuthOauth2TokenRequestWithBody(server string, params *PostApiAuthOauth2TokenParams, 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("/api/auth/oauth2/token") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.DPoP != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithOptions("simple", false, "DPoP", *params.DPoP, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - req.Header.Set("DPoP", headerParam0) - } - - } - - return req, nil -} - -// NewPostApiAuthOauth2UpdateClientRequest calls the generic PostApiAuthOauth2UpdateClient builder with application/json body -func NewPostApiAuthOauth2UpdateClientRequest(server string, body PostApiAuthOauth2UpdateClientJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOauth2UpdateClientRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOauth2UpdateClientRequestWithBody generates requests for PostApiAuthOauth2UpdateClient with any type of body -func NewPostApiAuthOauth2UpdateClientRequestWithBody(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("/api/auth/oauth2/update-client") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOauth2UpdateConsentRequest calls the generic PostApiAuthOauth2UpdateConsent builder with application/json body -func NewPostApiAuthOauth2UpdateConsentRequest(server string, body PostApiAuthOauth2UpdateConsentJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOauth2UpdateConsentRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOauth2UpdateConsentRequestWithBody generates requests for PostApiAuthOauth2UpdateConsent with any type of body -func NewPostApiAuthOauth2UpdateConsentRequestWithBody(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("/api/auth/oauth2/update-consent") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetApiAuthOauth2UserinfoRequest generates requests for GetApiAuthOauth2Userinfo -func NewGetApiAuthOauth2UserinfoRequest(server string, params *GetApiAuthOauth2UserinfoParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/oauth2/userinfo") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.Authorization != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithOptions("simple", false, "Authorization", *params.Authorization, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - req.Header.Set("Authorization", headerParam0) - } - - if params.DPoP != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithOptions("simple", false, "DPoP", *params.DPoP, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - req.Header.Set("DPoP", headerParam1) - } - - } - - return req, nil -} - -// NewPostApiAuthOauth2UserinfoRequest calls the generic PostApiAuthOauth2Userinfo builder with application/json body -func NewPostApiAuthOauth2UserinfoRequest(server string, params *PostApiAuthOauth2UserinfoParams, body PostApiAuthOauth2UserinfoJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOauth2UserinfoRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewPostApiAuthOauth2UserinfoRequestWithBody generates requests for PostApiAuthOauth2Userinfo with any type of body -func NewPostApiAuthOauth2UserinfoRequestWithBody(server string, params *PostApiAuthOauth2UserinfoParams, 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("/api/auth/oauth2/userinfo") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Authorization != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithOptions("simple", false, "Authorization", *params.Authorization, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - req.Header.Set("Authorization", headerParam0) - } - - if params.DPoP != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithOptions("simple", false, "DPoP", *params.DPoP, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - req.Header.Set("DPoP", headerParam1) - } - - } - - return req, nil -} - -// NewGetApiAuthOkRequest generates requests for GetApiAuthOk -func NewGetApiAuthOkRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/ok") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostApiAuthOrganizationAcceptInvitationRequest calls the generic PostApiAuthOrganizationAcceptInvitation builder with application/json body -func NewPostApiAuthOrganizationAcceptInvitationRequest(server string, body PostApiAuthOrganizationAcceptInvitationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOrganizationAcceptInvitationRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOrganizationAcceptInvitationRequestWithBody generates requests for PostApiAuthOrganizationAcceptInvitation with any type of body -func NewPostApiAuthOrganizationAcceptInvitationRequestWithBody(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("/api/auth/organization/accept-invitation") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOrganizationCancelInvitationRequest calls the generic PostApiAuthOrganizationCancelInvitation builder with application/json body -func NewPostApiAuthOrganizationCancelInvitationRequest(server string, body PostApiAuthOrganizationCancelInvitationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOrganizationCancelInvitationRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOrganizationCancelInvitationRequestWithBody generates requests for PostApiAuthOrganizationCancelInvitation with any type of body -func NewPostApiAuthOrganizationCancelInvitationRequestWithBody(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("/api/auth/organization/cancel-invitation") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOrganizationCheckSlugRequest calls the generic PostApiAuthOrganizationCheckSlug builder with application/json body -func NewPostApiAuthOrganizationCheckSlugRequest(server string, body PostApiAuthOrganizationCheckSlugJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOrganizationCheckSlugRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOrganizationCheckSlugRequestWithBody generates requests for PostApiAuthOrganizationCheckSlug with any type of body -func NewPostApiAuthOrganizationCheckSlugRequestWithBody(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("/api/auth/organization/check-slug") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOrganizationCreateRequest calls the generic PostApiAuthOrganizationCreate builder with application/json body -func NewPostApiAuthOrganizationCreateRequest(server string, body PostApiAuthOrganizationCreateJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOrganizationCreateRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOrganizationCreateRequestWithBody generates requests for PostApiAuthOrganizationCreate with any type of body -func NewPostApiAuthOrganizationCreateRequestWithBody(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("/api/auth/organization/create") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOrganizationDeleteRequest calls the generic PostApiAuthOrganizationDelete builder with application/json body -func NewPostApiAuthOrganizationDeleteRequest(server string, body PostApiAuthOrganizationDeleteJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOrganizationDeleteRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOrganizationDeleteRequestWithBody generates requests for PostApiAuthOrganizationDelete with any type of body -func NewPostApiAuthOrganizationDeleteRequestWithBody(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("/api/auth/organization/delete") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetApiAuthOrganizationGetActiveMemberRequest generates requests for GetApiAuthOrganizationGetActiveMember -func NewGetApiAuthOrganizationGetActiveMemberRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/organization/get-active-member") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetApiAuthOrganizationGetActiveMemberRoleRequest generates requests for GetApiAuthOrganizationGetActiveMemberRole -func NewGetApiAuthOrganizationGetActiveMemberRoleRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/organization/get-active-member-role") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetFullOrganizationRequest generates requests for GetFullOrganization -func NewGetFullOrganizationRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/organization/get-full-organization") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetApiAuthOrganizationGetInvitationRequest generates requests for GetApiAuthOrganizationGetInvitation -func NewGetApiAuthOrganizationGetInvitationRequest(server string, params *GetApiAuthOrganizationGetInvitationParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/organization/get-invitation") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "id", *params.Id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetOrganizationRequest generates requests for GetOrganization -func NewGetOrganizationRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/organization/get-organization") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostApiAuthOrganizationHasPermissionRequest calls the generic PostApiAuthOrganizationHasPermission builder with application/json body -func NewPostApiAuthOrganizationHasPermissionRequest(server string, body PostApiAuthOrganizationHasPermissionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOrganizationHasPermissionRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOrganizationHasPermissionRequestWithBody generates requests for PostApiAuthOrganizationHasPermission with any type of body -func NewPostApiAuthOrganizationHasPermissionRequestWithBody(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("/api/auth/organization/has-permission") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewCreateOrganizationInvitationRequest calls the generic CreateOrganizationInvitation builder with application/json body -func NewCreateOrganizationInvitationRequest(server string, body CreateOrganizationInvitationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateOrganizationInvitationRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreateOrganizationInvitationRequestWithBody generates requests for CreateOrganizationInvitation with any type of body -func NewCreateOrganizationInvitationRequestWithBody(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("/api/auth/organization/invite-member") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOrganizationLeaveRequest calls the generic PostApiAuthOrganizationLeave builder with application/json body -func NewPostApiAuthOrganizationLeaveRequest(server string, body PostApiAuthOrganizationLeaveJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOrganizationLeaveRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOrganizationLeaveRequestWithBody generates requests for PostApiAuthOrganizationLeave with any type of body -func NewPostApiAuthOrganizationLeaveRequestWithBody(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("/api/auth/organization/leave") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetApiAuthOrganizationListRequest generates requests for GetApiAuthOrganizationList -func NewGetApiAuthOrganizationListRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/organization/list") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetApiAuthOrganizationListInvitationsRequest generates requests for GetApiAuthOrganizationListInvitations -func NewGetApiAuthOrganizationListInvitationsRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/organization/list-invitations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetApiAuthOrganizationListMembersRequest generates requests for GetApiAuthOrganizationListMembers -func NewGetApiAuthOrganizationListMembersRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/organization/list-members") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetApiAuthOrganizationListUserInvitationsRequest generates requests for GetApiAuthOrganizationListUserInvitations -func NewGetApiAuthOrganizationListUserInvitationsRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/organization/list-user-invitations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostApiAuthOrganizationRejectInvitationRequest calls the generic PostApiAuthOrganizationRejectInvitation builder with application/json body -func NewPostApiAuthOrganizationRejectInvitationRequest(server string, body PostApiAuthOrganizationRejectInvitationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOrganizationRejectInvitationRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOrganizationRejectInvitationRequestWithBody generates requests for PostApiAuthOrganizationRejectInvitation with any type of body -func NewPostApiAuthOrganizationRejectInvitationRequestWithBody(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("/api/auth/organization/reject-invitation") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOrganizationRemoveMemberRequest calls the generic PostApiAuthOrganizationRemoveMember builder with application/json body -func NewPostApiAuthOrganizationRemoveMemberRequest(server string, body PostApiAuthOrganizationRemoveMemberJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOrganizationRemoveMemberRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOrganizationRemoveMemberRequestWithBody generates requests for PostApiAuthOrganizationRemoveMember with any type of body -func NewPostApiAuthOrganizationRemoveMemberRequestWithBody(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("/api/auth/organization/remove-member") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewSetActiveOrganizationRequest calls the generic SetActiveOrganization builder with application/json body -func NewSetActiveOrganizationRequest(server string, body SetActiveOrganizationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewSetActiveOrganizationRequestWithBody(server, "application/json", bodyReader) -} - -// NewSetActiveOrganizationRequestWithBody generates requests for SetActiveOrganization with any type of body -func NewSetActiveOrganizationRequestWithBody(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("/api/auth/organization/set-active") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthOrganizationUpdateRequest calls the generic PostApiAuthOrganizationUpdate builder with application/json body -func NewPostApiAuthOrganizationUpdateRequest(server string, body PostApiAuthOrganizationUpdateJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthOrganizationUpdateRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthOrganizationUpdateRequestWithBody generates requests for PostApiAuthOrganizationUpdate with any type of body -func NewPostApiAuthOrganizationUpdateRequestWithBody(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("/api/auth/organization/update") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewUpdateOrganizationMemberRoleRequest calls the generic UpdateOrganizationMemberRole builder with application/json body -func NewUpdateOrganizationMemberRoleRequest(server string, body UpdateOrganizationMemberRoleJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateOrganizationMemberRoleRequestWithBody(server, "application/json", bodyReader) -} - -// NewUpdateOrganizationMemberRoleRequestWithBody generates requests for UpdateOrganizationMemberRole with any type of body -func NewUpdateOrganizationMemberRoleRequestWithBody(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("/api/auth/organization/update-member-role") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthRefreshTokenRequest calls the generic PostApiAuthRefreshToken builder with application/json body -func NewPostApiAuthRefreshTokenRequest(server string, body PostApiAuthRefreshTokenJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthRefreshTokenRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthRefreshTokenRequestWithBody generates requests for PostApiAuthRefreshToken with any type of body -func NewPostApiAuthRefreshTokenRequestWithBody(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("/api/auth/refresh-token") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewRequestPasswordResetRequest calls the generic RequestPasswordReset builder with application/json body -func NewRequestPasswordResetRequest(server string, body RequestPasswordResetJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewRequestPasswordResetRequestWithBody(server, "application/json", bodyReader) -} - -// NewRequestPasswordResetRequestWithBody generates requests for RequestPasswordReset with any type of body -func NewRequestPasswordResetRequestWithBody(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("/api/auth/request-password-reset") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewResetPasswordRequest calls the generic ResetPassword builder with application/json body -func NewResetPasswordRequest(server string, body ResetPasswordJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewResetPasswordRequestWithBody(server, "application/json", bodyReader) -} - -// NewResetPasswordRequestWithBody generates requests for ResetPassword with any type of body -func NewResetPasswordRequestWithBody(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("/api/auth/reset-password") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewResetPasswordCallbackRequest generates requests for ResetPasswordCallback -func NewResetPasswordCallbackRequest(server string, token string, params *ResetPasswordCallbackParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "token", token, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/reset-password/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "callbackURL", params.CallbackURL, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostApiAuthRevokeOtherSessionsRequest calls the generic PostApiAuthRevokeOtherSessions builder with application/json body -func NewPostApiAuthRevokeOtherSessionsRequest(server string, body PostApiAuthRevokeOtherSessionsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthRevokeOtherSessionsRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthRevokeOtherSessionsRequestWithBody generates requests for PostApiAuthRevokeOtherSessions with any type of body -func NewPostApiAuthRevokeOtherSessionsRequestWithBody(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("/api/auth/revoke-other-sessions") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthRevokeSessionRequest calls the generic PostApiAuthRevokeSession builder with application/json body -func NewPostApiAuthRevokeSessionRequest(server string, body PostApiAuthRevokeSessionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthRevokeSessionRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthRevokeSessionRequestWithBody generates requests for PostApiAuthRevokeSession with any type of body -func NewPostApiAuthRevokeSessionRequestWithBody(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("/api/auth/revoke-session") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthRevokeSessionsRequest calls the generic PostApiAuthRevokeSessions builder with application/json body -func NewPostApiAuthRevokeSessionsRequest(server string, body PostApiAuthRevokeSessionsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthRevokeSessionsRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthRevokeSessionsRequestWithBody generates requests for PostApiAuthRevokeSessions with any type of body -func NewPostApiAuthRevokeSessionsRequestWithBody(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("/api/auth/revoke-sessions") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewSendVerificationEmailRequest calls the generic SendVerificationEmail builder with application/json body -func NewSendVerificationEmailRequest(server string, body SendVerificationEmailJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewSendVerificationEmailRequestWithBody(server, "application/json", bodyReader) -} - -// NewSendVerificationEmailRequestWithBody generates requests for SendVerificationEmail with any type of body -func NewSendVerificationEmailRequestWithBody(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("/api/auth/send-verification-email") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewSignInEmailRequest calls the generic SignInEmail builder with application/json body -func NewSignInEmailRequest(server string, body SignInEmailJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewSignInEmailRequestWithBody(server, "application/json", bodyReader) -} - -// NewSignInEmailRequestWithBody generates requests for SignInEmail with any type of body -func NewSignInEmailRequestWithBody(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("/api/auth/sign-in/email") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewSocialSignInRequest calls the generic SocialSignIn builder with application/json body -func NewSocialSignInRequest(server string, body SocialSignInJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewSocialSignInRequestWithBody(server, "application/json", bodyReader) -} - -// NewSocialSignInRequestWithBody generates requests for SocialSignIn with any type of body -func NewSocialSignInRequestWithBody(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("/api/auth/sign-in/social") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostApiAuthSignInUsernameRequest calls the generic PostApiAuthSignInUsername builder with application/json body -func NewPostApiAuthSignInUsernameRequest(server string, body PostApiAuthSignInUsernameJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthSignInUsernameRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthSignInUsernameRequestWithBody generates requests for PostApiAuthSignInUsername with any type of body -func NewPostApiAuthSignInUsernameRequestWithBody(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("/api/auth/sign-in/username") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewSignOutRequest calls the generic SignOut builder with application/json body -func NewSignOutRequest(server string, body SignOutJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewSignOutRequestWithBody(server, "application/json", bodyReader) -} - -// NewSignOutRequestWithBody generates requests for SignOut with any type of body -func NewSignOutRequestWithBody(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("/api/auth/sign-out") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewSignUpWithEmailAndPasswordRequest calls the generic SignUpWithEmailAndPassword builder with application/json body -func NewSignUpWithEmailAndPasswordRequest(server string, body SignUpWithEmailAndPasswordJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewSignUpWithEmailAndPasswordRequestWithBody(server, "application/json", bodyReader) -} - -// NewSignUpWithEmailAndPasswordRequestWithBody generates requests for SignUpWithEmailAndPassword with any type of body -func NewSignUpWithEmailAndPasswordRequestWithBody(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("/api/auth/sign-up/email") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetJSONWebTokenRequest generates requests for GetJSONWebToken -func NewGetJSONWebTokenRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/token") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostApiAuthUnlinkAccountRequest calls the generic PostApiAuthUnlinkAccount builder with application/json body -func NewPostApiAuthUnlinkAccountRequest(server string, body PostApiAuthUnlinkAccountJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostApiAuthUnlinkAccountRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostApiAuthUnlinkAccountRequestWithBody generates requests for PostApiAuthUnlinkAccount with any type of body -func NewPostApiAuthUnlinkAccountRequestWithBody(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("/api/auth/unlink-account") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewUpdateSessionRequest calls the generic UpdateSession builder with application/json body -func NewUpdateSessionRequest(server string, body UpdateSessionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateSessionRequestWithBody(server, "application/json", bodyReader) -} - -// NewUpdateSessionRequestWithBody generates requests for UpdateSession with any type of body -func NewUpdateSessionRequestWithBody(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("/api/auth/update-session") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewUpdateUserRequest calls the generic UpdateUser builder with application/json body -func NewUpdateUserRequest(server string, body UpdateUserJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateUserRequestWithBody(server, "application/json", bodyReader) -} - -// NewUpdateUserRequestWithBody generates requests for UpdateUser with any type of body -func NewUpdateUserRequestWithBody(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("/api/auth/update-user") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetApiAuthVerifyEmailRequest generates requests for GetApiAuthVerifyEmail -func NewGetApiAuthVerifyEmailRequest(server string, params *GetApiAuthVerifyEmailParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/auth/verify-email") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "token", params.Token, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - if params.CallbackURL != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "callbackURL", *params.CallbackURL, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } - - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") - } - - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewVerifyPasswordRequest calls the generic VerifyPassword builder with application/json body -func NewVerifyPasswordRequest(server string, body VerifyPasswordJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewVerifyPasswordRequestWithBody(server, "application/json", bodyReader) -} - -// NewVerifyPasswordRequestWithBody generates requests for VerifyPassword with any type of body -func NewVerifyPasswordRequestWithBody(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("/api/auth/verify-password") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - // NewListBackgroundJobsRequest generates requests for ListBackgroundJobs func NewListBackgroundJobsRequest(server string, params *ListBackgroundJobsParams) (*http.Request, error) { var err error @@ -28799,259 +21186,23 @@ func WithBaseURL(baseURL string) ClientOption { // ClientWithResponsesInterface is the interface specification for the client with responses above. type ClientWithResponsesInterface interface { - // GetApiAuthAccountInfoWithResponse request - GetApiAuthAccountInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthAccountInfoResponse, error) + // CreateDeviceAuthorizationWithBodyWithResponse request with any body + CreateDeviceAuthorizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeviceAuthorizationResponse, error) - // BanUserWithBodyWithResponse request with any body - BanUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BanUserResponse, error) + CreateDeviceAuthorizationWithResponse(ctx context.Context, body CreateDeviceAuthorizationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDeviceAuthorizationResponse, error) - BanUserWithResponse(ctx context.Context, body BanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*BanUserResponse, error) + // CreateDeviceAccessTokenWithBodyWithResponse request with any body + CreateDeviceAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeviceAccessTokenResponse, error) - // CreateUserWithBodyWithResponse request with any body - CreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error) - - CreateUserWithResponse(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error) - - // GetUserWithResponse request - GetUserWithResponse(ctx context.Context, params *GetUserParams, reqEditors ...RequestEditorFn) (*GetUserResponse, error) - - // PostApiAuthAdminHasPermissionWithBodyWithResponse request with any body - PostApiAuthAdminHasPermissionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthAdminHasPermissionResponse, error) - - PostApiAuthAdminHasPermissionWithResponse(ctx context.Context, body PostApiAuthAdminHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthAdminHasPermissionResponse, error) - - // ImpersonateUserWithBodyWithResponse request with any body - ImpersonateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ImpersonateUserResponse, error) - - ImpersonateUserWithResponse(ctx context.Context, body ImpersonateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*ImpersonateUserResponse, error) - - // AdminListUserSessionsWithBodyWithResponse request with any body - AdminListUserSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminListUserSessionsResponse, error) - - AdminListUserSessionsWithResponse(ctx context.Context, body AdminListUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminListUserSessionsResponse, error) - - // ListUsersWithResponse request - ListUsersWithResponse(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*ListUsersResponse, error) - - // RemoveUserWithBodyWithResponse request with any body - RemoveUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveUserResponse, error) - - RemoveUserWithResponse(ctx context.Context, body RemoveUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveUserResponse, error) - - // RevokeUserSessionWithBodyWithResponse request with any body - RevokeUserSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeUserSessionResponse, error) - - RevokeUserSessionWithResponse(ctx context.Context, body RevokeUserSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeUserSessionResponse, error) - - // RevokeUserSessionsWithBodyWithResponse request with any body - RevokeUserSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeUserSessionsResponse, error) - - RevokeUserSessionsWithResponse(ctx context.Context, body RevokeUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeUserSessionsResponse, error) - - // SetUserRoleWithBodyWithResponse request with any body - SetUserRoleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetUserRoleResponse, error) - - SetUserRoleWithResponse(ctx context.Context, body SetUserRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*SetUserRoleResponse, error) - - // SetUserPasswordWithBodyWithResponse request with any body - SetUserPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetUserPasswordResponse, error) - - SetUserPasswordWithResponse(ctx context.Context, body SetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*SetUserPasswordResponse, error) - - // PostApiAuthAdminStopImpersonatingWithResponse request - PostApiAuthAdminStopImpersonatingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostApiAuthAdminStopImpersonatingResponse, error) - - // UnbanUserWithBodyWithResponse request with any body - UnbanUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UnbanUserResponse, error) - - UnbanUserWithResponse(ctx context.Context, body UnbanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UnbanUserResponse, error) - - // AdminUpdateUserWithBodyWithResponse request with any body - AdminUpdateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminUpdateUserResponse, error) - - AdminUpdateUserWithResponse(ctx context.Context, body AdminUpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminUpdateUserResponse, error) - - // PostApiAuthApiKeyCreateWithBodyWithResponse request with any body - PostApiAuthApiKeyCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyCreateResponse, error) - - PostApiAuthApiKeyCreateWithResponse(ctx context.Context, body PostApiAuthApiKeyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyCreateResponse, error) - - // PostApiAuthApiKeyDeleteWithBodyWithResponse request with any body - PostApiAuthApiKeyDeleteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyDeleteResponse, error) - - PostApiAuthApiKeyDeleteWithResponse(ctx context.Context, body PostApiAuthApiKeyDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyDeleteResponse, error) - - // GetApiAuthApiKeyGetWithResponse request - GetApiAuthApiKeyGetWithResponse(ctx context.Context, params *GetApiAuthApiKeyGetParams, reqEditors ...RequestEditorFn) (*GetApiAuthApiKeyGetResponse, error) - - // GetApiAuthApiKeyListWithResponse request - GetApiAuthApiKeyListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthApiKeyListResponse, error) - - // PostApiAuthApiKeyUpdateWithBodyWithResponse request with any body - PostApiAuthApiKeyUpdateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyUpdateResponse, error) - - PostApiAuthApiKeyUpdateWithResponse(ctx context.Context, body PostApiAuthApiKeyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyUpdateResponse, error) - - // GetApiAuthCallbackIdWithResponse request - GetApiAuthCallbackIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetApiAuthCallbackIdResponse, error) - - // PostApiAuthCallbackIdWithBodyWithResponse request with any body - PostApiAuthCallbackIdWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthCallbackIdResponse, error) - - PostApiAuthCallbackIdWithResponse(ctx context.Context, id string, body PostApiAuthCallbackIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthCallbackIdResponse, error) - - // ChangeEmailWithBodyWithResponse request with any body - ChangeEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangeEmailResponse, error) - - ChangeEmailWithResponse(ctx context.Context, body ChangeEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*ChangeEmailResponse, error) - - // ChangePasswordWithBodyWithResponse request with any body - ChangePasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangePasswordResponse, error) - - ChangePasswordWithResponse(ctx context.Context, body ChangePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ChangePasswordResponse, error) - - // DeleteUserWithBodyWithResponse request with any body - DeleteUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) - - DeleteUserWithResponse(ctx context.Context, body DeleteUserJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) - - // GetApiAuthDeleteUserCallbackWithResponse request - GetApiAuthDeleteUserCallbackWithResponse(ctx context.Context, params *GetApiAuthDeleteUserCallbackParams, reqEditors ...RequestEditorFn) (*GetApiAuthDeleteUserCallbackResponse, error) - - // GetApiAuthDeviceWithResponse request - GetApiAuthDeviceWithResponse(ctx context.Context, params *GetApiAuthDeviceParams, reqEditors ...RequestEditorFn) (*GetApiAuthDeviceResponse, error) - - // PostApiAuthDeviceApproveWithBodyWithResponse request with any body - PostApiAuthDeviceApproveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceApproveResponse, error) - - PostApiAuthDeviceApproveWithResponse(ctx context.Context, body PostApiAuthDeviceApproveJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceApproveResponse, error) - - // PostApiAuthDeviceCodeWithBodyWithResponse request with any body - PostApiAuthDeviceCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceCodeResponse, error) - - PostApiAuthDeviceCodeWithResponse(ctx context.Context, body PostApiAuthDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceCodeResponse, error) - - // PostApiAuthDeviceDenyWithBodyWithResponse request with any body - PostApiAuthDeviceDenyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceDenyResponse, error) - - PostApiAuthDeviceDenyWithResponse(ctx context.Context, body PostApiAuthDeviceDenyJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceDenyResponse, error) - - // PostApiAuthDeviceTokenWithBodyWithResponse request with any body - PostApiAuthDeviceTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceTokenResponse, error) - - PostApiAuthDeviceTokenWithResponse(ctx context.Context, body PostApiAuthDeviceTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceTokenResponse, error) - - // GetApiAuthErrorWithResponse request - GetApiAuthErrorWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthErrorResponse, error) - - // PostApiAuthGetAccessTokenWithBodyWithResponse request with any body - PostApiAuthGetAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthGetAccessTokenResponse, error) - - PostApiAuthGetAccessTokenWithResponse(ctx context.Context, body PostApiAuthGetAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthGetAccessTokenResponse, error) - - // GetSessionWithResponse request - GetSessionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSessionResponse, error) - - // GetSessionPostWithBodyWithResponse request with any body - GetSessionPostWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetSessionPostResponse, error) - - GetSessionPostWithResponse(ctx context.Context, body GetSessionPostJSONRequestBody, reqEditors ...RequestEditorFn) (*GetSessionPostResponse, error) - - // PostApiAuthIsUsernameAvailableWithBodyWithResponse request with any body - PostApiAuthIsUsernameAvailableWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthIsUsernameAvailableResponse, error) - - PostApiAuthIsUsernameAvailableWithResponse(ctx context.Context, body PostApiAuthIsUsernameAvailableJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthIsUsernameAvailableResponse, error) - - // GetJSONWebKeySetWithResponse request - GetJSONWebKeySetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJSONWebKeySetResponse, error) - - // LinkSocialAccountWithBodyWithResponse request with any body - LinkSocialAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LinkSocialAccountResponse, error) - - LinkSocialAccountWithResponse(ctx context.Context, body LinkSocialAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*LinkSocialAccountResponse, error) - - // ListUserAccountsWithResponse request - ListUserAccountsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUserAccountsResponse, error) - - // ListUserSessionsWithResponse request - ListUserSessionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUserSessionsResponse, error) + CreateDeviceAccessTokenWithResponse(ctx context.Context, body CreateDeviceAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDeviceAccessTokenResponse, error) // ListAuthorizationDetailsCatalogWithResponse request ListAuthorizationDetailsCatalogWithResponse(ctx context.Context, params *ListAuthorizationDetailsCatalogParams, reqEditors ...RequestEditorFn) (*ListAuthorizationDetailsCatalogResponse, error) - // GetApiAuthOauth2AuthorizeWithResponse request - GetApiAuthOauth2AuthorizeWithResponse(ctx context.Context, params *GetApiAuthOauth2AuthorizeParams, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2AuthorizeResponse, error) + // CreateDynamicOAuthClientRegistrationWithBodyWithResponse request with any body + CreateDynamicOAuthClientRegistrationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDynamicOAuthClientRegistrationResponse, error) - // PostApiAuthOauth2AuthorizeWithResponse request - PostApiAuthOauth2AuthorizeWithResponse(ctx context.Context, params *PostApiAuthOauth2AuthorizeParams, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2AuthorizeResponse, error) - - // PostApiAuthOauth2ClientRotateSecretWithBodyWithResponse request with any body - PostApiAuthOauth2ClientRotateSecretWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ClientRotateSecretResponse, error) - - PostApiAuthOauth2ClientRotateSecretWithResponse(ctx context.Context, body PostApiAuthOauth2ClientRotateSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ClientRotateSecretResponse, error) - - // PostApiAuthOauth2ConsentWithBodyWithResponse request with any body - PostApiAuthOauth2ConsentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ConsentResponse, error) - - PostApiAuthOauth2ConsentWithResponse(ctx context.Context, body PostApiAuthOauth2ConsentJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ConsentResponse, error) - - // PostApiAuthOauth2ContinueWithBodyWithResponse request with any body - PostApiAuthOauth2ContinueWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ContinueResponse, error) - - PostApiAuthOauth2ContinueWithResponse(ctx context.Context, body PostApiAuthOauth2ContinueJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ContinueResponse, error) - - // PostApiAuthOauth2CreateClientWithBodyWithResponse request with any body - PostApiAuthOauth2CreateClientWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2CreateClientResponse, error) - - PostApiAuthOauth2CreateClientWithResponse(ctx context.Context, body PostApiAuthOauth2CreateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2CreateClientResponse, error) - - // PostApiAuthOauth2DeleteClientWithBodyWithResponse request with any body - PostApiAuthOauth2DeleteClientWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2DeleteClientResponse, error) - - PostApiAuthOauth2DeleteClientWithResponse(ctx context.Context, body PostApiAuthOauth2DeleteClientJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2DeleteClientResponse, error) - - // PostApiAuthOauth2DeleteConsentWithBodyWithResponse request with any body - PostApiAuthOauth2DeleteConsentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2DeleteConsentResponse, error) - - PostApiAuthOauth2DeleteConsentWithResponse(ctx context.Context, body PostApiAuthOauth2DeleteConsentJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2DeleteConsentResponse, error) - - // GetApiAuthOauth2EndSessionWithResponse request - GetApiAuthOauth2EndSessionWithResponse(ctx context.Context, params *GetApiAuthOauth2EndSessionParams, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2EndSessionResponse, error) - - // GetApiAuthOauth2GetClientWithResponse request - GetApiAuthOauth2GetClientWithResponse(ctx context.Context, params *GetApiAuthOauth2GetClientParams, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2GetClientResponse, error) - - // GetApiAuthOauth2GetClientsWithResponse request - GetApiAuthOauth2GetClientsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2GetClientsResponse, error) - - // GetApiAuthOauth2GetConsentWithResponse request - GetApiAuthOauth2GetConsentWithResponse(ctx context.Context, params *GetApiAuthOauth2GetConsentParams, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2GetConsentResponse, error) - - // GetApiAuthOauth2GetConsentsWithResponse request - GetApiAuthOauth2GetConsentsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2GetConsentsResponse, error) - - // PostApiAuthOauth2IntrospectWithBodyWithResponse request with any body - PostApiAuthOauth2IntrospectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2IntrospectResponse, error) - - PostApiAuthOauth2IntrospectWithResponse(ctx context.Context, body PostApiAuthOauth2IntrospectJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2IntrospectResponse, error) - - // PostApiAuthOauth2ParWithBodyWithResponse request with any body - PostApiAuthOauth2ParWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ParResponse, error) - - PostApiAuthOauth2ParWithResponse(ctx context.Context, body PostApiAuthOauth2ParJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ParResponse, error) - - // GetApiAuthOauth2PublicClientWithResponse request - GetApiAuthOauth2PublicClientWithResponse(ctx context.Context, params *GetApiAuthOauth2PublicClientParams, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2PublicClientResponse, error) - - // PostApiAuthOauth2PublicClientPreloginWithBodyWithResponse request with any body - PostApiAuthOauth2PublicClientPreloginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2PublicClientPreloginResponse, error) - - PostApiAuthOauth2PublicClientPreloginWithResponse(ctx context.Context, body PostApiAuthOauth2PublicClientPreloginJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2PublicClientPreloginResponse, error) - - // PostApiAuthOauth2RegisterWithBodyWithResponse request with any body - PostApiAuthOauth2RegisterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2RegisterResponse, error) - - PostApiAuthOauth2RegisterWithResponse(ctx context.Context, body PostApiAuthOauth2RegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2RegisterResponse, error) + CreateDynamicOAuthClientRegistrationWithResponse(ctx context.Context, body CreateDynamicOAuthClientRegistrationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDynamicOAuthClientRegistrationResponse, error) // DeleteDynamicOAuthClientRegistrationWithResponse request DeleteDynamicOAuthClientRegistrationWithResponse(ctx context.Context, clientId string, reqEditors ...RequestEditorFn) (*DeleteDynamicOAuthClientRegistrationResponse, error) @@ -29064,218 +21215,6 @@ type ClientWithResponsesInterface interface { UpdateDynamicOAuthClientRegistrationWithResponse(ctx context.Context, clientId string, body UpdateDynamicOAuthClientRegistrationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDynamicOAuthClientRegistrationResponse, error) - // PostApiAuthOauth2RevokeWithBodyWithResponse request with any body - PostApiAuthOauth2RevokeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2RevokeResponse, error) - - PostApiAuthOauth2RevokeWithResponse(ctx context.Context, body PostApiAuthOauth2RevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2RevokeResponse, error) - - // PostApiAuthOauth2TokenWithBodyWithResponse request with any body - PostApiAuthOauth2TokenWithBodyWithResponse(ctx context.Context, params *PostApiAuthOauth2TokenParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2TokenResponse, error) - - PostApiAuthOauth2TokenWithResponse(ctx context.Context, params *PostApiAuthOauth2TokenParams, body PostApiAuthOauth2TokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2TokenResponse, error) - - // PostApiAuthOauth2UpdateClientWithBodyWithResponse request with any body - PostApiAuthOauth2UpdateClientWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2UpdateClientResponse, error) - - PostApiAuthOauth2UpdateClientWithResponse(ctx context.Context, body PostApiAuthOauth2UpdateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2UpdateClientResponse, error) - - // PostApiAuthOauth2UpdateConsentWithBodyWithResponse request with any body - PostApiAuthOauth2UpdateConsentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2UpdateConsentResponse, error) - - PostApiAuthOauth2UpdateConsentWithResponse(ctx context.Context, body PostApiAuthOauth2UpdateConsentJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2UpdateConsentResponse, error) - - // GetApiAuthOauth2UserinfoWithResponse request - GetApiAuthOauth2UserinfoWithResponse(ctx context.Context, params *GetApiAuthOauth2UserinfoParams, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2UserinfoResponse, error) - - // PostApiAuthOauth2UserinfoWithBodyWithResponse request with any body - PostApiAuthOauth2UserinfoWithBodyWithResponse(ctx context.Context, params *PostApiAuthOauth2UserinfoParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2UserinfoResponse, error) - - PostApiAuthOauth2UserinfoWithResponse(ctx context.Context, params *PostApiAuthOauth2UserinfoParams, body PostApiAuthOauth2UserinfoJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2UserinfoResponse, error) - - // GetApiAuthOkWithResponse request - GetApiAuthOkWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOkResponse, error) - - // PostApiAuthOrganizationAcceptInvitationWithBodyWithResponse request with any body - PostApiAuthOrganizationAcceptInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationAcceptInvitationResponse, error) - - PostApiAuthOrganizationAcceptInvitationWithResponse(ctx context.Context, body PostApiAuthOrganizationAcceptInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationAcceptInvitationResponse, error) - - // PostApiAuthOrganizationCancelInvitationWithBodyWithResponse request with any body - PostApiAuthOrganizationCancelInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCancelInvitationResponse, error) - - PostApiAuthOrganizationCancelInvitationWithResponse(ctx context.Context, body PostApiAuthOrganizationCancelInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCancelInvitationResponse, error) - - // PostApiAuthOrganizationCheckSlugWithBodyWithResponse request with any body - PostApiAuthOrganizationCheckSlugWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCheckSlugResponse, error) - - PostApiAuthOrganizationCheckSlugWithResponse(ctx context.Context, body PostApiAuthOrganizationCheckSlugJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCheckSlugResponse, error) - - // PostApiAuthOrganizationCreateWithBodyWithResponse request with any body - PostApiAuthOrganizationCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCreateResponse, error) - - PostApiAuthOrganizationCreateWithResponse(ctx context.Context, body PostApiAuthOrganizationCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCreateResponse, error) - - // PostApiAuthOrganizationDeleteWithBodyWithResponse request with any body - PostApiAuthOrganizationDeleteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationDeleteResponse, error) - - PostApiAuthOrganizationDeleteWithResponse(ctx context.Context, body PostApiAuthOrganizationDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationDeleteResponse, error) - - // GetApiAuthOrganizationGetActiveMemberWithResponse request - GetApiAuthOrganizationGetActiveMemberWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationGetActiveMemberResponse, error) - - // GetApiAuthOrganizationGetActiveMemberRoleWithResponse request - GetApiAuthOrganizationGetActiveMemberRoleWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationGetActiveMemberRoleResponse, error) - - // GetFullOrganizationWithResponse request - GetFullOrganizationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetFullOrganizationResponse, error) - - // GetApiAuthOrganizationGetInvitationWithResponse request - GetApiAuthOrganizationGetInvitationWithResponse(ctx context.Context, params *GetApiAuthOrganizationGetInvitationParams, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationGetInvitationResponse, error) - - // GetOrganizationWithResponse request - GetOrganizationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOrganizationResponse, error) - - // PostApiAuthOrganizationHasPermissionWithBodyWithResponse request with any body - PostApiAuthOrganizationHasPermissionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationHasPermissionResponse, error) - - PostApiAuthOrganizationHasPermissionWithResponse(ctx context.Context, body PostApiAuthOrganizationHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationHasPermissionResponse, error) - - // CreateOrganizationInvitationWithBodyWithResponse request with any body - CreateOrganizationInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrganizationInvitationResponse, error) - - CreateOrganizationInvitationWithResponse(ctx context.Context, body CreateOrganizationInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrganizationInvitationResponse, error) - - // PostApiAuthOrganizationLeaveWithBodyWithResponse request with any body - PostApiAuthOrganizationLeaveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationLeaveResponse, error) - - PostApiAuthOrganizationLeaveWithResponse(ctx context.Context, body PostApiAuthOrganizationLeaveJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationLeaveResponse, error) - - // GetApiAuthOrganizationListWithResponse request - GetApiAuthOrganizationListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListResponse, error) - - // GetApiAuthOrganizationListInvitationsWithResponse request - GetApiAuthOrganizationListInvitationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListInvitationsResponse, error) - - // GetApiAuthOrganizationListMembersWithResponse request - GetApiAuthOrganizationListMembersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListMembersResponse, error) - - // GetApiAuthOrganizationListUserInvitationsWithResponse request - GetApiAuthOrganizationListUserInvitationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListUserInvitationsResponse, error) - - // PostApiAuthOrganizationRejectInvitationWithBodyWithResponse request with any body - PostApiAuthOrganizationRejectInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRejectInvitationResponse, error) - - PostApiAuthOrganizationRejectInvitationWithResponse(ctx context.Context, body PostApiAuthOrganizationRejectInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRejectInvitationResponse, error) - - // PostApiAuthOrganizationRemoveMemberWithBodyWithResponse request with any body - PostApiAuthOrganizationRemoveMemberWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRemoveMemberResponse, error) - - PostApiAuthOrganizationRemoveMemberWithResponse(ctx context.Context, body PostApiAuthOrganizationRemoveMemberJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRemoveMemberResponse, error) - - // SetActiveOrganizationWithBodyWithResponse request with any body - SetActiveOrganizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetActiveOrganizationResponse, error) - - SetActiveOrganizationWithResponse(ctx context.Context, body SetActiveOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*SetActiveOrganizationResponse, error) - - // PostApiAuthOrganizationUpdateWithBodyWithResponse request with any body - PostApiAuthOrganizationUpdateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationUpdateResponse, error) - - PostApiAuthOrganizationUpdateWithResponse(ctx context.Context, body PostApiAuthOrganizationUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationUpdateResponse, error) - - // UpdateOrganizationMemberRoleWithBodyWithResponse request with any body - UpdateOrganizationMemberRoleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOrganizationMemberRoleResponse, error) - - UpdateOrganizationMemberRoleWithResponse(ctx context.Context, body UpdateOrganizationMemberRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOrganizationMemberRoleResponse, error) - - // PostApiAuthRefreshTokenWithBodyWithResponse request with any body - PostApiAuthRefreshTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRefreshTokenResponse, error) - - PostApiAuthRefreshTokenWithResponse(ctx context.Context, body PostApiAuthRefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRefreshTokenResponse, error) - - // RequestPasswordResetWithBodyWithResponse request with any body - RequestPasswordResetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestPasswordResetResponse, error) - - RequestPasswordResetWithResponse(ctx context.Context, body RequestPasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestPasswordResetResponse, error) - - // ResetPasswordWithBodyWithResponse request with any body - ResetPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResetPasswordResponse, error) - - ResetPasswordWithResponse(ctx context.Context, body ResetPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ResetPasswordResponse, error) - - // ResetPasswordCallbackWithResponse request - ResetPasswordCallbackWithResponse(ctx context.Context, token string, params *ResetPasswordCallbackParams, reqEditors ...RequestEditorFn) (*ResetPasswordCallbackResponse, error) - - // PostApiAuthRevokeOtherSessionsWithBodyWithResponse request with any body - PostApiAuthRevokeOtherSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeOtherSessionsResponse, error) - - PostApiAuthRevokeOtherSessionsWithResponse(ctx context.Context, body PostApiAuthRevokeOtherSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeOtherSessionsResponse, error) - - // PostApiAuthRevokeSessionWithBodyWithResponse request with any body - PostApiAuthRevokeSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionResponse, error) - - PostApiAuthRevokeSessionWithResponse(ctx context.Context, body PostApiAuthRevokeSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionResponse, error) - - // PostApiAuthRevokeSessionsWithBodyWithResponse request with any body - PostApiAuthRevokeSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionsResponse, error) - - PostApiAuthRevokeSessionsWithResponse(ctx context.Context, body PostApiAuthRevokeSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionsResponse, error) - - // SendVerificationEmailWithBodyWithResponse request with any body - SendVerificationEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendVerificationEmailResponse, error) - - SendVerificationEmailWithResponse(ctx context.Context, body SendVerificationEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*SendVerificationEmailResponse, error) - - // SignInEmailWithBodyWithResponse request with any body - SignInEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignInEmailResponse, error) - - SignInEmailWithResponse(ctx context.Context, body SignInEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*SignInEmailResponse, error) - - // SocialSignInWithBodyWithResponse request with any body - SocialSignInWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SocialSignInResponse, error) - - SocialSignInWithResponse(ctx context.Context, body SocialSignInJSONRequestBody, reqEditors ...RequestEditorFn) (*SocialSignInResponse, error) - - // PostApiAuthSignInUsernameWithBodyWithResponse request with any body - PostApiAuthSignInUsernameWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthSignInUsernameResponse, error) - - PostApiAuthSignInUsernameWithResponse(ctx context.Context, body PostApiAuthSignInUsernameJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthSignInUsernameResponse, error) - - // SignOutWithBodyWithResponse request with any body - SignOutWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignOutResponse, error) - - SignOutWithResponse(ctx context.Context, body SignOutJSONRequestBody, reqEditors ...RequestEditorFn) (*SignOutResponse, error) - - // SignUpWithEmailAndPasswordWithBodyWithResponse request with any body - SignUpWithEmailAndPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignUpWithEmailAndPasswordResponse, error) - - SignUpWithEmailAndPasswordWithResponse(ctx context.Context, body SignUpWithEmailAndPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*SignUpWithEmailAndPasswordResponse, error) - - // GetJSONWebTokenWithResponse request - GetJSONWebTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJSONWebTokenResponse, error) - - // PostApiAuthUnlinkAccountWithBodyWithResponse request with any body - PostApiAuthUnlinkAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthUnlinkAccountResponse, error) - - PostApiAuthUnlinkAccountWithResponse(ctx context.Context, body PostApiAuthUnlinkAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthUnlinkAccountResponse, error) - - // UpdateSessionWithBodyWithResponse request with any body - UpdateSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSessionResponse, error) - - UpdateSessionWithResponse(ctx context.Context, body UpdateSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSessionResponse, error) - - // UpdateUserWithBodyWithResponse request with any body - UpdateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error) - - UpdateUserWithResponse(ctx context.Context, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error) - - // GetApiAuthVerifyEmailWithResponse request - GetApiAuthVerifyEmailWithResponse(ctx context.Context, params *GetApiAuthVerifyEmailParams, reqEditors ...RequestEditorFn) (*GetApiAuthVerifyEmailResponse, error) - - // VerifyPasswordWithBodyWithResponse request with any body - VerifyPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyPasswordResponse, error) - - VerifyPasswordWithResponse(ctx context.Context, body VerifyPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyPasswordResponse, error) - // ListBackgroundJobsWithResponse request ListBackgroundJobsWithResponse(ctx context.Context, params *ListBackgroundJobsParams, reqEditors ...RequestEditorFn) (*ListBackgroundJobsResponse, error) @@ -29850,1752 +21789,7 @@ type ClientWithResponsesInterface interface { GetUserProfileWithResponse(ctx context.Context, username string, reqEditors ...RequestEditorFn) (*GetUserProfileResponse, error) } -type GetApiAuthAccountInfoResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Account struct { - Id string `json:"id"` - Issuer string `json:"issuer"` - ProviderAccountId string `json:"providerAccountId"` - ProviderId string `json:"providerId"` - } `json:"account"` - Data map[string]interface{} `json:"data"` - User struct { - Email *string `json:"email,omitempty"` - EmailVerified bool `json:"emailVerified"` - Image *string `json:"image,omitempty"` - Name *string `json:"name,omitempty"` - } `json:"user"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthAccountInfoResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthAccountInfoResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthAccountInfoResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type BanUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - User *User `json:"user,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r BanUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r BanUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r BanUserResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type CreateUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - User *User `json:"user,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r CreateUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r CreateUserResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - User *User `json:"user,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetUserResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthAdminHasPermissionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Error *string `json:"error,omitempty"` - Success bool `json:"success"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthAdminHasPermissionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthAdminHasPermissionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthAdminHasPermissionResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ImpersonateUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Session *Session `json:"session,omitempty"` - User *User `json:"user,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r ImpersonateUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ImpersonateUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ImpersonateUserResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type AdminListUserSessionsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Sessions *[]Session `json:"sessions,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r AdminListUserSessionsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r AdminListUserSessionsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r AdminListUserSessionsResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ListUsersResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Limit *float32 `json:"limit,omitempty"` - Offset *float32 `json:"offset,omitempty"` - Total float32 `json:"total"` - Users []User `json:"users"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r ListUsersResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListUsersResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListUsersResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type RemoveUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Success *bool `json:"success,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r RemoveUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r RemoveUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r RemoveUserResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type RevokeUserSessionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Success *bool `json:"success,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r RevokeUserSessionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r RevokeUserSessionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r RevokeUserSessionResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type RevokeUserSessionsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Success *bool `json:"success,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r RevokeUserSessionsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r RevokeUserSessionsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r RevokeUserSessionsResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type SetUserRoleResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - User *User `json:"user,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r SetUserRoleResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r SetUserRoleResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r SetUserRoleResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type SetUserPasswordResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Status *bool `json:"status,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r SetUserPasswordResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r SetUserPasswordResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r SetUserPasswordResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthAdminStopImpersonatingResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthAdminStopImpersonatingResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthAdminStopImpersonatingResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthAdminStopImpersonatingResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type UnbanUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - User *User `json:"user,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r UnbanUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UnbanUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r UnbanUserResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type AdminUpdateUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - User *User `json:"user,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r AdminUpdateUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r AdminUpdateUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r AdminUpdateUserResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthApiKeyCreateResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // CreatedAt Creation timestamp - CreatedAt time.Time `json:"createdAt"` - - // Enabled Whether the key is enabled - Enabled bool `json:"enabled"` - - // ExpiresAt Expiration timestamp - ExpiresAt *time.Time `json:"expiresAt,omitempty"` - - // Id Unique identifier of the API key - Id string `json:"id"` - - // Key The full API key (only returned on creation) - Key string `json:"key"` - - // LastRefillAt Last refill timestamp - LastRefillAt *time.Time `json:"lastRefillAt,omitempty"` - - // LastRequest Last request timestamp - LastRequest *time.Time `json:"lastRequest,omitempty"` - - // Metadata Metadata associated with the key - Metadata *map[string]interface{} `json:"metadata,omitempty"` - - // Name Name of the API key - Name *string `json:"name,omitempty"` - - // Permissions Permissions associated with the key - Permissions *map[string][]string `json:"permissions,omitempty"` - - // Prefix Prefix of the API key - Prefix *string `json:"prefix,omitempty"` - - // RateLimitEnabled Whether rate limiting is enabled - RateLimitEnabled bool `json:"rateLimitEnabled"` - - // RateLimitMax Maximum requests in time window - RateLimitMax *float32 `json:"rateLimitMax,omitempty"` - - // RateLimitTimeWindow Rate limit time window in milliseconds - RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"` - - // ReferenceId ID of the reference owning the key - ReferenceId string `json:"referenceId"` - - // RefillAmount Amount to refill - RefillAmount *float32 `json:"refillAmount,omitempty"` - - // RefillInterval Refill interval in milliseconds - RefillInterval *float32 `json:"refillInterval,omitempty"` - - // Remaining Remaining requests - Remaining *float32 `json:"remaining,omitempty"` - - // RequestCount Current request count in window - RequestCount float32 `json:"requestCount"` - - // Start Starting characters of the key (if configured) - Start *string `json:"start,omitempty"` - - // UpdatedAt Last update timestamp - UpdatedAt time.Time `json:"updatedAt"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthApiKeyCreateResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthApiKeyCreateResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthApiKeyCreateResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthApiKeyDeleteResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Success Indicates if the API key was successfully deleted - Success bool `json:"success"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthApiKeyDeleteResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthApiKeyDeleteResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthApiKeyDeleteResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthApiKeyGetResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // CreatedAt created at - CreatedAt time.Time `json:"createdAt"` - - // Enabled Sets if key is enabled or disabled - Enabled bool `json:"enabled"` - - // ExpiresAt Expiry date of a key - ExpiresAt *time.Time `json:"expiresAt,omitempty"` - - // Id ID - Id string `json:"id"` - - // LastRefillAt The last refill date - LastRefillAt *time.Time `json:"lastRefillAt,omitempty"` - - // LastRequest When last request occurred - LastRequest *time.Time `json:"lastRequest,omitempty"` - - // Metadata Extra metadata about the apiKey - Metadata *map[string]interface{} `json:"metadata,omitempty"` - - // Name The name of the key - Name *string `json:"name,omitempty"` - - // Permissions Permissions for the api key (stored as JSON string) - Permissions *string `json:"permissions,omitempty"` - - // Prefix The API Key prefix. Stored as plain text. - Prefix *string `json:"prefix,omitempty"` - - // RateLimitEnabled Whether the key has rate limiting enabled - RateLimitEnabled bool `json:"rateLimitEnabled"` - - // RateLimitMax Maximum amount of requests allowed within a window - RateLimitMax *float32 `json:"rateLimitMax,omitempty"` - - // RateLimitTimeWindow The duration in milliseconds - RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"` - - // RefillAmount The amount to refill - RefillAmount *float32 `json:"refillAmount,omitempty"` - - // RefillInterval The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h) - RefillInterval *float32 `json:"refillInterval,omitempty"` - - // Remaining Remaining requests (every time api key is used this should updated and should be updated on refill as well) - Remaining *float32 `json:"remaining,omitempty"` - - // RequestCount The number of requests made within the rate limit time window - RequestCount float32 `json:"requestCount"` - - // Start Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key. - Start *string `json:"start,omitempty"` - - // UpdatedAt updated at - UpdatedAt time.Time `json:"updatedAt"` - - // UserId The owner of the user id - UserId string `json:"userId"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthApiKeyGetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthApiKeyGetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthApiKeyGetResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthApiKeyListResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - ApiKeys []struct { - // CreatedAt created at - CreatedAt time.Time `json:"createdAt"` - - // Enabled Sets if key is enabled or disabled - Enabled bool `json:"enabled"` - - // ExpiresAt Expiry date of a key - ExpiresAt *time.Time `json:"expiresAt,omitempty"` - - // Id ID - Id string `json:"id"` - - // LastRefillAt The last refill date - LastRefillAt *time.Time `json:"lastRefillAt,omitempty"` - - // LastRequest When last request occurred - LastRequest *time.Time `json:"lastRequest,omitempty"` - - // Metadata Extra metadata about the apiKey - Metadata *map[string]interface{} `json:"metadata,omitempty"` - - // Name The name of the key - Name *string `json:"name,omitempty"` - - // Permissions Permissions for the api key (stored as JSON string) - Permissions *string `json:"permissions,omitempty"` - - // Prefix The API Key prefix. Stored as plain text. - Prefix *string `json:"prefix,omitempty"` - - // RateLimitEnabled Whether the key has rate limiting enabled - RateLimitEnabled bool `json:"rateLimitEnabled"` - - // RateLimitMax Maximum amount of requests allowed within a window - RateLimitMax *float32 `json:"rateLimitMax,omitempty"` - - // RateLimitTimeWindow The duration in milliseconds - RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"` - - // RefillAmount The amount to refill - RefillAmount *float32 `json:"refillAmount,omitempty"` - - // RefillInterval The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h) - RefillInterval *float32 `json:"refillInterval,omitempty"` - - // Remaining Remaining requests (every time api key is used this should updated and should be updated on refill as well) - Remaining *float32 `json:"remaining,omitempty"` - - // RequestCount The number of requests made within the rate limit time window - RequestCount float32 `json:"requestCount"` - - // Start Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key. - Start *string `json:"start,omitempty"` - - // UpdatedAt updated at - UpdatedAt time.Time `json:"updatedAt"` - - // UserId The owner of the user id - UserId string `json:"userId"` - } `json:"apiKeys"` - - // Limit The limit used for pagination - Limit *float32 `json:"limit,omitempty"` - - // Offset The offset used for pagination - Offset *float32 `json:"offset,omitempty"` - - // Total Total number of API keys - Total float32 `json:"total"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthApiKeyListResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthApiKeyListResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthApiKeyListResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthApiKeyUpdateResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // CreatedAt created at - CreatedAt time.Time `json:"createdAt"` - - // Enabled Sets if key is enabled or disabled - Enabled bool `json:"enabled"` - - // ExpiresAt Expiry date of a key - ExpiresAt *time.Time `json:"expiresAt,omitempty"` - - // Id ID - Id string `json:"id"` - - // LastRefillAt The last refill date - LastRefillAt *time.Time `json:"lastRefillAt,omitempty"` - - // LastRequest When last request occurred - LastRequest *time.Time `json:"lastRequest,omitempty"` - - // Metadata Extra metadata about the apiKey - Metadata *map[string]interface{} `json:"metadata,omitempty"` - - // Name The name of the key - Name *string `json:"name,omitempty"` - - // Permissions Permissions for the api key (stored as JSON string) - Permissions *string `json:"permissions,omitempty"` - - // Prefix The API Key prefix. Stored as plain text. - Prefix *string `json:"prefix,omitempty"` - - // RateLimitEnabled Whether the key has rate limiting enabled - RateLimitEnabled bool `json:"rateLimitEnabled"` - - // RateLimitMax Maximum amount of requests allowed within a window - RateLimitMax *float32 `json:"rateLimitMax,omitempty"` - - // RateLimitTimeWindow The duration in milliseconds - RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"` - - // RefillAmount The amount to refill - RefillAmount *float32 `json:"refillAmount,omitempty"` - - // RefillInterval The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h) - RefillInterval *float32 `json:"refillInterval,omitempty"` - - // Remaining Remaining requests (every time api key is used this should updated and should be updated on refill as well) - Remaining *float32 `json:"remaining,omitempty"` - - // RequestCount The number of requests made within the rate limit time window - RequestCount float32 `json:"requestCount"` - - // Start Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key. - Start *string `json:"start,omitempty"` - - // UpdatedAt updated at - UpdatedAt time.Time `json:"updatedAt"` - - // UserId The owner of the user id - UserId string `json:"userId"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthApiKeyUpdateResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthApiKeyUpdateResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthApiKeyUpdateResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthCallbackIdResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthCallbackIdResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthCallbackIdResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthCallbackIdResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthCallbackIdResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthCallbackIdResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthCallbackIdResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthCallbackIdResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ChangeEmailResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Message Status message of the email change process - Message *ChangeEmail200JSONResponseBodyMessage `json:"message,omitempty"` - - // Status Indicates if the request was successful - Status bool `json:"status"` - User *User `json:"user,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r ChangeEmailResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ChangeEmailResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ChangeEmailResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ChangePasswordResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Token New session token if other sessions were revoked - Token *string `json:"token,omitempty"` - User struct { - // CreatedAt When the user was created - CreatedAt time.Time `json:"createdAt"` - - // Email The email address of the user - Email openapi_types.Email `json:"email"` - - // EmailVerified Whether the email has been verified - EmailVerified bool `json:"emailVerified"` - - // Id The unique identifier of the user - Id string `json:"id"` - - // Image The profile image URL of the user - Image *string `json:"image,omitempty"` - - // Name The name of the user - Name string `json:"name"` - - // UpdatedAt When the user was last updated - UpdatedAt time.Time `json:"updatedAt"` - } `json:"user"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r ChangePasswordResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ChangePasswordResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ChangePasswordResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type DeleteUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Message Status message of the deletion process - Message DeleteUser200JSONResponseBodyMessage `json:"message"` - - // Success Indicates if the operation was successful - Success bool `json:"success"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r DeleteUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteUserResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthDeleteUserCallbackResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Message Confirmation message - Message GetApiAuthDeleteUserCallback200JSONResponseBodyMessage `json:"message"` - - // Success Indicates if the deletion was successful - Success bool `json:"success"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthDeleteUserCallbackResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthDeleteUserCallbackResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthDeleteUserCallbackResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthDeviceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Status Current status of the device authorization - Status *GetApiAuthDevice200JSONResponseBodyStatus `json:"status,omitempty"` - - // UserCode The user code to verify - UserCode *string `json:"user_code,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthDeviceResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthDeviceResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthDeviceResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthDeviceApproveResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Success *bool `json:"success,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthDeviceApproveResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthDeviceApproveResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthDeviceApproveResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthDeviceCodeResponse struct { +type CreateDeviceAuthorizationResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { @@ -31618,8 +21812,8 @@ type PostApiAuthDeviceCodeResponse struct { VerificationUriComplete *string `json:"verification_uri_complete,omitempty"` } JSON400 *struct { - Error *PostApiAuthDeviceCode400JSONResponseBodyError `json:"error,omitempty"` - ErrorDescription *string `json:"error_description,omitempty"` + Error *CreateDeviceAuthorization400JSONResponseBodyError `json:"error,omitempty"` + ErrorDescription *string `json:"error_description,omitempty"` } JSON401 *struct { Message string `json:"message"` @@ -31639,7 +21833,7 @@ type PostApiAuthDeviceCodeResponse struct { } // Status returns HTTPResponse.Status -func (r PostApiAuthDeviceCodeResponse) Status() string { +func (r CreateDeviceAuthorizationResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -31647,7 +21841,7 @@ func (r PostApiAuthDeviceCodeResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthDeviceCodeResponse) StatusCode() int { +func (r CreateDeviceAuthorizationResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -31655,64 +21849,14 @@ func (r PostApiAuthDeviceCodeResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthDeviceCodeResponse) ContentType() string { +func (r CreateDeviceAuthorizationResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type PostApiAuthDeviceDenyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Success *bool `json:"success,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthDeviceDenyResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthDeviceDenyResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthDeviceDenyResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthDeviceTokenResponse struct { +type CreateDeviceAccessTokenResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { @@ -31722,8 +21866,8 @@ type PostApiAuthDeviceTokenResponse struct { TokenType string `json:"token_type"` } JSON400 *struct { - Error *PostApiAuthDeviceToken400JSONResponseBodyError `json:"error,omitempty"` - ErrorDescription *string `json:"error_description,omitempty"` + Error *CreateDeviceAccessToken400JSONResponseBodyError `json:"error,omitempty"` + ErrorDescription *string `json:"error_description,omitempty"` } JSON401 *struct { Message string `json:"message"` @@ -31743,7 +21887,7 @@ type PostApiAuthDeviceTokenResponse struct { } // Status returns HTTPResponse.Status -func (r PostApiAuthDeviceTokenResponse) Status() string { +func (r CreateDeviceAccessTokenResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -31751,7 +21895,7 @@ func (r PostApiAuthDeviceTokenResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthDeviceTokenResponse) StatusCode() int { +func (r CreateDeviceAccessTokenResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -31759,491 +21903,7 @@ func (r PostApiAuthDeviceTokenResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthDeviceTokenResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthErrorResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthErrorResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthErrorResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthErrorResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthGetAccessTokenResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - AccessToken *string `json:"accessToken,omitempty"` - AccessTokenExpiresAt *time.Time `json:"accessTokenExpiresAt,omitempty"` - IdToken *string `json:"idToken,omitempty"` - TokenType *string `json:"tokenType,omitempty"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthGetAccessTokenResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthGetAccessTokenResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthGetAccessTokenResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetSessionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Session Session `json:"session"` - User User `json:"user"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetSessionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSessionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetSessionResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetSessionPostResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Session Session `json:"session"` - User User `json:"user"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetSessionPostResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSessionPostResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetSessionPostResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthIsUsernameAvailableResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthIsUsernameAvailableResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthIsUsernameAvailableResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthIsUsernameAvailableResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetJSONWebKeySetResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Keys Array of public JSON Web Keys - Keys []struct { - // Alg Algorithm intended for use with the key (e.g., 'EdDSA', 'RS256') - Alg string `json:"alg"` - - // Crv Curve name for elliptic curve keys (e.g., 'Ed25519', 'P-256') - Crv *string `json:"crv,omitempty"` - - // E Exponent for RSA keys (base64url-encoded) - E *string `json:"e,omitempty"` - - // Kid Key ID uniquely identifying the key, corresponds to the 'id' from the stored Jwk - Kid string `json:"kid"` - - // Kty Key type (e.g., 'RSA', 'EC', 'OKP') - Kty string `json:"kty"` - - // N Modulus for RSA keys (base64url-encoded) - N *string `json:"n,omitempty"` - - // Use Intended use of the public key (e.g., 'sig' for signature) - Use *GetJSONWebKeySet200JSONResponseBodyKeysUse `json:"use,omitempty"` - - // X X coordinate for elliptic curve keys (base64url-encoded) - X *string `json:"x,omitempty"` - - // Y Y coordinate for elliptic curve keys (base64url-encoded) - Y *string `json:"y,omitempty"` - } `json:"keys"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetJSONWebKeySetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetJSONWebKeySetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetJSONWebKeySetResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type LinkSocialAccountResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Redirect Indicates if the user should be redirected to the authorization URL - Redirect bool `json:"redirect"` - Status *bool `json:"status,omitempty"` - - // Url The authorization URL to redirect the user to - Url *string `json:"url,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r LinkSocialAccountResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r LinkSocialAccountResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r LinkSocialAccountResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ListUserAccountsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]struct { - CreatedAt time.Time `json:"createdAt"` - Id string `json:"id"` - Issuer string `json:"issuer"` - ProviderAccountId string `json:"providerAccountId"` - ProviderId string `json:"providerId"` - Scopes []string `json:"scopes"` - UpdatedAt time.Time `json:"updatedAt"` - UserId string `json:"userId"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r ListUserAccountsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListUserAccountsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListUserAccountsResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ListUserSessionsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]Session - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r ListUserSessionsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListUserSessionsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListUserSessionsResponse) ContentType() string { +func (r CreateDeviceAccessTokenResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } @@ -32282,33 +21942,14 @@ func (r ListAuthorizationDetailsCatalogResponse) ContentType() string { return "" } -type GetApiAuthOauth2AuthorizeResponse struct { +type CreateDynamicOAuthClientRegistrationResponse struct { Body []byte HTTPResponse *http.Response - JSON400 *struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - State *string `json:"state,omitempty"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } + JSON201 *CreateDynamicOAuthClientRegistration201JSONResponseBody } // Status returns HTTPResponse.Status -func (r GetApiAuthOauth2AuthorizeResponse) Status() string { +func (r CreateDynamicOAuthClientRegistrationResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -32316,7 +21957,7 @@ func (r GetApiAuthOauth2AuthorizeResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOauth2AuthorizeResponse) StatusCode() int { +func (r CreateDynamicOAuthClientRegistrationResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -32324,1010 +21965,7 @@ func (r GetApiAuthOauth2AuthorizeResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOauth2AuthorizeResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOauth2AuthorizeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - State *string `json:"state,omitempty"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2AuthorizeResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2AuthorizeResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2AuthorizeResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOauth2ClientRotateSecretResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2ClientRotateSecretResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2ClientRotateSecretResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2ClientRotateSecretResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOauth2ConsentResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // RedirectUri The URI to redirect to, either with an authorization code or an error - RedirectUri string `json:"redirect_uri"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2ConsentResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2ConsentResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2ConsentResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOauth2ContinueResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // RedirectUri The URI to redirect to, either with an authorization code or an error - RedirectUri string `json:"redirect_uri"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2ContinueResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2ContinueResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2ContinueResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOauth2CreateClientResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *struct { - // ClientId Unique identifier for the client - ClientId string `json:"client_id"` - - // ClientIdIssuedAt Creation timestamp of this client - ClientIdIssuedAt *float32 `json:"client_id_issued_at,omitempty"` - - // ClientName Name of the OAuth2 application - ClientName *string `json:"client_name,omitempty"` - - // ClientSecret Secret key for the client - ClientSecret *string `json:"client_secret,omitempty"` - - // ClientSecretExpiresAt Time the client secret will expire. If 0, the client secret will never expire. - ClientSecretExpiresAt *float32 `json:"client_secret_expires_at,omitempty"` - - // ClientUri URI of the OAuth2 application - ClientUri *string `json:"client_uri,omitempty"` - - // Contacts List representing ways to contact people responsible for this client, typically email addresses - Contacts *[]string `json:"contacts,omitempty"` - - // Disabled Whether the client is disabled - Disabled *bool `json:"disabled,omitempty"` - - // GrantTypes Grant types the client may use at the token endpoint - GrantTypes *[]string `json:"grant_types,omitempty"` - - // LogoUri Icon URI for the application - LogoUri *string `json:"logo_uri,omitempty"` - - // Metadata Additional metadata for the application - Metadata *map[string]interface{} `json:"metadata,omitempty"` - - // PolicyUri Client's policy uri - PolicyUri *string `json:"policy_uri,omitempty"` - - // Public Whether the client is public as determined by the type - Public *bool `json:"public,omitempty"` - - // RedirectUris List of allowed redirect uris - RedirectUris *[]string `json:"redirect_uris,omitempty"` - - // ResponseTypes Response types the client may use at the authorization endpoint - ResponseTypes *[]PostApiAuthOauth2CreateClient201JSONResponseBodyResponseTypes `json:"response_types,omitempty"` - - // Scope Space-separated scopes allowed by the client - Scope *string `json:"scope,omitempty"` - - // SoftwareId Unique identifier assigned by the developer to help in the dynamic registration process - SoftwareId *string `json:"software_id,omitempty"` - - // SoftwareStatement JWT containing metadata values about the client software as claims - SoftwareStatement *string `json:"software_statement,omitempty"` - - // SoftwareVersion Version identifier for the software_id - SoftwareVersion *string `json:"software_version,omitempty"` - - // TokenEndpointAuthMethod Requested authentication method for the token endpoint - TokenEndpointAuthMethod *string `json:"token_endpoint_auth_method,omitempty"` - - // TosUri Client's terms of service uri - TosUri *string `json:"tos_uri,omitempty"` - - // Type Type of the client - Type *PostApiAuthOauth2CreateClient201JSONResponseBodyType `json:"type,omitempty"` - - // UserId ID of the user who registered the client, null if registered anonymously - UserId *string `json:"user_id,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2CreateClientResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2CreateClientResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2CreateClientResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOauth2DeleteClientResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2DeleteClientResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2DeleteClientResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2DeleteClientResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOauth2DeleteConsentResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2DeleteConsentResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2DeleteConsentResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2DeleteConsentResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthOauth2EndSessionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Message Success message - Message *string `json:"message,omitempty"` - - // RedirectUri URI to redirect to after logout (if post_logout_redirect_uri was provided) - RedirectUri *string `json:"redirect_uri,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthOauth2EndSessionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOauth2EndSessionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOauth2EndSessionResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthOauth2GetClientResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthOauth2GetClientResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOauth2GetClientResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOauth2GetClientResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthOauth2GetClientsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthOauth2GetClientsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOauth2GetClientsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOauth2GetClientsResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthOauth2GetConsentResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthOauth2GetConsentResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOauth2GetConsentResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOauth2GetConsentResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthOauth2GetConsentsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthOauth2GetConsentsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOauth2GetConsentsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOauth2GetConsentsResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOauth2IntrospectResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Active Whether the token is active - Active bool `json:"active"` - - // Aud Audience of the token - Aud *string `json:"aud,omitempty"` - - // ClientId Client ID associated with the token - ClientId *string `json:"client_id,omitempty"` - - // Exp Expiration time of the token (seconds since epoch) - Exp *float32 `json:"exp,omitempty"` - - // Iat Issued at time (seconds since epoch) - Iat *float32 `json:"iat,omitempty"` - - // Iss Issuer of the token - Iss *string `json:"iss,omitempty"` - - // Jti JWT ID - Jti *string `json:"jti,omitempty"` - - // Nbf Not before time (seconds since epoch) - Nbf *float32 `json:"nbf,omitempty"` - - // Scope Scopes associated with the token - Scope *string `json:"scope,omitempty"` - - // Sub Subject of the token - Sub *string `json:"sub,omitempty"` - - // TokenType Type of the token - TokenType *string `json:"token_type,omitempty"` - - // Username Username associated with the token - Username *string `json:"username,omitempty"` - } - JSON400 *struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - ErrorUri *string `json:"error_uri,omitempty"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2IntrospectResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2IntrospectResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2IntrospectResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOauth2ParResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2ParResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2ParResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2ParResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthOauth2PublicClientResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthOauth2PublicClientResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOauth2PublicClientResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOauth2PublicClientResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOauth2PublicClientPreloginResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2PublicClientPreloginResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2PublicClientPreloginResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2PublicClientPreloginResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOauth2RegisterResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *struct { - // BackchannelLogoutSessionRequired Whether the RP requires a `sid` claim in every Logout Token - BackchannelLogoutSessionRequired *bool `json:"backchannel_logout_session_required,omitempty"` - - // BackchannelLogoutUri RP URL to receive signed Logout Tokens when the end-user's OP session terminates - BackchannelLogoutUri *string `json:"backchannel_logout_uri,omitempty"` - - // ClientId Unique identifier for the client - ClientId string `json:"client_id"` - - // ClientIdIssuedAt Creation timestamp of this client - ClientIdIssuedAt *float32 `json:"client_id_issued_at,omitempty"` - - // ClientName Name of the OAuth2 application - ClientName *string `json:"client_name,omitempty"` - - // ClientSecret Secret key for the client - ClientSecret *string `json:"client_secret,omitempty"` - - // ClientSecretExpiresAt Time the client secret will expire. If 0, the client secret will never expire. - ClientSecretExpiresAt *float32 `json:"client_secret_expires_at,omitempty"` - - // ClientUri Name of the OAuth2 application - ClientUri *string `json:"client_uri,omitempty"` - - // Contacts List representing ways to contact people responsible for this client, typically email addresses - Contacts *[]string `json:"contacts,omitempty"` - - // Disabled Whether the client is disabled - Disabled *bool `json:"disabled,omitempty"` - - // GrantTypes Grant types the client may use at the token endpoint - GrantTypes *[]string `json:"grant_types,omitempty"` - - // LogoUri Icon URL for the application - LogoUri *string `json:"logo_uri,omitempty"` - - // PolicyUri Client's policy uri - PolicyUri *string `json:"policy_uri,omitempty"` - - // PostLogoutRedirectUris List of allowed logout redirect uris - PostLogoutRedirectUris *[]string `json:"post_logout_redirect_uris,omitempty"` - - // Public Whether the client is public as determined by the type - Public *bool `json:"public,omitempty"` - - // RedirectUris List of allowed redirect uris - RedirectUris *[]string `json:"redirect_uris,omitempty"` - RegistrationAccessToken string `json:"registration_access_token"` - RegistrationClientUri string `json:"registration_client_uri"` - - // ResponseTypes Response types the client may use at the authorization endpoint - ResponseTypes *[]PostApiAuthOauth2Register201JSONResponseBodyResponseTypes `json:"response_types,omitempty"` - - // Scope Space-separated scopes allowed by the client - Scope *string `json:"scope,omitempty"` - - // SoftwareId Unique identifier assigned by the developer to help in the dynamic registration process - SoftwareId *string `json:"software_id,omitempty"` - - // SoftwareStatement JWT containing metadata values about the client software as claims - SoftwareStatement *string `json:"software_statement,omitempty"` - - // SoftwareVersion Version identifier for the software_id - SoftwareVersion *string `json:"software_version,omitempty"` - - // TokenEndpointAuthMethod Requested authentication method for the token endpoint - TokenEndpointAuthMethod *string `json:"token_endpoint_auth_method,omitempty"` - - // TosUri Client's terms of service uri - TosUri *string `json:"tos_uri,omitempty"` - - // Type Type of the client - Type *PostApiAuthOauth2Register201JSONResponseBodyType `json:"type,omitempty"` - - // UserId ID of the user who registered the client, null if registered anonymously - UserId *string `json:"user_id,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2RegisterResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2RegisterResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2RegisterResponse) ContentType() string { +func (r CreateDynamicOAuthClientRegistrationResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } @@ -33423,2529 +22061,6 @@ func (r UpdateDynamicOAuthClientRegistrationResponse) ContentType() string { return "" } -type PostApiAuthOauth2RevokeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *map[string]interface{} - JSON400 *struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - ErrorUri *string `json:"error_uri,omitempty"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2RevokeResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2RevokeResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2RevokeResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOauth2TokenResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // AccessToken The access token issued by the authorization server - AccessToken string `json:"access_token"` - - // ExpiresIn Lifetime in seconds of the access token - ExpiresIn float32 `json:"expires_in"` - - // IdToken ID Token (if OpenID Connect) - IdToken *string `json:"id_token,omitempty"` - - // RefreshToken Refresh token, if issued - RefreshToken *string `json:"refresh_token,omitempty"` - - // Scope Scopes granted by the access token - Scope *string `json:"scope,omitempty"` - - // TokenType The type of the token issued - TokenType PostApiAuthOauth2Token200JSONResponseBodyTokenType `json:"token_type"` - } - JSON400 *struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - ErrorUri *string `json:"error_uri,omitempty"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2TokenResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2TokenResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2TokenResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOauth2UpdateClientResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2UpdateClientResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2UpdateClientResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2UpdateClientResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOauth2UpdateConsentResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2UpdateConsentResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2UpdateConsentResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2UpdateConsentResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthOauth2UserinfoResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Email User's email address, included if 'email' scope is granted - Email *openapi_types.Email `json:"email,omitempty"` - - // EmailVerified Whether the email is verified, included if 'email' scope is granted - EmailVerified *bool `json:"email_verified,omitempty"` - - // FamilyName User's family name, included if 'profile' scope is granted - FamilyName *string `json:"family_name,omitempty"` - - // GivenName User's given name, included if 'profile' scope is granted - GivenName *string `json:"given_name,omitempty"` - - // Name User's full name, included if 'profile' scope is granted - Name *string `json:"name,omitempty"` - - // Picture User's profile picture URL, included if 'profile' scope is granted - Picture *string `json:"picture,omitempty"` - - // Sub Subject identifier (user ID) - Sub string `json:"sub"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - } - JSON403 *struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthOauth2UserinfoResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOauth2UserinfoResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOauth2UserinfoResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOauth2UserinfoResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Email User's email address, included if 'email' scope is granted - Email *openapi_types.Email `json:"email,omitempty"` - - // EmailVerified Whether the email is verified, included if 'email' scope is granted - EmailVerified *bool `json:"email_verified,omitempty"` - - // FamilyName User's family name, included if 'profile' scope is granted - FamilyName *string `json:"family_name,omitempty"` - - // GivenName User's given name, included if 'profile' scope is granted - GivenName *string `json:"given_name,omitempty"` - - // Name User's full name, included if 'profile' scope is granted - Name *string `json:"name,omitempty"` - - // Picture User's profile picture URL, included if 'profile' scope is granted - Picture *string `json:"picture,omitempty"` - - // Sub Subject identifier (user ID) - Sub string `json:"sub"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - } - JSON403 *struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOauth2UserinfoResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOauth2UserinfoResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOauth2UserinfoResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthOkResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Ok Indicates if the API is working - Ok bool `json:"ok"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthOkResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOkResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOkResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOrganizationAcceptInvitationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Invitation *map[string]interface{} `json:"invitation,omitempty"` - Member *map[string]interface{} `json:"member,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOrganizationAcceptInvitationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOrganizationAcceptInvitationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOrganizationAcceptInvitationResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOrganizationCancelInvitationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOrganizationCancelInvitationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOrganizationCancelInvitationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOrganizationCancelInvitationResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOrganizationCheckSlugResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOrganizationCheckSlugResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOrganizationCheckSlugResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOrganizationCheckSlugResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOrganizationCreateResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Organization - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOrganizationCreateResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOrganizationCreateResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOrganizationCreateResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOrganizationDeleteResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *string - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOrganizationDeleteResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOrganizationDeleteResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOrganizationDeleteResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthOrganizationGetActiveMemberResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Id string `json:"id"` - OrganizationId string `json:"organizationId"` - Role string `json:"role"` - UserId string `json:"userId"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthOrganizationGetActiveMemberResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOrganizationGetActiveMemberResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOrganizationGetActiveMemberResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthOrganizationGetActiveMemberRoleResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthOrganizationGetActiveMemberRoleResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOrganizationGetActiveMemberRoleResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOrganizationGetActiveMemberRoleResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetFullOrganizationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Organization - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetFullOrganizationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetFullOrganizationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetFullOrganizationResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthOrganizationGetInvitationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Email string `json:"email"` - ExpiresAt string `json:"expiresAt"` - Id string `json:"id"` - InviterEmail string `json:"inviterEmail"` - InviterId string `json:"inviterId"` - OrganizationId string `json:"organizationId"` - OrganizationName string `json:"organizationName"` - OrganizationSlug string `json:"organizationSlug"` - Role string `json:"role"` - Status string `json:"status"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthOrganizationGetInvitationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOrganizationGetInvitationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOrganizationGetInvitationResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetOrganizationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Organization - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetOrganizationResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOrganizationHasPermissionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Error *string `json:"error,omitempty"` - Success bool `json:"success"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOrganizationHasPermissionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOrganizationHasPermissionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOrganizationHasPermissionResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type CreateOrganizationInvitationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - CreatedAt string `json:"createdAt"` - Email string `json:"email"` - ExpiresAt string `json:"expiresAt"` - Id string `json:"id"` - InviterId string `json:"inviterId"` - OrganizationId string `json:"organizationId"` - Role string `json:"role"` - Status string `json:"status"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r CreateOrganizationInvitationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateOrganizationInvitationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r CreateOrganizationInvitationResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOrganizationLeaveResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOrganizationLeaveResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOrganizationLeaveResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOrganizationLeaveResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthOrganizationListResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]Organization - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthOrganizationListResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOrganizationListResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOrganizationListResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthOrganizationListInvitationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthOrganizationListInvitationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOrganizationListInvitationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOrganizationListInvitationsResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthOrganizationListMembersResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthOrganizationListMembersResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOrganizationListMembersResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOrganizationListMembersResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthOrganizationListUserInvitationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]struct { - CreatedAt string `json:"createdAt"` - Email string `json:"email"` - ExpiresAt string `json:"expiresAt"` - Id string `json:"id"` - - // InviterId The ID of the user who created the invitation - InviterId string `json:"inviterId"` - OrganizationId string `json:"organizationId"` - OrganizationName string `json:"organizationName"` - Role string `json:"role"` - Status string `json:"status"` - - // TeamId The ID of the team associated with the invitation - TeamId *string `json:"teamId,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthOrganizationListUserInvitationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthOrganizationListUserInvitationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthOrganizationListUserInvitationsResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOrganizationRejectInvitationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Invitation *map[string]interface{} `json:"invitation,omitempty"` - Member *map[string]interface{} `json:"member,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOrganizationRejectInvitationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOrganizationRejectInvitationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOrganizationRejectInvitationResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOrganizationRemoveMemberResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Member struct { - Id string `json:"id"` - OrganizationId string `json:"organizationId"` - Role string `json:"role"` - UserId string `json:"userId"` - } `json:"member"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOrganizationRemoveMemberResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOrganizationRemoveMemberResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOrganizationRemoveMemberResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type SetActiveOrganizationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Organization - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r SetActiveOrganizationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r SetActiveOrganizationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r SetActiveOrganizationResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthOrganizationUpdateResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Organization - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthOrganizationUpdateResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthOrganizationUpdateResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthOrganizationUpdateResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type UpdateOrganizationMemberRoleResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Member struct { - Id string `json:"id"` - OrganizationId string `json:"organizationId"` - Role string `json:"role"` - UserId string `json:"userId"` - } `json:"member"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r UpdateOrganizationMemberRoleResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateOrganizationMemberRoleResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r UpdateOrganizationMemberRoleResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthRefreshTokenResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - AccessToken *string `json:"accessToken,omitempty"` - AccessTokenExpiresAt *time.Time `json:"accessTokenExpiresAt,omitempty"` - IdToken *string `json:"idToken,omitempty"` - RefreshToken *string `json:"refreshToken,omitempty"` - RefreshTokenExpiresAt *time.Time `json:"refreshTokenExpiresAt,omitempty"` - TokenType *string `json:"tokenType,omitempty"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthRefreshTokenResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthRefreshTokenResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthRefreshTokenResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type RequestPasswordResetResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Message *string `json:"message,omitempty"` - Status *bool `json:"status,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r RequestPasswordResetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r RequestPasswordResetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r RequestPasswordResetResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ResetPasswordResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Status *bool `json:"status,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r ResetPasswordResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ResetPasswordResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ResetPasswordResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type ResetPasswordCallbackResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Token *string `json:"token,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r ResetPasswordCallbackResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ResetPasswordCallbackResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ResetPasswordCallbackResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthRevokeOtherSessionsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Status Indicates if all other sessions were revoked successfully - Status bool `json:"status"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthRevokeOtherSessionsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthRevokeOtherSessionsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthRevokeOtherSessionsResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthRevokeSessionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Status Indicates if the session was revoked successfully - Status bool `json:"status"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthRevokeSessionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthRevokeSessionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthRevokeSessionResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthRevokeSessionsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Status Indicates if all sessions were revoked successfully - Status bool `json:"status"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthRevokeSessionsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthRevokeSessionsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthRevokeSessionsResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type SendVerificationEmailResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Status Indicates if the email was sent successfully - Status *bool `json:"status,omitempty"` - } - JSON400 *struct { - // Message Error message - Message *string `json:"message,omitempty"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r SendVerificationEmailResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r SendVerificationEmailResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r SendVerificationEmailResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type SignInEmailResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Redirect SignInEmail200JSONResponseBodyRedirect `json:"redirect"` - - // Token Session token - Token string `json:"token"` - Url *string `json:"url,omitempty"` - User User `json:"user"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r SignInEmailResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r SignInEmailResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r SignInEmailResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type SocialSignInResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Redirect bool `json:"redirect"` - Token *string `json:"token,omitempty"` - Url *string `json:"url,omitempty"` - User *User `json:"user,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r SocialSignInResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r SocialSignInResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r SocialSignInResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthSignInUsernameResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Redirect Whether the client should follow the Location header. True when callbackURL was provided. - Redirect bool `json:"redirect"` - - // Token Session token for the authenticated session - Token string `json:"token"` - - // Url The callbackURL echoed back so the client can redirect. - Url *string `json:"url,omitempty"` - User User `json:"user"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON422 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthSignInUsernameResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthSignInUsernameResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthSignInUsernameResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type SignOutResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Success *bool `json:"success,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r SignOutResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r SignOutResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r SignOutResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type SignUpWithEmailAndPasswordResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Token Authentication token for the session - Token *string `json:"token,omitempty"` - User struct { - // CreatedAt When the user was created - CreatedAt time.Time `json:"createdAt"` - - // Email The email address of the user - Email openapi_types.Email `json:"email"` - - // EmailVerified Whether the email has been verified - EmailVerified bool `json:"emailVerified"` - - // Id The unique identifier of the user - Id string `json:"id"` - - // Image The profile image URL of the user - Image *string `json:"image,omitempty"` - - // Name The name of the user - Name string `json:"name"` - - // UpdatedAt When the user was last updated - UpdatedAt time.Time `json:"updatedAt"` - } `json:"user"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON422 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r SignUpWithEmailAndPasswordResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r SignUpWithEmailAndPasswordResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r SignUpWithEmailAndPasswordResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetJSONWebTokenResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Token *string `json:"token,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetJSONWebTokenResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetJSONWebTokenResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetJSONWebTokenResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type PostApiAuthUnlinkAccountResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Status *bool `json:"status,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r PostApiAuthUnlinkAccountResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostApiAuthUnlinkAccountResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r PostApiAuthUnlinkAccountResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type UpdateSessionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Session *Session `json:"session,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r UpdateSessionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateSessionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r UpdateSessionResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type UpdateUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - User *User `json:"user,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r UpdateUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r UpdateUserResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type GetApiAuthVerifyEmailResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Status Indicates if the email was verified successfully - Status bool `json:"status"` - User User `json:"user"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r GetApiAuthVerifyEmailResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetApiAuthVerifyEmailResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetApiAuthVerifyEmailResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - -type VerifyPasswordResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Status *bool `json:"status,omitempty"` - } - JSON400 *struct { - Message string `json:"message"` - } - JSON401 *struct { - Message string `json:"message"` - } - JSON403 *struct { - Message *string `json:"message,omitempty"` - } - JSON404 *struct { - Message *string `json:"message,omitempty"` - } - JSON429 *struct { - Message *string `json:"message,omitempty"` - } - JSON500 *struct { - Message *string `json:"message,omitempty"` - } -} - -// Status returns HTTPResponse.Status -func (r VerifyPasswordResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r VerifyPasswordResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r VerifyPasswordResponse) ContentType() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Header.Get("Content-Type") - } - return "" -} - type ListBackgroundJobsResponse struct { Body []byte HTTPResponse *http.Response @@ -41058,589 +27173,38 @@ func (r GetUserProfileResponse) ContentType() string { return "" } -// GetApiAuthAccountInfoWithResponse request returning *GetApiAuthAccountInfoResponse -func (c *ClientWithResponses) GetApiAuthAccountInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthAccountInfoResponse, error) { - rsp, err := c.GetApiAuthAccountInfo(ctx, reqEditors...) +// CreateDeviceAuthorizationWithBodyWithResponse request with arbitrary body returning *CreateDeviceAuthorizationResponse +func (c *ClientWithResponses) CreateDeviceAuthorizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeviceAuthorizationResponse, error) { + rsp, err := c.CreateDeviceAuthorizationWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseGetApiAuthAccountInfoResponse(rsp) + return ParseCreateDeviceAuthorizationResponse(rsp) } -// BanUserWithBodyWithResponse request with arbitrary body returning *BanUserResponse -func (c *ClientWithResponses) BanUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BanUserResponse, error) { - rsp, err := c.BanUserWithBody(ctx, contentType, body, reqEditors...) +func (c *ClientWithResponses) CreateDeviceAuthorizationWithResponse(ctx context.Context, body CreateDeviceAuthorizationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDeviceAuthorizationResponse, error) { + rsp, err := c.CreateDeviceAuthorization(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseBanUserResponse(rsp) + return ParseCreateDeviceAuthorizationResponse(rsp) } -func (c *ClientWithResponses) BanUserWithResponse(ctx context.Context, body BanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*BanUserResponse, error) { - rsp, err := c.BanUser(ctx, body, reqEditors...) +// CreateDeviceAccessTokenWithBodyWithResponse request with arbitrary body returning *CreateDeviceAccessTokenResponse +func (c *ClientWithResponses) CreateDeviceAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeviceAccessTokenResponse, error) { + rsp, err := c.CreateDeviceAccessTokenWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseBanUserResponse(rsp) + return ParseCreateDeviceAccessTokenResponse(rsp) } -// CreateUserWithBodyWithResponse request with arbitrary body returning *CreateUserResponse -func (c *ClientWithResponses) CreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error) { - rsp, err := c.CreateUserWithBody(ctx, contentType, body, reqEditors...) +func (c *ClientWithResponses) CreateDeviceAccessTokenWithResponse(ctx context.Context, body CreateDeviceAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDeviceAccessTokenResponse, error) { + rsp, err := c.CreateDeviceAccessToken(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateUserResponse(rsp) -} - -func (c *ClientWithResponses) CreateUserWithResponse(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error) { - rsp, err := c.CreateUser(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateUserResponse(rsp) -} - -// GetUserWithResponse request returning *GetUserResponse -func (c *ClientWithResponses) GetUserWithResponse(ctx context.Context, params *GetUserParams, reqEditors ...RequestEditorFn) (*GetUserResponse, error) { - rsp, err := c.GetUser(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetUserResponse(rsp) -} - -// PostApiAuthAdminHasPermissionWithBodyWithResponse request with arbitrary body returning *PostApiAuthAdminHasPermissionResponse -func (c *ClientWithResponses) PostApiAuthAdminHasPermissionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthAdminHasPermissionResponse, error) { - rsp, err := c.PostApiAuthAdminHasPermissionWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthAdminHasPermissionResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthAdminHasPermissionWithResponse(ctx context.Context, body PostApiAuthAdminHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthAdminHasPermissionResponse, error) { - rsp, err := c.PostApiAuthAdminHasPermission(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthAdminHasPermissionResponse(rsp) -} - -// ImpersonateUserWithBodyWithResponse request with arbitrary body returning *ImpersonateUserResponse -func (c *ClientWithResponses) ImpersonateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ImpersonateUserResponse, error) { - rsp, err := c.ImpersonateUserWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseImpersonateUserResponse(rsp) -} - -func (c *ClientWithResponses) ImpersonateUserWithResponse(ctx context.Context, body ImpersonateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*ImpersonateUserResponse, error) { - rsp, err := c.ImpersonateUser(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseImpersonateUserResponse(rsp) -} - -// AdminListUserSessionsWithBodyWithResponse request with arbitrary body returning *AdminListUserSessionsResponse -func (c *ClientWithResponses) AdminListUserSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminListUserSessionsResponse, error) { - rsp, err := c.AdminListUserSessionsWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAdminListUserSessionsResponse(rsp) -} - -func (c *ClientWithResponses) AdminListUserSessionsWithResponse(ctx context.Context, body AdminListUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminListUserSessionsResponse, error) { - rsp, err := c.AdminListUserSessions(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAdminListUserSessionsResponse(rsp) -} - -// ListUsersWithResponse request returning *ListUsersResponse -func (c *ClientWithResponses) ListUsersWithResponse(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*ListUsersResponse, error) { - rsp, err := c.ListUsers(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListUsersResponse(rsp) -} - -// RemoveUserWithBodyWithResponse request with arbitrary body returning *RemoveUserResponse -func (c *ClientWithResponses) RemoveUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveUserResponse, error) { - rsp, err := c.RemoveUserWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseRemoveUserResponse(rsp) -} - -func (c *ClientWithResponses) RemoveUserWithResponse(ctx context.Context, body RemoveUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveUserResponse, error) { - rsp, err := c.RemoveUser(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseRemoveUserResponse(rsp) -} - -// RevokeUserSessionWithBodyWithResponse request with arbitrary body returning *RevokeUserSessionResponse -func (c *ClientWithResponses) RevokeUserSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeUserSessionResponse, error) { - rsp, err := c.RevokeUserSessionWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseRevokeUserSessionResponse(rsp) -} - -func (c *ClientWithResponses) RevokeUserSessionWithResponse(ctx context.Context, body RevokeUserSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeUserSessionResponse, error) { - rsp, err := c.RevokeUserSession(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseRevokeUserSessionResponse(rsp) -} - -// RevokeUserSessionsWithBodyWithResponse request with arbitrary body returning *RevokeUserSessionsResponse -func (c *ClientWithResponses) RevokeUserSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeUserSessionsResponse, error) { - rsp, err := c.RevokeUserSessionsWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseRevokeUserSessionsResponse(rsp) -} - -func (c *ClientWithResponses) RevokeUserSessionsWithResponse(ctx context.Context, body RevokeUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeUserSessionsResponse, error) { - rsp, err := c.RevokeUserSessions(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseRevokeUserSessionsResponse(rsp) -} - -// SetUserRoleWithBodyWithResponse request with arbitrary body returning *SetUserRoleResponse -func (c *ClientWithResponses) SetUserRoleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetUserRoleResponse, error) { - rsp, err := c.SetUserRoleWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSetUserRoleResponse(rsp) -} - -func (c *ClientWithResponses) SetUserRoleWithResponse(ctx context.Context, body SetUserRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*SetUserRoleResponse, error) { - rsp, err := c.SetUserRole(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSetUserRoleResponse(rsp) -} - -// SetUserPasswordWithBodyWithResponse request with arbitrary body returning *SetUserPasswordResponse -func (c *ClientWithResponses) SetUserPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetUserPasswordResponse, error) { - rsp, err := c.SetUserPasswordWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSetUserPasswordResponse(rsp) -} - -func (c *ClientWithResponses) SetUserPasswordWithResponse(ctx context.Context, body SetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*SetUserPasswordResponse, error) { - rsp, err := c.SetUserPassword(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSetUserPasswordResponse(rsp) -} - -// PostApiAuthAdminStopImpersonatingWithResponse request returning *PostApiAuthAdminStopImpersonatingResponse -func (c *ClientWithResponses) PostApiAuthAdminStopImpersonatingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostApiAuthAdminStopImpersonatingResponse, error) { - rsp, err := c.PostApiAuthAdminStopImpersonating(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthAdminStopImpersonatingResponse(rsp) -} - -// UnbanUserWithBodyWithResponse request with arbitrary body returning *UnbanUserResponse -func (c *ClientWithResponses) UnbanUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UnbanUserResponse, error) { - rsp, err := c.UnbanUserWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUnbanUserResponse(rsp) -} - -func (c *ClientWithResponses) UnbanUserWithResponse(ctx context.Context, body UnbanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UnbanUserResponse, error) { - rsp, err := c.UnbanUser(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUnbanUserResponse(rsp) -} - -// AdminUpdateUserWithBodyWithResponse request with arbitrary body returning *AdminUpdateUserResponse -func (c *ClientWithResponses) AdminUpdateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminUpdateUserResponse, error) { - rsp, err := c.AdminUpdateUserWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAdminUpdateUserResponse(rsp) -} - -func (c *ClientWithResponses) AdminUpdateUserWithResponse(ctx context.Context, body AdminUpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminUpdateUserResponse, error) { - rsp, err := c.AdminUpdateUser(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAdminUpdateUserResponse(rsp) -} - -// PostApiAuthApiKeyCreateWithBodyWithResponse request with arbitrary body returning *PostApiAuthApiKeyCreateResponse -func (c *ClientWithResponses) PostApiAuthApiKeyCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyCreateResponse, error) { - rsp, err := c.PostApiAuthApiKeyCreateWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthApiKeyCreateResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthApiKeyCreateWithResponse(ctx context.Context, body PostApiAuthApiKeyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyCreateResponse, error) { - rsp, err := c.PostApiAuthApiKeyCreate(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthApiKeyCreateResponse(rsp) -} - -// PostApiAuthApiKeyDeleteWithBodyWithResponse request with arbitrary body returning *PostApiAuthApiKeyDeleteResponse -func (c *ClientWithResponses) PostApiAuthApiKeyDeleteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyDeleteResponse, error) { - rsp, err := c.PostApiAuthApiKeyDeleteWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthApiKeyDeleteResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthApiKeyDeleteWithResponse(ctx context.Context, body PostApiAuthApiKeyDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyDeleteResponse, error) { - rsp, err := c.PostApiAuthApiKeyDelete(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthApiKeyDeleteResponse(rsp) -} - -// GetApiAuthApiKeyGetWithResponse request returning *GetApiAuthApiKeyGetResponse -func (c *ClientWithResponses) GetApiAuthApiKeyGetWithResponse(ctx context.Context, params *GetApiAuthApiKeyGetParams, reqEditors ...RequestEditorFn) (*GetApiAuthApiKeyGetResponse, error) { - rsp, err := c.GetApiAuthApiKeyGet(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthApiKeyGetResponse(rsp) -} - -// GetApiAuthApiKeyListWithResponse request returning *GetApiAuthApiKeyListResponse -func (c *ClientWithResponses) GetApiAuthApiKeyListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthApiKeyListResponse, error) { - rsp, err := c.GetApiAuthApiKeyList(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthApiKeyListResponse(rsp) -} - -// PostApiAuthApiKeyUpdateWithBodyWithResponse request with arbitrary body returning *PostApiAuthApiKeyUpdateResponse -func (c *ClientWithResponses) PostApiAuthApiKeyUpdateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyUpdateResponse, error) { - rsp, err := c.PostApiAuthApiKeyUpdateWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthApiKeyUpdateResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthApiKeyUpdateWithResponse(ctx context.Context, body PostApiAuthApiKeyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyUpdateResponse, error) { - rsp, err := c.PostApiAuthApiKeyUpdate(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthApiKeyUpdateResponse(rsp) -} - -// GetApiAuthCallbackIdWithResponse request returning *GetApiAuthCallbackIdResponse -func (c *ClientWithResponses) GetApiAuthCallbackIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetApiAuthCallbackIdResponse, error) { - rsp, err := c.GetApiAuthCallbackId(ctx, id, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthCallbackIdResponse(rsp) -} - -// PostApiAuthCallbackIdWithBodyWithResponse request with arbitrary body returning *PostApiAuthCallbackIdResponse -func (c *ClientWithResponses) PostApiAuthCallbackIdWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthCallbackIdResponse, error) { - rsp, err := c.PostApiAuthCallbackIdWithBody(ctx, id, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthCallbackIdResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthCallbackIdWithResponse(ctx context.Context, id string, body PostApiAuthCallbackIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthCallbackIdResponse, error) { - rsp, err := c.PostApiAuthCallbackId(ctx, id, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthCallbackIdResponse(rsp) -} - -// ChangeEmailWithBodyWithResponse request with arbitrary body returning *ChangeEmailResponse -func (c *ClientWithResponses) ChangeEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangeEmailResponse, error) { - rsp, err := c.ChangeEmailWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseChangeEmailResponse(rsp) -} - -func (c *ClientWithResponses) ChangeEmailWithResponse(ctx context.Context, body ChangeEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*ChangeEmailResponse, error) { - rsp, err := c.ChangeEmail(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseChangeEmailResponse(rsp) -} - -// ChangePasswordWithBodyWithResponse request with arbitrary body returning *ChangePasswordResponse -func (c *ClientWithResponses) ChangePasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangePasswordResponse, error) { - rsp, err := c.ChangePasswordWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseChangePasswordResponse(rsp) -} - -func (c *ClientWithResponses) ChangePasswordWithResponse(ctx context.Context, body ChangePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ChangePasswordResponse, error) { - rsp, err := c.ChangePassword(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseChangePasswordResponse(rsp) -} - -// DeleteUserWithBodyWithResponse request with arbitrary body returning *DeleteUserResponse -func (c *ClientWithResponses) DeleteUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) { - rsp, err := c.DeleteUserWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteUserResponse(rsp) -} - -func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, body DeleteUserJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) { - rsp, err := c.DeleteUser(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteUserResponse(rsp) -} - -// GetApiAuthDeleteUserCallbackWithResponse request returning *GetApiAuthDeleteUserCallbackResponse -func (c *ClientWithResponses) GetApiAuthDeleteUserCallbackWithResponse(ctx context.Context, params *GetApiAuthDeleteUserCallbackParams, reqEditors ...RequestEditorFn) (*GetApiAuthDeleteUserCallbackResponse, error) { - rsp, err := c.GetApiAuthDeleteUserCallback(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthDeleteUserCallbackResponse(rsp) -} - -// GetApiAuthDeviceWithResponse request returning *GetApiAuthDeviceResponse -func (c *ClientWithResponses) GetApiAuthDeviceWithResponse(ctx context.Context, params *GetApiAuthDeviceParams, reqEditors ...RequestEditorFn) (*GetApiAuthDeviceResponse, error) { - rsp, err := c.GetApiAuthDevice(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthDeviceResponse(rsp) -} - -// PostApiAuthDeviceApproveWithBodyWithResponse request with arbitrary body returning *PostApiAuthDeviceApproveResponse -func (c *ClientWithResponses) PostApiAuthDeviceApproveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceApproveResponse, error) { - rsp, err := c.PostApiAuthDeviceApproveWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthDeviceApproveResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthDeviceApproveWithResponse(ctx context.Context, body PostApiAuthDeviceApproveJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceApproveResponse, error) { - rsp, err := c.PostApiAuthDeviceApprove(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthDeviceApproveResponse(rsp) -} - -// PostApiAuthDeviceCodeWithBodyWithResponse request with arbitrary body returning *PostApiAuthDeviceCodeResponse -func (c *ClientWithResponses) PostApiAuthDeviceCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceCodeResponse, error) { - rsp, err := c.PostApiAuthDeviceCodeWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthDeviceCodeResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthDeviceCodeWithResponse(ctx context.Context, body PostApiAuthDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceCodeResponse, error) { - rsp, err := c.PostApiAuthDeviceCode(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthDeviceCodeResponse(rsp) -} - -// PostApiAuthDeviceDenyWithBodyWithResponse request with arbitrary body returning *PostApiAuthDeviceDenyResponse -func (c *ClientWithResponses) PostApiAuthDeviceDenyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceDenyResponse, error) { - rsp, err := c.PostApiAuthDeviceDenyWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthDeviceDenyResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthDeviceDenyWithResponse(ctx context.Context, body PostApiAuthDeviceDenyJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceDenyResponse, error) { - rsp, err := c.PostApiAuthDeviceDeny(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthDeviceDenyResponse(rsp) -} - -// PostApiAuthDeviceTokenWithBodyWithResponse request with arbitrary body returning *PostApiAuthDeviceTokenResponse -func (c *ClientWithResponses) PostApiAuthDeviceTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceTokenResponse, error) { - rsp, err := c.PostApiAuthDeviceTokenWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthDeviceTokenResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthDeviceTokenWithResponse(ctx context.Context, body PostApiAuthDeviceTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceTokenResponse, error) { - rsp, err := c.PostApiAuthDeviceToken(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthDeviceTokenResponse(rsp) -} - -// GetApiAuthErrorWithResponse request returning *GetApiAuthErrorResponse -func (c *ClientWithResponses) GetApiAuthErrorWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthErrorResponse, error) { - rsp, err := c.GetApiAuthError(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthErrorResponse(rsp) -} - -// PostApiAuthGetAccessTokenWithBodyWithResponse request with arbitrary body returning *PostApiAuthGetAccessTokenResponse -func (c *ClientWithResponses) PostApiAuthGetAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthGetAccessTokenResponse, error) { - rsp, err := c.PostApiAuthGetAccessTokenWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthGetAccessTokenResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthGetAccessTokenWithResponse(ctx context.Context, body PostApiAuthGetAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthGetAccessTokenResponse, error) { - rsp, err := c.PostApiAuthGetAccessToken(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthGetAccessTokenResponse(rsp) -} - -// GetSessionWithResponse request returning *GetSessionResponse -func (c *ClientWithResponses) GetSessionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSessionResponse, error) { - rsp, err := c.GetSession(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSessionResponse(rsp) -} - -// GetSessionPostWithBodyWithResponse request with arbitrary body returning *GetSessionPostResponse -func (c *ClientWithResponses) GetSessionPostWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetSessionPostResponse, error) { - rsp, err := c.GetSessionPostWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSessionPostResponse(rsp) -} - -func (c *ClientWithResponses) GetSessionPostWithResponse(ctx context.Context, body GetSessionPostJSONRequestBody, reqEditors ...RequestEditorFn) (*GetSessionPostResponse, error) { - rsp, err := c.GetSessionPost(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSessionPostResponse(rsp) -} - -// PostApiAuthIsUsernameAvailableWithBodyWithResponse request with arbitrary body returning *PostApiAuthIsUsernameAvailableResponse -func (c *ClientWithResponses) PostApiAuthIsUsernameAvailableWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthIsUsernameAvailableResponse, error) { - rsp, err := c.PostApiAuthIsUsernameAvailableWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthIsUsernameAvailableResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthIsUsernameAvailableWithResponse(ctx context.Context, body PostApiAuthIsUsernameAvailableJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthIsUsernameAvailableResponse, error) { - rsp, err := c.PostApiAuthIsUsernameAvailable(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthIsUsernameAvailableResponse(rsp) -} - -// GetJSONWebKeySetWithResponse request returning *GetJSONWebKeySetResponse -func (c *ClientWithResponses) GetJSONWebKeySetWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJSONWebKeySetResponse, error) { - rsp, err := c.GetJSONWebKeySet(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetJSONWebKeySetResponse(rsp) -} - -// LinkSocialAccountWithBodyWithResponse request with arbitrary body returning *LinkSocialAccountResponse -func (c *ClientWithResponses) LinkSocialAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LinkSocialAccountResponse, error) { - rsp, err := c.LinkSocialAccountWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseLinkSocialAccountResponse(rsp) -} - -func (c *ClientWithResponses) LinkSocialAccountWithResponse(ctx context.Context, body LinkSocialAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*LinkSocialAccountResponse, error) { - rsp, err := c.LinkSocialAccount(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseLinkSocialAccountResponse(rsp) -} - -// ListUserAccountsWithResponse request returning *ListUserAccountsResponse -func (c *ClientWithResponses) ListUserAccountsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUserAccountsResponse, error) { - rsp, err := c.ListUserAccounts(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseListUserAccountsResponse(rsp) -} - -// ListUserSessionsWithResponse request returning *ListUserSessionsResponse -func (c *ClientWithResponses) ListUserSessionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUserSessionsResponse, error) { - rsp, err := c.ListUserSessions(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseListUserSessionsResponse(rsp) + return ParseCreateDeviceAccessTokenResponse(rsp) } // ListAuthorizationDetailsCatalogWithResponse request returning *ListAuthorizationDetailsCatalogResponse @@ -41652,246 +27216,21 @@ func (c *ClientWithResponses) ListAuthorizationDetailsCatalogWithResponse(ctx co return ParseListAuthorizationDetailsCatalogResponse(rsp) } -// GetApiAuthOauth2AuthorizeWithResponse request returning *GetApiAuthOauth2AuthorizeResponse -func (c *ClientWithResponses) GetApiAuthOauth2AuthorizeWithResponse(ctx context.Context, params *GetApiAuthOauth2AuthorizeParams, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2AuthorizeResponse, error) { - rsp, err := c.GetApiAuthOauth2Authorize(ctx, params, reqEditors...) +// CreateDynamicOAuthClientRegistrationWithBodyWithResponse request with arbitrary body returning *CreateDynamicOAuthClientRegistrationResponse +func (c *ClientWithResponses) CreateDynamicOAuthClientRegistrationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDynamicOAuthClientRegistrationResponse, error) { + rsp, err := c.CreateDynamicOAuthClientRegistrationWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseGetApiAuthOauth2AuthorizeResponse(rsp) + return ParseCreateDynamicOAuthClientRegistrationResponse(rsp) } -// PostApiAuthOauth2AuthorizeWithResponse request returning *PostApiAuthOauth2AuthorizeResponse -func (c *ClientWithResponses) PostApiAuthOauth2AuthorizeWithResponse(ctx context.Context, params *PostApiAuthOauth2AuthorizeParams, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2AuthorizeResponse, error) { - rsp, err := c.PostApiAuthOauth2Authorize(ctx, params, reqEditors...) +func (c *ClientWithResponses) CreateDynamicOAuthClientRegistrationWithResponse(ctx context.Context, body CreateDynamicOAuthClientRegistrationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDynamicOAuthClientRegistrationResponse, error) { + rsp, err := c.CreateDynamicOAuthClientRegistration(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParsePostApiAuthOauth2AuthorizeResponse(rsp) -} - -// PostApiAuthOauth2ClientRotateSecretWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2ClientRotateSecretResponse -func (c *ClientWithResponses) PostApiAuthOauth2ClientRotateSecretWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ClientRotateSecretResponse, error) { - rsp, err := c.PostApiAuthOauth2ClientRotateSecretWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2ClientRotateSecretResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOauth2ClientRotateSecretWithResponse(ctx context.Context, body PostApiAuthOauth2ClientRotateSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ClientRotateSecretResponse, error) { - rsp, err := c.PostApiAuthOauth2ClientRotateSecret(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2ClientRotateSecretResponse(rsp) -} - -// PostApiAuthOauth2ConsentWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2ConsentResponse -func (c *ClientWithResponses) PostApiAuthOauth2ConsentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ConsentResponse, error) { - rsp, err := c.PostApiAuthOauth2ConsentWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2ConsentResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOauth2ConsentWithResponse(ctx context.Context, body PostApiAuthOauth2ConsentJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ConsentResponse, error) { - rsp, err := c.PostApiAuthOauth2Consent(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2ConsentResponse(rsp) -} - -// PostApiAuthOauth2ContinueWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2ContinueResponse -func (c *ClientWithResponses) PostApiAuthOauth2ContinueWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ContinueResponse, error) { - rsp, err := c.PostApiAuthOauth2ContinueWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2ContinueResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOauth2ContinueWithResponse(ctx context.Context, body PostApiAuthOauth2ContinueJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ContinueResponse, error) { - rsp, err := c.PostApiAuthOauth2Continue(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2ContinueResponse(rsp) -} - -// PostApiAuthOauth2CreateClientWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2CreateClientResponse -func (c *ClientWithResponses) PostApiAuthOauth2CreateClientWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2CreateClientResponse, error) { - rsp, err := c.PostApiAuthOauth2CreateClientWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2CreateClientResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOauth2CreateClientWithResponse(ctx context.Context, body PostApiAuthOauth2CreateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2CreateClientResponse, error) { - rsp, err := c.PostApiAuthOauth2CreateClient(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2CreateClientResponse(rsp) -} - -// PostApiAuthOauth2DeleteClientWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2DeleteClientResponse -func (c *ClientWithResponses) PostApiAuthOauth2DeleteClientWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2DeleteClientResponse, error) { - rsp, err := c.PostApiAuthOauth2DeleteClientWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2DeleteClientResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOauth2DeleteClientWithResponse(ctx context.Context, body PostApiAuthOauth2DeleteClientJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2DeleteClientResponse, error) { - rsp, err := c.PostApiAuthOauth2DeleteClient(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2DeleteClientResponse(rsp) -} - -// PostApiAuthOauth2DeleteConsentWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2DeleteConsentResponse -func (c *ClientWithResponses) PostApiAuthOauth2DeleteConsentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2DeleteConsentResponse, error) { - rsp, err := c.PostApiAuthOauth2DeleteConsentWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2DeleteConsentResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOauth2DeleteConsentWithResponse(ctx context.Context, body PostApiAuthOauth2DeleteConsentJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2DeleteConsentResponse, error) { - rsp, err := c.PostApiAuthOauth2DeleteConsent(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2DeleteConsentResponse(rsp) -} - -// GetApiAuthOauth2EndSessionWithResponse request returning *GetApiAuthOauth2EndSessionResponse -func (c *ClientWithResponses) GetApiAuthOauth2EndSessionWithResponse(ctx context.Context, params *GetApiAuthOauth2EndSessionParams, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2EndSessionResponse, error) { - rsp, err := c.GetApiAuthOauth2EndSession(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthOauth2EndSessionResponse(rsp) -} - -// GetApiAuthOauth2GetClientWithResponse request returning *GetApiAuthOauth2GetClientResponse -func (c *ClientWithResponses) GetApiAuthOauth2GetClientWithResponse(ctx context.Context, params *GetApiAuthOauth2GetClientParams, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2GetClientResponse, error) { - rsp, err := c.GetApiAuthOauth2GetClient(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthOauth2GetClientResponse(rsp) -} - -// GetApiAuthOauth2GetClientsWithResponse request returning *GetApiAuthOauth2GetClientsResponse -func (c *ClientWithResponses) GetApiAuthOauth2GetClientsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2GetClientsResponse, error) { - rsp, err := c.GetApiAuthOauth2GetClients(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthOauth2GetClientsResponse(rsp) -} - -// GetApiAuthOauth2GetConsentWithResponse request returning *GetApiAuthOauth2GetConsentResponse -func (c *ClientWithResponses) GetApiAuthOauth2GetConsentWithResponse(ctx context.Context, params *GetApiAuthOauth2GetConsentParams, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2GetConsentResponse, error) { - rsp, err := c.GetApiAuthOauth2GetConsent(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthOauth2GetConsentResponse(rsp) -} - -// GetApiAuthOauth2GetConsentsWithResponse request returning *GetApiAuthOauth2GetConsentsResponse -func (c *ClientWithResponses) GetApiAuthOauth2GetConsentsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2GetConsentsResponse, error) { - rsp, err := c.GetApiAuthOauth2GetConsents(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthOauth2GetConsentsResponse(rsp) -} - -// PostApiAuthOauth2IntrospectWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2IntrospectResponse -func (c *ClientWithResponses) PostApiAuthOauth2IntrospectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2IntrospectResponse, error) { - rsp, err := c.PostApiAuthOauth2IntrospectWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2IntrospectResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOauth2IntrospectWithResponse(ctx context.Context, body PostApiAuthOauth2IntrospectJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2IntrospectResponse, error) { - rsp, err := c.PostApiAuthOauth2Introspect(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2IntrospectResponse(rsp) -} - -// PostApiAuthOauth2ParWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2ParResponse -func (c *ClientWithResponses) PostApiAuthOauth2ParWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ParResponse, error) { - rsp, err := c.PostApiAuthOauth2ParWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2ParResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOauth2ParWithResponse(ctx context.Context, body PostApiAuthOauth2ParJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2ParResponse, error) { - rsp, err := c.PostApiAuthOauth2Par(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2ParResponse(rsp) -} - -// GetApiAuthOauth2PublicClientWithResponse request returning *GetApiAuthOauth2PublicClientResponse -func (c *ClientWithResponses) GetApiAuthOauth2PublicClientWithResponse(ctx context.Context, params *GetApiAuthOauth2PublicClientParams, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2PublicClientResponse, error) { - rsp, err := c.GetApiAuthOauth2PublicClient(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthOauth2PublicClientResponse(rsp) -} - -// PostApiAuthOauth2PublicClientPreloginWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2PublicClientPreloginResponse -func (c *ClientWithResponses) PostApiAuthOauth2PublicClientPreloginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2PublicClientPreloginResponse, error) { - rsp, err := c.PostApiAuthOauth2PublicClientPreloginWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2PublicClientPreloginResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOauth2PublicClientPreloginWithResponse(ctx context.Context, body PostApiAuthOauth2PublicClientPreloginJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2PublicClientPreloginResponse, error) { - rsp, err := c.PostApiAuthOauth2PublicClientPrelogin(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2PublicClientPreloginResponse(rsp) -} - -// PostApiAuthOauth2RegisterWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2RegisterResponse -func (c *ClientWithResponses) PostApiAuthOauth2RegisterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2RegisterResponse, error) { - rsp, err := c.PostApiAuthOauth2RegisterWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2RegisterResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOauth2RegisterWithResponse(ctx context.Context, body PostApiAuthOauth2RegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2RegisterResponse, error) { - rsp, err := c.PostApiAuthOauth2Register(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2RegisterResponse(rsp) + return ParseCreateDynamicOAuthClientRegistrationResponse(rsp) } // DeleteDynamicOAuthClientRegistrationWithResponse request returning *DeleteDynamicOAuthClientRegistrationResponse @@ -41929,710 +27268,6 @@ func (c *ClientWithResponses) UpdateDynamicOAuthClientRegistrationWithResponse(c return ParseUpdateDynamicOAuthClientRegistrationResponse(rsp) } -// PostApiAuthOauth2RevokeWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2RevokeResponse -func (c *ClientWithResponses) PostApiAuthOauth2RevokeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2RevokeResponse, error) { - rsp, err := c.PostApiAuthOauth2RevokeWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2RevokeResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOauth2RevokeWithResponse(ctx context.Context, body PostApiAuthOauth2RevokeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2RevokeResponse, error) { - rsp, err := c.PostApiAuthOauth2Revoke(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2RevokeResponse(rsp) -} - -// PostApiAuthOauth2TokenWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2TokenResponse -func (c *ClientWithResponses) PostApiAuthOauth2TokenWithBodyWithResponse(ctx context.Context, params *PostApiAuthOauth2TokenParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2TokenResponse, error) { - rsp, err := c.PostApiAuthOauth2TokenWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2TokenResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOauth2TokenWithResponse(ctx context.Context, params *PostApiAuthOauth2TokenParams, body PostApiAuthOauth2TokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2TokenResponse, error) { - rsp, err := c.PostApiAuthOauth2Token(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2TokenResponse(rsp) -} - -// PostApiAuthOauth2UpdateClientWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2UpdateClientResponse -func (c *ClientWithResponses) PostApiAuthOauth2UpdateClientWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2UpdateClientResponse, error) { - rsp, err := c.PostApiAuthOauth2UpdateClientWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2UpdateClientResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOauth2UpdateClientWithResponse(ctx context.Context, body PostApiAuthOauth2UpdateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2UpdateClientResponse, error) { - rsp, err := c.PostApiAuthOauth2UpdateClient(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2UpdateClientResponse(rsp) -} - -// PostApiAuthOauth2UpdateConsentWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2UpdateConsentResponse -func (c *ClientWithResponses) PostApiAuthOauth2UpdateConsentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2UpdateConsentResponse, error) { - rsp, err := c.PostApiAuthOauth2UpdateConsentWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2UpdateConsentResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOauth2UpdateConsentWithResponse(ctx context.Context, body PostApiAuthOauth2UpdateConsentJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2UpdateConsentResponse, error) { - rsp, err := c.PostApiAuthOauth2UpdateConsent(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2UpdateConsentResponse(rsp) -} - -// GetApiAuthOauth2UserinfoWithResponse request returning *GetApiAuthOauth2UserinfoResponse -func (c *ClientWithResponses) GetApiAuthOauth2UserinfoWithResponse(ctx context.Context, params *GetApiAuthOauth2UserinfoParams, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2UserinfoResponse, error) { - rsp, err := c.GetApiAuthOauth2Userinfo(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthOauth2UserinfoResponse(rsp) -} - -// PostApiAuthOauth2UserinfoWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2UserinfoResponse -func (c *ClientWithResponses) PostApiAuthOauth2UserinfoWithBodyWithResponse(ctx context.Context, params *PostApiAuthOauth2UserinfoParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2UserinfoResponse, error) { - rsp, err := c.PostApiAuthOauth2UserinfoWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2UserinfoResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOauth2UserinfoWithResponse(ctx context.Context, params *PostApiAuthOauth2UserinfoParams, body PostApiAuthOauth2UserinfoJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2UserinfoResponse, error) { - rsp, err := c.PostApiAuthOauth2Userinfo(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOauth2UserinfoResponse(rsp) -} - -// GetApiAuthOkWithResponse request returning *GetApiAuthOkResponse -func (c *ClientWithResponses) GetApiAuthOkWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOkResponse, error) { - rsp, err := c.GetApiAuthOk(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthOkResponse(rsp) -} - -// PostApiAuthOrganizationAcceptInvitationWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationAcceptInvitationResponse -func (c *ClientWithResponses) PostApiAuthOrganizationAcceptInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationAcceptInvitationResponse, error) { - rsp, err := c.PostApiAuthOrganizationAcceptInvitationWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationAcceptInvitationResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOrganizationAcceptInvitationWithResponse(ctx context.Context, body PostApiAuthOrganizationAcceptInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationAcceptInvitationResponse, error) { - rsp, err := c.PostApiAuthOrganizationAcceptInvitation(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationAcceptInvitationResponse(rsp) -} - -// PostApiAuthOrganizationCancelInvitationWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationCancelInvitationResponse -func (c *ClientWithResponses) PostApiAuthOrganizationCancelInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCancelInvitationResponse, error) { - rsp, err := c.PostApiAuthOrganizationCancelInvitationWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationCancelInvitationResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOrganizationCancelInvitationWithResponse(ctx context.Context, body PostApiAuthOrganizationCancelInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCancelInvitationResponse, error) { - rsp, err := c.PostApiAuthOrganizationCancelInvitation(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationCancelInvitationResponse(rsp) -} - -// PostApiAuthOrganizationCheckSlugWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationCheckSlugResponse -func (c *ClientWithResponses) PostApiAuthOrganizationCheckSlugWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCheckSlugResponse, error) { - rsp, err := c.PostApiAuthOrganizationCheckSlugWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationCheckSlugResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOrganizationCheckSlugWithResponse(ctx context.Context, body PostApiAuthOrganizationCheckSlugJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCheckSlugResponse, error) { - rsp, err := c.PostApiAuthOrganizationCheckSlug(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationCheckSlugResponse(rsp) -} - -// PostApiAuthOrganizationCreateWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationCreateResponse -func (c *ClientWithResponses) PostApiAuthOrganizationCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCreateResponse, error) { - rsp, err := c.PostApiAuthOrganizationCreateWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationCreateResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOrganizationCreateWithResponse(ctx context.Context, body PostApiAuthOrganizationCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCreateResponse, error) { - rsp, err := c.PostApiAuthOrganizationCreate(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationCreateResponse(rsp) -} - -// PostApiAuthOrganizationDeleteWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationDeleteResponse -func (c *ClientWithResponses) PostApiAuthOrganizationDeleteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationDeleteResponse, error) { - rsp, err := c.PostApiAuthOrganizationDeleteWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationDeleteResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOrganizationDeleteWithResponse(ctx context.Context, body PostApiAuthOrganizationDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationDeleteResponse, error) { - rsp, err := c.PostApiAuthOrganizationDelete(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationDeleteResponse(rsp) -} - -// GetApiAuthOrganizationGetActiveMemberWithResponse request returning *GetApiAuthOrganizationGetActiveMemberResponse -func (c *ClientWithResponses) GetApiAuthOrganizationGetActiveMemberWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationGetActiveMemberResponse, error) { - rsp, err := c.GetApiAuthOrganizationGetActiveMember(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthOrganizationGetActiveMemberResponse(rsp) -} - -// GetApiAuthOrganizationGetActiveMemberRoleWithResponse request returning *GetApiAuthOrganizationGetActiveMemberRoleResponse -func (c *ClientWithResponses) GetApiAuthOrganizationGetActiveMemberRoleWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationGetActiveMemberRoleResponse, error) { - rsp, err := c.GetApiAuthOrganizationGetActiveMemberRole(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthOrganizationGetActiveMemberRoleResponse(rsp) -} - -// GetFullOrganizationWithResponse request returning *GetFullOrganizationResponse -func (c *ClientWithResponses) GetFullOrganizationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetFullOrganizationResponse, error) { - rsp, err := c.GetFullOrganization(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetFullOrganizationResponse(rsp) -} - -// GetApiAuthOrganizationGetInvitationWithResponse request returning *GetApiAuthOrganizationGetInvitationResponse -func (c *ClientWithResponses) GetApiAuthOrganizationGetInvitationWithResponse(ctx context.Context, params *GetApiAuthOrganizationGetInvitationParams, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationGetInvitationResponse, error) { - rsp, err := c.GetApiAuthOrganizationGetInvitation(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthOrganizationGetInvitationResponse(rsp) -} - -// GetOrganizationWithResponse request returning *GetOrganizationResponse -func (c *ClientWithResponses) GetOrganizationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOrganizationResponse, error) { - rsp, err := c.GetOrganization(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationResponse(rsp) -} - -// PostApiAuthOrganizationHasPermissionWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationHasPermissionResponse -func (c *ClientWithResponses) PostApiAuthOrganizationHasPermissionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationHasPermissionResponse, error) { - rsp, err := c.PostApiAuthOrganizationHasPermissionWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationHasPermissionResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOrganizationHasPermissionWithResponse(ctx context.Context, body PostApiAuthOrganizationHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationHasPermissionResponse, error) { - rsp, err := c.PostApiAuthOrganizationHasPermission(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationHasPermissionResponse(rsp) -} - -// CreateOrganizationInvitationWithBodyWithResponse request with arbitrary body returning *CreateOrganizationInvitationResponse -func (c *ClientWithResponses) CreateOrganizationInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrganizationInvitationResponse, error) { - rsp, err := c.CreateOrganizationInvitationWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateOrganizationInvitationResponse(rsp) -} - -func (c *ClientWithResponses) CreateOrganizationInvitationWithResponse(ctx context.Context, body CreateOrganizationInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrganizationInvitationResponse, error) { - rsp, err := c.CreateOrganizationInvitation(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateOrganizationInvitationResponse(rsp) -} - -// PostApiAuthOrganizationLeaveWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationLeaveResponse -func (c *ClientWithResponses) PostApiAuthOrganizationLeaveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationLeaveResponse, error) { - rsp, err := c.PostApiAuthOrganizationLeaveWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationLeaveResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOrganizationLeaveWithResponse(ctx context.Context, body PostApiAuthOrganizationLeaveJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationLeaveResponse, error) { - rsp, err := c.PostApiAuthOrganizationLeave(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationLeaveResponse(rsp) -} - -// GetApiAuthOrganizationListWithResponse request returning *GetApiAuthOrganizationListResponse -func (c *ClientWithResponses) GetApiAuthOrganizationListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListResponse, error) { - rsp, err := c.GetApiAuthOrganizationList(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthOrganizationListResponse(rsp) -} - -// GetApiAuthOrganizationListInvitationsWithResponse request returning *GetApiAuthOrganizationListInvitationsResponse -func (c *ClientWithResponses) GetApiAuthOrganizationListInvitationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListInvitationsResponse, error) { - rsp, err := c.GetApiAuthOrganizationListInvitations(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthOrganizationListInvitationsResponse(rsp) -} - -// GetApiAuthOrganizationListMembersWithResponse request returning *GetApiAuthOrganizationListMembersResponse -func (c *ClientWithResponses) GetApiAuthOrganizationListMembersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListMembersResponse, error) { - rsp, err := c.GetApiAuthOrganizationListMembers(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthOrganizationListMembersResponse(rsp) -} - -// GetApiAuthOrganizationListUserInvitationsWithResponse request returning *GetApiAuthOrganizationListUserInvitationsResponse -func (c *ClientWithResponses) GetApiAuthOrganizationListUserInvitationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListUserInvitationsResponse, error) { - rsp, err := c.GetApiAuthOrganizationListUserInvitations(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthOrganizationListUserInvitationsResponse(rsp) -} - -// PostApiAuthOrganizationRejectInvitationWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationRejectInvitationResponse -func (c *ClientWithResponses) PostApiAuthOrganizationRejectInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRejectInvitationResponse, error) { - rsp, err := c.PostApiAuthOrganizationRejectInvitationWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationRejectInvitationResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOrganizationRejectInvitationWithResponse(ctx context.Context, body PostApiAuthOrganizationRejectInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRejectInvitationResponse, error) { - rsp, err := c.PostApiAuthOrganizationRejectInvitation(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationRejectInvitationResponse(rsp) -} - -// PostApiAuthOrganizationRemoveMemberWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationRemoveMemberResponse -func (c *ClientWithResponses) PostApiAuthOrganizationRemoveMemberWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRemoveMemberResponse, error) { - rsp, err := c.PostApiAuthOrganizationRemoveMemberWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationRemoveMemberResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOrganizationRemoveMemberWithResponse(ctx context.Context, body PostApiAuthOrganizationRemoveMemberJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRemoveMemberResponse, error) { - rsp, err := c.PostApiAuthOrganizationRemoveMember(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationRemoveMemberResponse(rsp) -} - -// SetActiveOrganizationWithBodyWithResponse request with arbitrary body returning *SetActiveOrganizationResponse -func (c *ClientWithResponses) SetActiveOrganizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetActiveOrganizationResponse, error) { - rsp, err := c.SetActiveOrganizationWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSetActiveOrganizationResponse(rsp) -} - -func (c *ClientWithResponses) SetActiveOrganizationWithResponse(ctx context.Context, body SetActiveOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*SetActiveOrganizationResponse, error) { - rsp, err := c.SetActiveOrganization(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSetActiveOrganizationResponse(rsp) -} - -// PostApiAuthOrganizationUpdateWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationUpdateResponse -func (c *ClientWithResponses) PostApiAuthOrganizationUpdateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationUpdateResponse, error) { - rsp, err := c.PostApiAuthOrganizationUpdateWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationUpdateResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthOrganizationUpdateWithResponse(ctx context.Context, body PostApiAuthOrganizationUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationUpdateResponse, error) { - rsp, err := c.PostApiAuthOrganizationUpdate(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthOrganizationUpdateResponse(rsp) -} - -// UpdateOrganizationMemberRoleWithBodyWithResponse request with arbitrary body returning *UpdateOrganizationMemberRoleResponse -func (c *ClientWithResponses) UpdateOrganizationMemberRoleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOrganizationMemberRoleResponse, error) { - rsp, err := c.UpdateOrganizationMemberRoleWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateOrganizationMemberRoleResponse(rsp) -} - -func (c *ClientWithResponses) UpdateOrganizationMemberRoleWithResponse(ctx context.Context, body UpdateOrganizationMemberRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOrganizationMemberRoleResponse, error) { - rsp, err := c.UpdateOrganizationMemberRole(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateOrganizationMemberRoleResponse(rsp) -} - -// PostApiAuthRefreshTokenWithBodyWithResponse request with arbitrary body returning *PostApiAuthRefreshTokenResponse -func (c *ClientWithResponses) PostApiAuthRefreshTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRefreshTokenResponse, error) { - rsp, err := c.PostApiAuthRefreshTokenWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthRefreshTokenResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthRefreshTokenWithResponse(ctx context.Context, body PostApiAuthRefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRefreshTokenResponse, error) { - rsp, err := c.PostApiAuthRefreshToken(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthRefreshTokenResponse(rsp) -} - -// RequestPasswordResetWithBodyWithResponse request with arbitrary body returning *RequestPasswordResetResponse -func (c *ClientWithResponses) RequestPasswordResetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestPasswordResetResponse, error) { - rsp, err := c.RequestPasswordResetWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseRequestPasswordResetResponse(rsp) -} - -func (c *ClientWithResponses) RequestPasswordResetWithResponse(ctx context.Context, body RequestPasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestPasswordResetResponse, error) { - rsp, err := c.RequestPasswordReset(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseRequestPasswordResetResponse(rsp) -} - -// ResetPasswordWithBodyWithResponse request with arbitrary body returning *ResetPasswordResponse -func (c *ClientWithResponses) ResetPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResetPasswordResponse, error) { - rsp, err := c.ResetPasswordWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseResetPasswordResponse(rsp) -} - -func (c *ClientWithResponses) ResetPasswordWithResponse(ctx context.Context, body ResetPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ResetPasswordResponse, error) { - rsp, err := c.ResetPassword(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseResetPasswordResponse(rsp) -} - -// ResetPasswordCallbackWithResponse request returning *ResetPasswordCallbackResponse -func (c *ClientWithResponses) ResetPasswordCallbackWithResponse(ctx context.Context, token string, params *ResetPasswordCallbackParams, reqEditors ...RequestEditorFn) (*ResetPasswordCallbackResponse, error) { - rsp, err := c.ResetPasswordCallback(ctx, token, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseResetPasswordCallbackResponse(rsp) -} - -// PostApiAuthRevokeOtherSessionsWithBodyWithResponse request with arbitrary body returning *PostApiAuthRevokeOtherSessionsResponse -func (c *ClientWithResponses) PostApiAuthRevokeOtherSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeOtherSessionsResponse, error) { - rsp, err := c.PostApiAuthRevokeOtherSessionsWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthRevokeOtherSessionsResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthRevokeOtherSessionsWithResponse(ctx context.Context, body PostApiAuthRevokeOtherSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeOtherSessionsResponse, error) { - rsp, err := c.PostApiAuthRevokeOtherSessions(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthRevokeOtherSessionsResponse(rsp) -} - -// PostApiAuthRevokeSessionWithBodyWithResponse request with arbitrary body returning *PostApiAuthRevokeSessionResponse -func (c *ClientWithResponses) PostApiAuthRevokeSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionResponse, error) { - rsp, err := c.PostApiAuthRevokeSessionWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthRevokeSessionResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthRevokeSessionWithResponse(ctx context.Context, body PostApiAuthRevokeSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionResponse, error) { - rsp, err := c.PostApiAuthRevokeSession(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthRevokeSessionResponse(rsp) -} - -// PostApiAuthRevokeSessionsWithBodyWithResponse request with arbitrary body returning *PostApiAuthRevokeSessionsResponse -func (c *ClientWithResponses) PostApiAuthRevokeSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionsResponse, error) { - rsp, err := c.PostApiAuthRevokeSessionsWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthRevokeSessionsResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthRevokeSessionsWithResponse(ctx context.Context, body PostApiAuthRevokeSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionsResponse, error) { - rsp, err := c.PostApiAuthRevokeSessions(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthRevokeSessionsResponse(rsp) -} - -// SendVerificationEmailWithBodyWithResponse request with arbitrary body returning *SendVerificationEmailResponse -func (c *ClientWithResponses) SendVerificationEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendVerificationEmailResponse, error) { - rsp, err := c.SendVerificationEmailWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSendVerificationEmailResponse(rsp) -} - -func (c *ClientWithResponses) SendVerificationEmailWithResponse(ctx context.Context, body SendVerificationEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*SendVerificationEmailResponse, error) { - rsp, err := c.SendVerificationEmail(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSendVerificationEmailResponse(rsp) -} - -// SignInEmailWithBodyWithResponse request with arbitrary body returning *SignInEmailResponse -func (c *ClientWithResponses) SignInEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignInEmailResponse, error) { - rsp, err := c.SignInEmailWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSignInEmailResponse(rsp) -} - -func (c *ClientWithResponses) SignInEmailWithResponse(ctx context.Context, body SignInEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*SignInEmailResponse, error) { - rsp, err := c.SignInEmail(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSignInEmailResponse(rsp) -} - -// SocialSignInWithBodyWithResponse request with arbitrary body returning *SocialSignInResponse -func (c *ClientWithResponses) SocialSignInWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SocialSignInResponse, error) { - rsp, err := c.SocialSignInWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSocialSignInResponse(rsp) -} - -func (c *ClientWithResponses) SocialSignInWithResponse(ctx context.Context, body SocialSignInJSONRequestBody, reqEditors ...RequestEditorFn) (*SocialSignInResponse, error) { - rsp, err := c.SocialSignIn(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSocialSignInResponse(rsp) -} - -// PostApiAuthSignInUsernameWithBodyWithResponse request with arbitrary body returning *PostApiAuthSignInUsernameResponse -func (c *ClientWithResponses) PostApiAuthSignInUsernameWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthSignInUsernameResponse, error) { - rsp, err := c.PostApiAuthSignInUsernameWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthSignInUsernameResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthSignInUsernameWithResponse(ctx context.Context, body PostApiAuthSignInUsernameJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthSignInUsernameResponse, error) { - rsp, err := c.PostApiAuthSignInUsername(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthSignInUsernameResponse(rsp) -} - -// SignOutWithBodyWithResponse request with arbitrary body returning *SignOutResponse -func (c *ClientWithResponses) SignOutWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignOutResponse, error) { - rsp, err := c.SignOutWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSignOutResponse(rsp) -} - -func (c *ClientWithResponses) SignOutWithResponse(ctx context.Context, body SignOutJSONRequestBody, reqEditors ...RequestEditorFn) (*SignOutResponse, error) { - rsp, err := c.SignOut(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSignOutResponse(rsp) -} - -// SignUpWithEmailAndPasswordWithBodyWithResponse request with arbitrary body returning *SignUpWithEmailAndPasswordResponse -func (c *ClientWithResponses) SignUpWithEmailAndPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignUpWithEmailAndPasswordResponse, error) { - rsp, err := c.SignUpWithEmailAndPasswordWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSignUpWithEmailAndPasswordResponse(rsp) -} - -func (c *ClientWithResponses) SignUpWithEmailAndPasswordWithResponse(ctx context.Context, body SignUpWithEmailAndPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*SignUpWithEmailAndPasswordResponse, error) { - rsp, err := c.SignUpWithEmailAndPassword(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSignUpWithEmailAndPasswordResponse(rsp) -} - -// GetJSONWebTokenWithResponse request returning *GetJSONWebTokenResponse -func (c *ClientWithResponses) GetJSONWebTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJSONWebTokenResponse, error) { - rsp, err := c.GetJSONWebToken(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetJSONWebTokenResponse(rsp) -} - -// PostApiAuthUnlinkAccountWithBodyWithResponse request with arbitrary body returning *PostApiAuthUnlinkAccountResponse -func (c *ClientWithResponses) PostApiAuthUnlinkAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthUnlinkAccountResponse, error) { - rsp, err := c.PostApiAuthUnlinkAccountWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthUnlinkAccountResponse(rsp) -} - -func (c *ClientWithResponses) PostApiAuthUnlinkAccountWithResponse(ctx context.Context, body PostApiAuthUnlinkAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthUnlinkAccountResponse, error) { - rsp, err := c.PostApiAuthUnlinkAccount(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostApiAuthUnlinkAccountResponse(rsp) -} - -// UpdateSessionWithBodyWithResponse request with arbitrary body returning *UpdateSessionResponse -func (c *ClientWithResponses) UpdateSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSessionResponse, error) { - rsp, err := c.UpdateSessionWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSessionResponse(rsp) -} - -func (c *ClientWithResponses) UpdateSessionWithResponse(ctx context.Context, body UpdateSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSessionResponse, error) { - rsp, err := c.UpdateSession(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSessionResponse(rsp) -} - -// UpdateUserWithBodyWithResponse request with arbitrary body returning *UpdateUserResponse -func (c *ClientWithResponses) UpdateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error) { - rsp, err := c.UpdateUserWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateUserResponse(rsp) -} - -func (c *ClientWithResponses) UpdateUserWithResponse(ctx context.Context, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error) { - rsp, err := c.UpdateUser(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateUserResponse(rsp) -} - -// GetApiAuthVerifyEmailWithResponse request returning *GetApiAuthVerifyEmailResponse -func (c *ClientWithResponses) GetApiAuthVerifyEmailWithResponse(ctx context.Context, params *GetApiAuthVerifyEmailParams, reqEditors ...RequestEditorFn) (*GetApiAuthVerifyEmailResponse, error) { - rsp, err := c.GetApiAuthVerifyEmail(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetApiAuthVerifyEmailResponse(rsp) -} - -// VerifyPasswordWithBodyWithResponse request with arbitrary body returning *VerifyPasswordResponse -func (c *ClientWithResponses) VerifyPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyPasswordResponse, error) { - rsp, err := c.VerifyPasswordWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseVerifyPasswordResponse(rsp) -} - -func (c *ClientWithResponses) VerifyPasswordWithResponse(ctx context.Context, body VerifyPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyPasswordResponse, error) { - rsp, err := c.VerifyPassword(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseVerifyPasswordResponse(rsp) -} - // ListBackgroundJobsWithResponse request returning *ListBackgroundJobsResponse func (c *ClientWithResponses) ListBackgroundJobsWithResponse(ctx context.Context, params *ListBackgroundJobsParams, reqEditors ...RequestEditorFn) (*ListBackgroundJobsResponse, error) { rsp, err := c.ListBackgroundJobs(ctx, params, reqEditors...) @@ -44460,2670 +29095,15 @@ func (c *ClientWithResponses) GetUserProfileWithResponse(ctx context.Context, us return ParseGetUserProfileResponse(rsp) } -// ParseGetApiAuthAccountInfoResponse parses an HTTP response from a GetApiAuthAccountInfoWithResponse call -func ParseGetApiAuthAccountInfoResponse(rsp *http.Response) (*GetApiAuthAccountInfoResponse, error) { +// ParseCreateDeviceAuthorizationResponse parses an HTTP response from a CreateDeviceAuthorizationWithResponse call +func ParseCreateDeviceAuthorizationResponse(rsp *http.Response) (*CreateDeviceAuthorizationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetApiAuthAccountInfoResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Account struct { - Id string `json:"id"` - Issuer string `json:"issuer"` - ProviderAccountId string `json:"providerAccountId"` - ProviderId string `json:"providerId"` - } `json:"account"` - Data map[string]interface{} `json:"data"` - User struct { - Email *string `json:"email,omitempty"` - EmailVerified bool `json:"emailVerified"` - Image *string `json:"image,omitempty"` - Name *string `json:"name,omitempty"` - } `json:"user"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseBanUserResponse parses an HTTP response from a BanUserWithResponse call -func ParseBanUserResponse(rsp *http.Response) (*BanUserResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &BanUserResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - User *User `json:"user,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateUserResponse parses an HTTP response from a CreateUserWithResponse call -func ParseCreateUserResponse(rsp *http.Response) (*CreateUserResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateUserResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - User *User `json:"user,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetUserResponse parses an HTTP response from a GetUserWithResponse call -func ParseGetUserResponse(rsp *http.Response) (*GetUserResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetUserResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - User *User `json:"user,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthAdminHasPermissionResponse parses an HTTP response from a PostApiAuthAdminHasPermissionWithResponse call -func ParsePostApiAuthAdminHasPermissionResponse(rsp *http.Response) (*PostApiAuthAdminHasPermissionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthAdminHasPermissionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Error *string `json:"error,omitempty"` - Success bool `json:"success"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseImpersonateUserResponse parses an HTTP response from a ImpersonateUserWithResponse call -func ParseImpersonateUserResponse(rsp *http.Response) (*ImpersonateUserResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ImpersonateUserResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Session *Session `json:"session,omitempty"` - User *User `json:"user,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseAdminListUserSessionsResponse parses an HTTP response from a AdminListUserSessionsWithResponse call -func ParseAdminListUserSessionsResponse(rsp *http.Response) (*AdminListUserSessionsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &AdminListUserSessionsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Sessions *[]Session `json:"sessions,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseListUsersResponse parses an HTTP response from a ListUsersWithResponse call -func ParseListUsersResponse(rsp *http.Response) (*ListUsersResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListUsersResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Limit *float32 `json:"limit,omitempty"` - Offset *float32 `json:"offset,omitempty"` - Total float32 `json:"total"` - Users []User `json:"users"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseRemoveUserResponse parses an HTTP response from a RemoveUserWithResponse call -func ParseRemoveUserResponse(rsp *http.Response) (*RemoveUserResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &RemoveUserResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Success *bool `json:"success,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseRevokeUserSessionResponse parses an HTTP response from a RevokeUserSessionWithResponse call -func ParseRevokeUserSessionResponse(rsp *http.Response) (*RevokeUserSessionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &RevokeUserSessionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Success *bool `json:"success,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseRevokeUserSessionsResponse parses an HTTP response from a RevokeUserSessionsWithResponse call -func ParseRevokeUserSessionsResponse(rsp *http.Response) (*RevokeUserSessionsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &RevokeUserSessionsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Success *bool `json:"success,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseSetUserRoleResponse parses an HTTP response from a SetUserRoleWithResponse call -func ParseSetUserRoleResponse(rsp *http.Response) (*SetUserRoleResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &SetUserRoleResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - User *User `json:"user,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseSetUserPasswordResponse parses an HTTP response from a SetUserPasswordWithResponse call -func ParseSetUserPasswordResponse(rsp *http.Response) (*SetUserPasswordResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &SetUserPasswordResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Status *bool `json:"status,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthAdminStopImpersonatingResponse parses an HTTP response from a PostApiAuthAdminStopImpersonatingWithResponse call -func ParsePostApiAuthAdminStopImpersonatingResponse(rsp *http.Response) (*PostApiAuthAdminStopImpersonatingResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthAdminStopImpersonatingResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseUnbanUserResponse parses an HTTP response from a UnbanUserWithResponse call -func ParseUnbanUserResponse(rsp *http.Response) (*UnbanUserResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UnbanUserResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - User *User `json:"user,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseAdminUpdateUserResponse parses an HTTP response from a AdminUpdateUserWithResponse call -func ParseAdminUpdateUserResponse(rsp *http.Response) (*AdminUpdateUserResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &AdminUpdateUserResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - User *User `json:"user,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthApiKeyCreateResponse parses an HTTP response from a PostApiAuthApiKeyCreateWithResponse call -func ParsePostApiAuthApiKeyCreateResponse(rsp *http.Response) (*PostApiAuthApiKeyCreateResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthApiKeyCreateResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // CreatedAt Creation timestamp - CreatedAt time.Time `json:"createdAt"` - - // Enabled Whether the key is enabled - Enabled bool `json:"enabled"` - - // ExpiresAt Expiration timestamp - ExpiresAt *time.Time `json:"expiresAt,omitempty"` - - // Id Unique identifier of the API key - Id string `json:"id"` - - // Key The full API key (only returned on creation) - Key string `json:"key"` - - // LastRefillAt Last refill timestamp - LastRefillAt *time.Time `json:"lastRefillAt,omitempty"` - - // LastRequest Last request timestamp - LastRequest *time.Time `json:"lastRequest,omitempty"` - - // Metadata Metadata associated with the key - Metadata *map[string]interface{} `json:"metadata,omitempty"` - - // Name Name of the API key - Name *string `json:"name,omitempty"` - - // Permissions Permissions associated with the key - Permissions *map[string][]string `json:"permissions,omitempty"` - - // Prefix Prefix of the API key - Prefix *string `json:"prefix,omitempty"` - - // RateLimitEnabled Whether rate limiting is enabled - RateLimitEnabled bool `json:"rateLimitEnabled"` - - // RateLimitMax Maximum requests in time window - RateLimitMax *float32 `json:"rateLimitMax,omitempty"` - - // RateLimitTimeWindow Rate limit time window in milliseconds - RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"` - - // ReferenceId ID of the reference owning the key - ReferenceId string `json:"referenceId"` - - // RefillAmount Amount to refill - RefillAmount *float32 `json:"refillAmount,omitempty"` - - // RefillInterval Refill interval in milliseconds - RefillInterval *float32 `json:"refillInterval,omitempty"` - - // Remaining Remaining requests - Remaining *float32 `json:"remaining,omitempty"` - - // RequestCount Current request count in window - RequestCount float32 `json:"requestCount"` - - // Start Starting characters of the key (if configured) - Start *string `json:"start,omitempty"` - - // UpdatedAt Last update timestamp - UpdatedAt time.Time `json:"updatedAt"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthApiKeyDeleteResponse parses an HTTP response from a PostApiAuthApiKeyDeleteWithResponse call -func ParsePostApiAuthApiKeyDeleteResponse(rsp *http.Response) (*PostApiAuthApiKeyDeleteResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthApiKeyDeleteResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Success Indicates if the API key was successfully deleted - Success bool `json:"success"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthApiKeyGetResponse parses an HTTP response from a GetApiAuthApiKeyGetWithResponse call -func ParseGetApiAuthApiKeyGetResponse(rsp *http.Response) (*GetApiAuthApiKeyGetResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthApiKeyGetResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // CreatedAt created at - CreatedAt time.Time `json:"createdAt"` - - // Enabled Sets if key is enabled or disabled - Enabled bool `json:"enabled"` - - // ExpiresAt Expiry date of a key - ExpiresAt *time.Time `json:"expiresAt,omitempty"` - - // Id ID - Id string `json:"id"` - - // LastRefillAt The last refill date - LastRefillAt *time.Time `json:"lastRefillAt,omitempty"` - - // LastRequest When last request occurred - LastRequest *time.Time `json:"lastRequest,omitempty"` - - // Metadata Extra metadata about the apiKey - Metadata *map[string]interface{} `json:"metadata,omitempty"` - - // Name The name of the key - Name *string `json:"name,omitempty"` - - // Permissions Permissions for the api key (stored as JSON string) - Permissions *string `json:"permissions,omitempty"` - - // Prefix The API Key prefix. Stored as plain text. - Prefix *string `json:"prefix,omitempty"` - - // RateLimitEnabled Whether the key has rate limiting enabled - RateLimitEnabled bool `json:"rateLimitEnabled"` - - // RateLimitMax Maximum amount of requests allowed within a window - RateLimitMax *float32 `json:"rateLimitMax,omitempty"` - - // RateLimitTimeWindow The duration in milliseconds - RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"` - - // RefillAmount The amount to refill - RefillAmount *float32 `json:"refillAmount,omitempty"` - - // RefillInterval The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h) - RefillInterval *float32 `json:"refillInterval,omitempty"` - - // Remaining Remaining requests (every time api key is used this should updated and should be updated on refill as well) - Remaining *float32 `json:"remaining,omitempty"` - - // RequestCount The number of requests made within the rate limit time window - RequestCount float32 `json:"requestCount"` - - // Start Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key. - Start *string `json:"start,omitempty"` - - // UpdatedAt updated at - UpdatedAt time.Time `json:"updatedAt"` - - // UserId The owner of the user id - UserId string `json:"userId"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthApiKeyListResponse parses an HTTP response from a GetApiAuthApiKeyListWithResponse call -func ParseGetApiAuthApiKeyListResponse(rsp *http.Response) (*GetApiAuthApiKeyListResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthApiKeyListResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - ApiKeys []struct { - // CreatedAt created at - CreatedAt time.Time `json:"createdAt"` - - // Enabled Sets if key is enabled or disabled - Enabled bool `json:"enabled"` - - // ExpiresAt Expiry date of a key - ExpiresAt *time.Time `json:"expiresAt,omitempty"` - - // Id ID - Id string `json:"id"` - - // LastRefillAt The last refill date - LastRefillAt *time.Time `json:"lastRefillAt,omitempty"` - - // LastRequest When last request occurred - LastRequest *time.Time `json:"lastRequest,omitempty"` - - // Metadata Extra metadata about the apiKey - Metadata *map[string]interface{} `json:"metadata,omitempty"` - - // Name The name of the key - Name *string `json:"name,omitempty"` - - // Permissions Permissions for the api key (stored as JSON string) - Permissions *string `json:"permissions,omitempty"` - - // Prefix The API Key prefix. Stored as plain text. - Prefix *string `json:"prefix,omitempty"` - - // RateLimitEnabled Whether the key has rate limiting enabled - RateLimitEnabled bool `json:"rateLimitEnabled"` - - // RateLimitMax Maximum amount of requests allowed within a window - RateLimitMax *float32 `json:"rateLimitMax,omitempty"` - - // RateLimitTimeWindow The duration in milliseconds - RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"` - - // RefillAmount The amount to refill - RefillAmount *float32 `json:"refillAmount,omitempty"` - - // RefillInterval The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h) - RefillInterval *float32 `json:"refillInterval,omitempty"` - - // Remaining Remaining requests (every time api key is used this should updated and should be updated on refill as well) - Remaining *float32 `json:"remaining,omitempty"` - - // RequestCount The number of requests made within the rate limit time window - RequestCount float32 `json:"requestCount"` - - // Start Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key. - Start *string `json:"start,omitempty"` - - // UpdatedAt updated at - UpdatedAt time.Time `json:"updatedAt"` - - // UserId The owner of the user id - UserId string `json:"userId"` - } `json:"apiKeys"` - - // Limit The limit used for pagination - Limit *float32 `json:"limit,omitempty"` - - // Offset The offset used for pagination - Offset *float32 `json:"offset,omitempty"` - - // Total Total number of API keys - Total float32 `json:"total"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthApiKeyUpdateResponse parses an HTTP response from a PostApiAuthApiKeyUpdateWithResponse call -func ParsePostApiAuthApiKeyUpdateResponse(rsp *http.Response) (*PostApiAuthApiKeyUpdateResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthApiKeyUpdateResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // CreatedAt created at - CreatedAt time.Time `json:"createdAt"` - - // Enabled Sets if key is enabled or disabled - Enabled bool `json:"enabled"` - - // ExpiresAt Expiry date of a key - ExpiresAt *time.Time `json:"expiresAt,omitempty"` - - // Id ID - Id string `json:"id"` - - // LastRefillAt The last refill date - LastRefillAt *time.Time `json:"lastRefillAt,omitempty"` - - // LastRequest When last request occurred - LastRequest *time.Time `json:"lastRequest,omitempty"` - - // Metadata Extra metadata about the apiKey - Metadata *map[string]interface{} `json:"metadata,omitempty"` - - // Name The name of the key - Name *string `json:"name,omitempty"` - - // Permissions Permissions for the api key (stored as JSON string) - Permissions *string `json:"permissions,omitempty"` - - // Prefix The API Key prefix. Stored as plain text. - Prefix *string `json:"prefix,omitempty"` - - // RateLimitEnabled Whether the key has rate limiting enabled - RateLimitEnabled bool `json:"rateLimitEnabled"` - - // RateLimitMax Maximum amount of requests allowed within a window - RateLimitMax *float32 `json:"rateLimitMax,omitempty"` - - // RateLimitTimeWindow The duration in milliseconds - RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"` - - // RefillAmount The amount to refill - RefillAmount *float32 `json:"refillAmount,omitempty"` - - // RefillInterval The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h) - RefillInterval *float32 `json:"refillInterval,omitempty"` - - // Remaining Remaining requests (every time api key is used this should updated and should be updated on refill as well) - Remaining *float32 `json:"remaining,omitempty"` - - // RequestCount The number of requests made within the rate limit time window - RequestCount float32 `json:"requestCount"` - - // Start Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key. - Start *string `json:"start,omitempty"` - - // UpdatedAt updated at - UpdatedAt time.Time `json:"updatedAt"` - - // UserId The owner of the user id - UserId string `json:"userId"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthCallbackIdResponse parses an HTTP response from a GetApiAuthCallbackIdWithResponse call -func ParseGetApiAuthCallbackIdResponse(rsp *http.Response) (*GetApiAuthCallbackIdResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthCallbackIdResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthCallbackIdResponse parses an HTTP response from a PostApiAuthCallbackIdWithResponse call -func ParsePostApiAuthCallbackIdResponse(rsp *http.Response) (*PostApiAuthCallbackIdResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthCallbackIdResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseChangeEmailResponse parses an HTTP response from a ChangeEmailWithResponse call -func ParseChangeEmailResponse(rsp *http.Response) (*ChangeEmailResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ChangeEmailResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Message Status message of the email change process - Message *ChangeEmail200JSONResponseBodyMessage `json:"message,omitempty"` - - // Status Indicates if the request was successful - Status bool `json:"status"` - User *User `json:"user,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseChangePasswordResponse parses an HTTP response from a ChangePasswordWithResponse call -func ParseChangePasswordResponse(rsp *http.Response) (*ChangePasswordResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ChangePasswordResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Token New session token if other sessions were revoked - Token *string `json:"token,omitempty"` - User struct { - // CreatedAt When the user was created - CreatedAt time.Time `json:"createdAt"` - - // Email The email address of the user - Email openapi_types.Email `json:"email"` - - // EmailVerified Whether the email has been verified - EmailVerified bool `json:"emailVerified"` - - // Id The unique identifier of the user - Id string `json:"id"` - - // Image The profile image URL of the user - Image *string `json:"image,omitempty"` - - // Name The name of the user - Name string `json:"name"` - - // UpdatedAt When the user was last updated - UpdatedAt time.Time `json:"updatedAt"` - } `json:"user"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseDeleteUserResponse parses an HTTP response from a DeleteUserWithResponse call -func ParseDeleteUserResponse(rsp *http.Response) (*DeleteUserResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteUserResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Message Status message of the deletion process - Message DeleteUser200JSONResponseBodyMessage `json:"message"` - - // Success Indicates if the operation was successful - Success bool `json:"success"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthDeleteUserCallbackResponse parses an HTTP response from a GetApiAuthDeleteUserCallbackWithResponse call -func ParseGetApiAuthDeleteUserCallbackResponse(rsp *http.Response) (*GetApiAuthDeleteUserCallbackResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthDeleteUserCallbackResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Message Confirmation message - Message GetApiAuthDeleteUserCallback200JSONResponseBodyMessage `json:"message"` - - // Success Indicates if the deletion was successful - Success bool `json:"success"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthDeviceResponse parses an HTTP response from a GetApiAuthDeviceWithResponse call -func ParseGetApiAuthDeviceResponse(rsp *http.Response) (*GetApiAuthDeviceResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthDeviceResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Status Current status of the device authorization - Status *GetApiAuthDevice200JSONResponseBodyStatus `json:"status,omitempty"` - - // UserCode The user code to verify - UserCode *string `json:"user_code,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthDeviceApproveResponse parses an HTTP response from a PostApiAuthDeviceApproveWithResponse call -func ParsePostApiAuthDeviceApproveResponse(rsp *http.Response) (*PostApiAuthDeviceApproveResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthDeviceApproveResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Success *bool `json:"success,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthDeviceCodeResponse parses an HTTP response from a PostApiAuthDeviceCodeWithResponse call -func ParsePostApiAuthDeviceCodeResponse(rsp *http.Response) (*PostApiAuthDeviceCodeResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthDeviceCodeResponse{ + response := &CreateDeviceAuthorizationResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -47156,8 +29136,8 @@ func ParsePostApiAuthDeviceCodeResponse(rsp *http.Response) (*PostApiAuthDeviceC case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest struct { - Error *PostApiAuthDeviceCode400JSONResponseBodyError `json:"error,omitempty"` - ErrorDescription *string `json:"error_description,omitempty"` + Error *CreateDeviceAuthorization400JSONResponseBodyError `json:"error,omitempty"` + ErrorDescription *string `json:"error_description,omitempty"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -47214,97 +29194,15 @@ func ParsePostApiAuthDeviceCodeResponse(rsp *http.Response) (*PostApiAuthDeviceC return response, nil } -// ParsePostApiAuthDeviceDenyResponse parses an HTTP response from a PostApiAuthDeviceDenyWithResponse call -func ParsePostApiAuthDeviceDenyResponse(rsp *http.Response) (*PostApiAuthDeviceDenyResponse, error) { +// ParseCreateDeviceAccessTokenResponse parses an HTTP response from a CreateDeviceAccessTokenWithResponse call +func ParseCreateDeviceAccessTokenResponse(rsp *http.Response) (*CreateDeviceAccessTokenResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PostApiAuthDeviceDenyResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Success *bool `json:"success,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthDeviceTokenResponse parses an HTTP response from a PostApiAuthDeviceTokenWithResponse call -func ParsePostApiAuthDeviceTokenResponse(rsp *http.Response) (*PostApiAuthDeviceTokenResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthDeviceTokenResponse{ + response := &CreateDeviceAccessTokenResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -47324,762 +29222,8 @@ func ParsePostApiAuthDeviceTokenResponse(rsp *http.Response) (*PostApiAuthDevice case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest struct { - Error *PostApiAuthDeviceToken400JSONResponseBodyError `json:"error,omitempty"` - ErrorDescription *string `json:"error_description,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthErrorResponse parses an HTTP response from a GetApiAuthErrorWithResponse call -func ParseGetApiAuthErrorResponse(rsp *http.Response) (*GetApiAuthErrorResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthErrorResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthGetAccessTokenResponse parses an HTTP response from a PostApiAuthGetAccessTokenWithResponse call -func ParsePostApiAuthGetAccessTokenResponse(rsp *http.Response) (*PostApiAuthGetAccessTokenResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthGetAccessTokenResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - AccessToken *string `json:"accessToken,omitempty"` - AccessTokenExpiresAt *time.Time `json:"accessTokenExpiresAt,omitempty"` - IdToken *string `json:"idToken,omitempty"` - TokenType *string `json:"tokenType,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetSessionResponse parses an HTTP response from a GetSessionWithResponse call -func ParseGetSessionResponse(rsp *http.Response) (*GetSessionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetSessionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Session Session `json:"session"` - User User `json:"user"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetSessionPostResponse parses an HTTP response from a GetSessionPostWithResponse call -func ParseGetSessionPostResponse(rsp *http.Response) (*GetSessionPostResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetSessionPostResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Session Session `json:"session"` - User User `json:"user"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthIsUsernameAvailableResponse parses an HTTP response from a PostApiAuthIsUsernameAvailableWithResponse call -func ParsePostApiAuthIsUsernameAvailableResponse(rsp *http.Response) (*PostApiAuthIsUsernameAvailableResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthIsUsernameAvailableResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetJSONWebKeySetResponse parses an HTTP response from a GetJSONWebKeySetWithResponse call -func ParseGetJSONWebKeySetResponse(rsp *http.Response) (*GetJSONWebKeySetResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetJSONWebKeySetResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Keys Array of public JSON Web Keys - Keys []struct { - // Alg Algorithm intended for use with the key (e.g., 'EdDSA', 'RS256') - Alg string `json:"alg"` - - // Crv Curve name for elliptic curve keys (e.g., 'Ed25519', 'P-256') - Crv *string `json:"crv,omitempty"` - - // E Exponent for RSA keys (base64url-encoded) - E *string `json:"e,omitempty"` - - // Kid Key ID uniquely identifying the key, corresponds to the 'id' from the stored Jwk - Kid string `json:"kid"` - - // Kty Key type (e.g., 'RSA', 'EC', 'OKP') - Kty string `json:"kty"` - - // N Modulus for RSA keys (base64url-encoded) - N *string `json:"n,omitempty"` - - // Use Intended use of the public key (e.g., 'sig' for signature) - Use *GetJSONWebKeySet200JSONResponseBodyKeysUse `json:"use,omitempty"` - - // X X coordinate for elliptic curve keys (base64url-encoded) - X *string `json:"x,omitempty"` - - // Y Y coordinate for elliptic curve keys (base64url-encoded) - Y *string `json:"y,omitempty"` - } `json:"keys"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseLinkSocialAccountResponse parses an HTTP response from a LinkSocialAccountWithResponse call -func ParseLinkSocialAccountResponse(rsp *http.Response) (*LinkSocialAccountResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &LinkSocialAccountResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Redirect Indicates if the user should be redirected to the authorization URL - Redirect bool `json:"redirect"` - Status *bool `json:"status,omitempty"` - - // Url The authorization URL to redirect the user to - Url *string `json:"url,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseListUserAccountsResponse parses an HTTP response from a ListUserAccountsWithResponse call -func ParseListUserAccountsResponse(rsp *http.Response) (*ListUserAccountsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListUserAccountsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []struct { - CreatedAt time.Time `json:"createdAt"` - Id string `json:"id"` - Issuer string `json:"issuer"` - ProviderAccountId string `json:"providerAccountId"` - ProviderId string `json:"providerId"` - Scopes []string `json:"scopes"` - UpdatedAt time.Time `json:"updatedAt"` - UserId string `json:"userId"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseListUserSessionsResponse parses an HTTP response from a ListUserSessionsWithResponse call -func ParseListUserSessionsResponse(rsp *http.Response) (*ListUserSessionsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListUserSessionsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []Session - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` + Error *CreateDeviceAccessToken400JSONResponseBodyError `json:"error,omitempty"` + ErrorDescription *string `json:"error_description,omitempty"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -48176,1557 +29320,27 @@ func ParseListAuthorizationDetailsCatalogResponse(rsp *http.Response) (*ListAuth return response, nil } -// ParseGetApiAuthOauth2AuthorizeResponse parses an HTTP response from a GetApiAuthOauth2AuthorizeWithResponse call -func ParseGetApiAuthOauth2AuthorizeResponse(rsp *http.Response) (*GetApiAuthOauth2AuthorizeResponse, error) { +// ParseCreateDynamicOAuthClientRegistrationResponse parses an HTTP response from a CreateDynamicOAuthClientRegistrationWithResponse call +func ParseCreateDynamicOAuthClientRegistrationResponse(rsp *http.Response) (*CreateDynamicOAuthClientRegistrationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetApiAuthOauth2AuthorizeResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - State *string `json:"state,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOauth2AuthorizeResponse parses an HTTP response from a PostApiAuthOauth2AuthorizeWithResponse call -func ParsePostApiAuthOauth2AuthorizeResponse(rsp *http.Response) (*PostApiAuthOauth2AuthorizeResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2AuthorizeResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - State *string `json:"state,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOauth2ClientRotateSecretResponse parses an HTTP response from a PostApiAuthOauth2ClientRotateSecretWithResponse call -func ParsePostApiAuthOauth2ClientRotateSecretResponse(rsp *http.Response) (*PostApiAuthOauth2ClientRotateSecretResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2ClientRotateSecretResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOauth2ConsentResponse parses an HTTP response from a PostApiAuthOauth2ConsentWithResponse call -func ParsePostApiAuthOauth2ConsentResponse(rsp *http.Response) (*PostApiAuthOauth2ConsentResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2ConsentResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // RedirectUri The URI to redirect to, either with an authorization code or an error - RedirectUri string `json:"redirect_uri"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOauth2ContinueResponse parses an HTTP response from a PostApiAuthOauth2ContinueWithResponse call -func ParsePostApiAuthOauth2ContinueResponse(rsp *http.Response) (*PostApiAuthOauth2ContinueResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2ContinueResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // RedirectUri The URI to redirect to, either with an authorization code or an error - RedirectUri string `json:"redirect_uri"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOauth2CreateClientResponse parses an HTTP response from a PostApiAuthOauth2CreateClientWithResponse call -func ParsePostApiAuthOauth2CreateClientResponse(rsp *http.Response) (*PostApiAuthOauth2CreateClientResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2CreateClientResponse{ + response := &CreateDynamicOAuthClientRegistrationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - // ClientId Unique identifier for the client - ClientId string `json:"client_id"` - - // ClientIdIssuedAt Creation timestamp of this client - ClientIdIssuedAt *float32 `json:"client_id_issued_at,omitempty"` - - // ClientName Name of the OAuth2 application - ClientName *string `json:"client_name,omitempty"` - - // ClientSecret Secret key for the client - ClientSecret *string `json:"client_secret,omitempty"` - - // ClientSecretExpiresAt Time the client secret will expire. If 0, the client secret will never expire. - ClientSecretExpiresAt *float32 `json:"client_secret_expires_at,omitempty"` - - // ClientUri URI of the OAuth2 application - ClientUri *string `json:"client_uri,omitempty"` - - // Contacts List representing ways to contact people responsible for this client, typically email addresses - Contacts *[]string `json:"contacts,omitempty"` - - // Disabled Whether the client is disabled - Disabled *bool `json:"disabled,omitempty"` - - // GrantTypes Grant types the client may use at the token endpoint - GrantTypes *[]string `json:"grant_types,omitempty"` - - // LogoUri Icon URI for the application - LogoUri *string `json:"logo_uri,omitempty"` - - // Metadata Additional metadata for the application - Metadata *map[string]interface{} `json:"metadata,omitempty"` - - // PolicyUri Client's policy uri - PolicyUri *string `json:"policy_uri,omitempty"` - - // Public Whether the client is public as determined by the type - Public *bool `json:"public,omitempty"` - - // RedirectUris List of allowed redirect uris - RedirectUris *[]string `json:"redirect_uris,omitempty"` - - // ResponseTypes Response types the client may use at the authorization endpoint - ResponseTypes *[]PostApiAuthOauth2CreateClient201JSONResponseBodyResponseTypes `json:"response_types,omitempty"` - - // Scope Space-separated scopes allowed by the client - Scope *string `json:"scope,omitempty"` - - // SoftwareId Unique identifier assigned by the developer to help in the dynamic registration process - SoftwareId *string `json:"software_id,omitempty"` - - // SoftwareStatement JWT containing metadata values about the client software as claims - SoftwareStatement *string `json:"software_statement,omitempty"` - - // SoftwareVersion Version identifier for the software_id - SoftwareVersion *string `json:"software_version,omitempty"` - - // TokenEndpointAuthMethod Requested authentication method for the token endpoint - TokenEndpointAuthMethod *string `json:"token_endpoint_auth_method,omitempty"` - - // TosUri Client's terms of service uri - TosUri *string `json:"tos_uri,omitempty"` - - // Type Type of the client - Type *PostApiAuthOauth2CreateClient201JSONResponseBodyType `json:"type,omitempty"` - - // UserId ID of the user who registered the client, null if registered anonymously - UserId *string `json:"user_id,omitempty"` - } + var dest CreateDynamicOAuthClientRegistration201JSONResponseBody if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOauth2DeleteClientResponse parses an HTTP response from a PostApiAuthOauth2DeleteClientWithResponse call -func ParsePostApiAuthOauth2DeleteClientResponse(rsp *http.Response) (*PostApiAuthOauth2DeleteClientResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2DeleteClientResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOauth2DeleteConsentResponse parses an HTTP response from a PostApiAuthOauth2DeleteConsentWithResponse call -func ParsePostApiAuthOauth2DeleteConsentResponse(rsp *http.Response) (*PostApiAuthOauth2DeleteConsentResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2DeleteConsentResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthOauth2EndSessionResponse parses an HTTP response from a GetApiAuthOauth2EndSessionWithResponse call -func ParseGetApiAuthOauth2EndSessionResponse(rsp *http.Response) (*GetApiAuthOauth2EndSessionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthOauth2EndSessionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Message Success message - Message *string `json:"message,omitempty"` - - // RedirectUri URI to redirect to after logout (if post_logout_redirect_uri was provided) - RedirectUri *string `json:"redirect_uri,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthOauth2GetClientResponse parses an HTTP response from a GetApiAuthOauth2GetClientWithResponse call -func ParseGetApiAuthOauth2GetClientResponse(rsp *http.Response) (*GetApiAuthOauth2GetClientResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthOauth2GetClientResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthOauth2GetClientsResponse parses an HTTP response from a GetApiAuthOauth2GetClientsWithResponse call -func ParseGetApiAuthOauth2GetClientsResponse(rsp *http.Response) (*GetApiAuthOauth2GetClientsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthOauth2GetClientsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthOauth2GetConsentResponse parses an HTTP response from a GetApiAuthOauth2GetConsentWithResponse call -func ParseGetApiAuthOauth2GetConsentResponse(rsp *http.Response) (*GetApiAuthOauth2GetConsentResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthOauth2GetConsentResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthOauth2GetConsentsResponse parses an HTTP response from a GetApiAuthOauth2GetConsentsWithResponse call -func ParseGetApiAuthOauth2GetConsentsResponse(rsp *http.Response) (*GetApiAuthOauth2GetConsentsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthOauth2GetConsentsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOauth2IntrospectResponse parses an HTTP response from a PostApiAuthOauth2IntrospectWithResponse call -func ParsePostApiAuthOauth2IntrospectResponse(rsp *http.Response) (*PostApiAuthOauth2IntrospectResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2IntrospectResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Active Whether the token is active - Active bool `json:"active"` - - // Aud Audience of the token - Aud *string `json:"aud,omitempty"` - - // ClientId Client ID associated with the token - ClientId *string `json:"client_id,omitempty"` - - // Exp Expiration time of the token (seconds since epoch) - Exp *float32 `json:"exp,omitempty"` - - // Iat Issued at time (seconds since epoch) - Iat *float32 `json:"iat,omitempty"` - - // Iss Issuer of the token - Iss *string `json:"iss,omitempty"` - - // Jti JWT ID - Jti *string `json:"jti,omitempty"` - - // Nbf Not before time (seconds since epoch) - Nbf *float32 `json:"nbf,omitempty"` - - // Scope Scopes associated with the token - Scope *string `json:"scope,omitempty"` - - // Sub Subject of the token - Sub *string `json:"sub,omitempty"` - - // TokenType Type of the token - TokenType *string `json:"token_type,omitempty"` - - // Username Username associated with the token - Username *string `json:"username,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - ErrorUri *string `json:"error_uri,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOauth2ParResponse parses an HTTP response from a PostApiAuthOauth2ParWithResponse call -func ParsePostApiAuthOauth2ParResponse(rsp *http.Response) (*PostApiAuthOauth2ParResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2ParResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthOauth2PublicClientResponse parses an HTTP response from a GetApiAuthOauth2PublicClientWithResponse call -func ParseGetApiAuthOauth2PublicClientResponse(rsp *http.Response) (*GetApiAuthOauth2PublicClientResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthOauth2PublicClientResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOauth2PublicClientPreloginResponse parses an HTTP response from a PostApiAuthOauth2PublicClientPreloginWithResponse call -func ParsePostApiAuthOauth2PublicClientPreloginResponse(rsp *http.Response) (*PostApiAuthOauth2PublicClientPreloginResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2PublicClientPreloginResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOauth2RegisterResponse parses an HTTP response from a PostApiAuthOauth2RegisterWithResponse call -func ParsePostApiAuthOauth2RegisterResponse(rsp *http.Response) (*PostApiAuthOauth2RegisterResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2RegisterResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - // BackchannelLogoutSessionRequired Whether the RP requires a `sid` claim in every Logout Token - BackchannelLogoutSessionRequired *bool `json:"backchannel_logout_session_required,omitempty"` - - // BackchannelLogoutUri RP URL to receive signed Logout Tokens when the end-user's OP session terminates - BackchannelLogoutUri *string `json:"backchannel_logout_uri,omitempty"` - - // ClientId Unique identifier for the client - ClientId string `json:"client_id"` - - // ClientIdIssuedAt Creation timestamp of this client - ClientIdIssuedAt *float32 `json:"client_id_issued_at,omitempty"` - - // ClientName Name of the OAuth2 application - ClientName *string `json:"client_name,omitempty"` - - // ClientSecret Secret key for the client - ClientSecret *string `json:"client_secret,omitempty"` - - // ClientSecretExpiresAt Time the client secret will expire. If 0, the client secret will never expire. - ClientSecretExpiresAt *float32 `json:"client_secret_expires_at,omitempty"` - - // ClientUri Name of the OAuth2 application - ClientUri *string `json:"client_uri,omitempty"` - - // Contacts List representing ways to contact people responsible for this client, typically email addresses - Contacts *[]string `json:"contacts,omitempty"` - - // Disabled Whether the client is disabled - Disabled *bool `json:"disabled,omitempty"` - - // GrantTypes Grant types the client may use at the token endpoint - GrantTypes *[]string `json:"grant_types,omitempty"` - - // LogoUri Icon URL for the application - LogoUri *string `json:"logo_uri,omitempty"` - - // PolicyUri Client's policy uri - PolicyUri *string `json:"policy_uri,omitempty"` - - // PostLogoutRedirectUris List of allowed logout redirect uris - PostLogoutRedirectUris *[]string `json:"post_logout_redirect_uris,omitempty"` - - // Public Whether the client is public as determined by the type - Public *bool `json:"public,omitempty"` - - // RedirectUris List of allowed redirect uris - RedirectUris *[]string `json:"redirect_uris,omitempty"` - RegistrationAccessToken string `json:"registration_access_token"` - RegistrationClientUri string `json:"registration_client_uri"` - - // ResponseTypes Response types the client may use at the authorization endpoint - ResponseTypes *[]PostApiAuthOauth2Register201JSONResponseBodyResponseTypes `json:"response_types,omitempty"` - - // Scope Space-separated scopes allowed by the client - Scope *string `json:"scope,omitempty"` - - // SoftwareId Unique identifier assigned by the developer to help in the dynamic registration process - SoftwareId *string `json:"software_id,omitempty"` - - // SoftwareStatement JWT containing metadata values about the client software as claims - SoftwareStatement *string `json:"software_statement,omitempty"` - - // SoftwareVersion Version identifier for the software_id - SoftwareVersion *string `json:"software_version,omitempty"` - - // TokenEndpointAuthMethod Requested authentication method for the token endpoint - TokenEndpointAuthMethod *string `json:"token_endpoint_auth_method,omitempty"` - - // TosUri Client's terms of service uri - TosUri *string `json:"tos_uri,omitempty"` - - // Type Type of the client - Type *PostApiAuthOauth2Register201JSONResponseBodyType `json:"type,omitempty"` - - // UserId ID of the user who registered the client, null if registered anonymously - UserId *string `json:"user_id,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - } return response, nil @@ -49800,4023 +29414,6 @@ func ParseUpdateDynamicOAuthClientRegistrationResponse(rsp *http.Response) (*Upd return response, nil } -// ParsePostApiAuthOauth2RevokeResponse parses an HTTP response from a PostApiAuthOauth2RevokeWithResponse call -func ParsePostApiAuthOauth2RevokeResponse(rsp *http.Response) (*PostApiAuthOauth2RevokeResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2RevokeResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest map[string]interface{} - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - ErrorUri *string `json:"error_uri,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOauth2TokenResponse parses an HTTP response from a PostApiAuthOauth2TokenWithResponse call -func ParsePostApiAuthOauth2TokenResponse(rsp *http.Response) (*PostApiAuthOauth2TokenResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2TokenResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // AccessToken The access token issued by the authorization server - AccessToken string `json:"access_token"` - - // ExpiresIn Lifetime in seconds of the access token - ExpiresIn float32 `json:"expires_in"` - - // IdToken ID Token (if OpenID Connect) - IdToken *string `json:"id_token,omitempty"` - - // RefreshToken Refresh token, if issued - RefreshToken *string `json:"refresh_token,omitempty"` - - // Scope Scopes granted by the access token - Scope *string `json:"scope,omitempty"` - - // TokenType The type of the token issued - TokenType PostApiAuthOauth2Token200JSONResponseBodyTokenType `json:"token_type"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - ErrorUri *string `json:"error_uri,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOauth2UpdateClientResponse parses an HTTP response from a PostApiAuthOauth2UpdateClientWithResponse call -func ParsePostApiAuthOauth2UpdateClientResponse(rsp *http.Response) (*PostApiAuthOauth2UpdateClientResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2UpdateClientResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOauth2UpdateConsentResponse parses an HTTP response from a PostApiAuthOauth2UpdateConsentWithResponse call -func ParsePostApiAuthOauth2UpdateConsentResponse(rsp *http.Response) (*PostApiAuthOauth2UpdateConsentResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2UpdateConsentResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthOauth2UserinfoResponse parses an HTTP response from a GetApiAuthOauth2UserinfoWithResponse call -func ParseGetApiAuthOauth2UserinfoResponse(rsp *http.Response) (*GetApiAuthOauth2UserinfoResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthOauth2UserinfoResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Email User's email address, included if 'email' scope is granted - Email *openapi_types.Email `json:"email,omitempty"` - - // EmailVerified Whether the email is verified, included if 'email' scope is granted - EmailVerified *bool `json:"email_verified,omitempty"` - - // FamilyName User's family name, included if 'profile' scope is granted - FamilyName *string `json:"family_name,omitempty"` - - // GivenName User's given name, included if 'profile' scope is granted - GivenName *string `json:"given_name,omitempty"` - - // Name User's full name, included if 'profile' scope is granted - Name *string `json:"name,omitempty"` - - // Picture User's profile picture URL, included if 'profile' scope is granted - Picture *string `json:"picture,omitempty"` - - // Sub Subject identifier (user ID) - Sub string `json:"sub"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOauth2UserinfoResponse parses an HTTP response from a PostApiAuthOauth2UserinfoWithResponse call -func ParsePostApiAuthOauth2UserinfoResponse(rsp *http.Response) (*PostApiAuthOauth2UserinfoResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOauth2UserinfoResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Email User's email address, included if 'email' scope is granted - Email *openapi_types.Email `json:"email,omitempty"` - - // EmailVerified Whether the email is verified, included if 'email' scope is granted - EmailVerified *bool `json:"email_verified,omitempty"` - - // FamilyName User's family name, included if 'profile' scope is granted - FamilyName *string `json:"family_name,omitempty"` - - // GivenName User's given name, included if 'profile' scope is granted - GivenName *string `json:"given_name,omitempty"` - - // Name User's full name, included if 'profile' scope is granted - Name *string `json:"name,omitempty"` - - // Picture User's profile picture URL, included if 'profile' scope is granted - Picture *string `json:"picture,omitempty"` - - // Sub Subject identifier (user ID) - Sub string `json:"sub"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Error string `json:"error"` - ErrorDescription *string `json:"error_description,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthOkResponse parses an HTTP response from a GetApiAuthOkWithResponse call -func ParseGetApiAuthOkResponse(rsp *http.Response) (*GetApiAuthOkResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthOkResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Ok Indicates if the API is working - Ok bool `json:"ok"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOrganizationAcceptInvitationResponse parses an HTTP response from a PostApiAuthOrganizationAcceptInvitationWithResponse call -func ParsePostApiAuthOrganizationAcceptInvitationResponse(rsp *http.Response) (*PostApiAuthOrganizationAcceptInvitationResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOrganizationAcceptInvitationResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Invitation *map[string]interface{} `json:"invitation,omitempty"` - Member *map[string]interface{} `json:"member,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOrganizationCancelInvitationResponse parses an HTTP response from a PostApiAuthOrganizationCancelInvitationWithResponse call -func ParsePostApiAuthOrganizationCancelInvitationResponse(rsp *http.Response) (*PostApiAuthOrganizationCancelInvitationResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOrganizationCancelInvitationResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOrganizationCheckSlugResponse parses an HTTP response from a PostApiAuthOrganizationCheckSlugWithResponse call -func ParsePostApiAuthOrganizationCheckSlugResponse(rsp *http.Response) (*PostApiAuthOrganizationCheckSlugResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOrganizationCheckSlugResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOrganizationCreateResponse parses an HTTP response from a PostApiAuthOrganizationCreateWithResponse call -func ParsePostApiAuthOrganizationCreateResponse(rsp *http.Response) (*PostApiAuthOrganizationCreateResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOrganizationCreateResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Organization - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOrganizationDeleteResponse parses an HTTP response from a PostApiAuthOrganizationDeleteWithResponse call -func ParsePostApiAuthOrganizationDeleteResponse(rsp *http.Response) (*PostApiAuthOrganizationDeleteResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOrganizationDeleteResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest string - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthOrganizationGetActiveMemberResponse parses an HTTP response from a GetApiAuthOrganizationGetActiveMemberWithResponse call -func ParseGetApiAuthOrganizationGetActiveMemberResponse(rsp *http.Response) (*GetApiAuthOrganizationGetActiveMemberResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthOrganizationGetActiveMemberResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Id string `json:"id"` - OrganizationId string `json:"organizationId"` - Role string `json:"role"` - UserId string `json:"userId"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthOrganizationGetActiveMemberRoleResponse parses an HTTP response from a GetApiAuthOrganizationGetActiveMemberRoleWithResponse call -func ParseGetApiAuthOrganizationGetActiveMemberRoleResponse(rsp *http.Response) (*GetApiAuthOrganizationGetActiveMemberRoleResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthOrganizationGetActiveMemberRoleResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetFullOrganizationResponse parses an HTTP response from a GetFullOrganizationWithResponse call -func ParseGetFullOrganizationResponse(rsp *http.Response) (*GetFullOrganizationResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetFullOrganizationResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Organization - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthOrganizationGetInvitationResponse parses an HTTP response from a GetApiAuthOrganizationGetInvitationWithResponse call -func ParseGetApiAuthOrganizationGetInvitationResponse(rsp *http.Response) (*GetApiAuthOrganizationGetInvitationResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthOrganizationGetInvitationResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Email string `json:"email"` - ExpiresAt string `json:"expiresAt"` - Id string `json:"id"` - InviterEmail string `json:"inviterEmail"` - InviterId string `json:"inviterId"` - OrganizationId string `json:"organizationId"` - OrganizationName string `json:"organizationName"` - OrganizationSlug string `json:"organizationSlug"` - Role string `json:"role"` - Status string `json:"status"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationResponse parses an HTTP response from a GetOrganizationWithResponse call -func ParseGetOrganizationResponse(rsp *http.Response) (*GetOrganizationResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Organization - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOrganizationHasPermissionResponse parses an HTTP response from a PostApiAuthOrganizationHasPermissionWithResponse call -func ParsePostApiAuthOrganizationHasPermissionResponse(rsp *http.Response) (*PostApiAuthOrganizationHasPermissionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOrganizationHasPermissionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Error *string `json:"error,omitempty"` - Success bool `json:"success"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateOrganizationInvitationResponse parses an HTTP response from a CreateOrganizationInvitationWithResponse call -func ParseCreateOrganizationInvitationResponse(rsp *http.Response) (*CreateOrganizationInvitationResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateOrganizationInvitationResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - CreatedAt string `json:"createdAt"` - Email string `json:"email"` - ExpiresAt string `json:"expiresAt"` - Id string `json:"id"` - InviterId string `json:"inviterId"` - OrganizationId string `json:"organizationId"` - Role string `json:"role"` - Status string `json:"status"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOrganizationLeaveResponse parses an HTTP response from a PostApiAuthOrganizationLeaveWithResponse call -func ParsePostApiAuthOrganizationLeaveResponse(rsp *http.Response) (*PostApiAuthOrganizationLeaveResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOrganizationLeaveResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthOrganizationListResponse parses an HTTP response from a GetApiAuthOrganizationListWithResponse call -func ParseGetApiAuthOrganizationListResponse(rsp *http.Response) (*GetApiAuthOrganizationListResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthOrganizationListResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []Organization - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthOrganizationListInvitationsResponse parses an HTTP response from a GetApiAuthOrganizationListInvitationsWithResponse call -func ParseGetApiAuthOrganizationListInvitationsResponse(rsp *http.Response) (*GetApiAuthOrganizationListInvitationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthOrganizationListInvitationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthOrganizationListMembersResponse parses an HTTP response from a GetApiAuthOrganizationListMembersWithResponse call -func ParseGetApiAuthOrganizationListMembersResponse(rsp *http.Response) (*GetApiAuthOrganizationListMembersResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthOrganizationListMembersResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthOrganizationListUserInvitationsResponse parses an HTTP response from a GetApiAuthOrganizationListUserInvitationsWithResponse call -func ParseGetApiAuthOrganizationListUserInvitationsResponse(rsp *http.Response) (*GetApiAuthOrganizationListUserInvitationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthOrganizationListUserInvitationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []struct { - CreatedAt string `json:"createdAt"` - Email string `json:"email"` - ExpiresAt string `json:"expiresAt"` - Id string `json:"id"` - - // InviterId The ID of the user who created the invitation - InviterId string `json:"inviterId"` - OrganizationId string `json:"organizationId"` - OrganizationName string `json:"organizationName"` - Role string `json:"role"` - Status string `json:"status"` - - // TeamId The ID of the team associated with the invitation - TeamId *string `json:"teamId,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOrganizationRejectInvitationResponse parses an HTTP response from a PostApiAuthOrganizationRejectInvitationWithResponse call -func ParsePostApiAuthOrganizationRejectInvitationResponse(rsp *http.Response) (*PostApiAuthOrganizationRejectInvitationResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOrganizationRejectInvitationResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Invitation *map[string]interface{} `json:"invitation,omitempty"` - Member *map[string]interface{} `json:"member,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOrganizationRemoveMemberResponse parses an HTTP response from a PostApiAuthOrganizationRemoveMemberWithResponse call -func ParsePostApiAuthOrganizationRemoveMemberResponse(rsp *http.Response) (*PostApiAuthOrganizationRemoveMemberResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOrganizationRemoveMemberResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Member struct { - Id string `json:"id"` - OrganizationId string `json:"organizationId"` - Role string `json:"role"` - UserId string `json:"userId"` - } `json:"member"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseSetActiveOrganizationResponse parses an HTTP response from a SetActiveOrganizationWithResponse call -func ParseSetActiveOrganizationResponse(rsp *http.Response) (*SetActiveOrganizationResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &SetActiveOrganizationResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Organization - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthOrganizationUpdateResponse parses an HTTP response from a PostApiAuthOrganizationUpdateWithResponse call -func ParsePostApiAuthOrganizationUpdateResponse(rsp *http.Response) (*PostApiAuthOrganizationUpdateResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthOrganizationUpdateResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Organization - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseUpdateOrganizationMemberRoleResponse parses an HTTP response from a UpdateOrganizationMemberRoleWithResponse call -func ParseUpdateOrganizationMemberRoleResponse(rsp *http.Response) (*UpdateOrganizationMemberRoleResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateOrganizationMemberRoleResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Member struct { - Id string `json:"id"` - OrganizationId string `json:"organizationId"` - Role string `json:"role"` - UserId string `json:"userId"` - } `json:"member"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthRefreshTokenResponse parses an HTTP response from a PostApiAuthRefreshTokenWithResponse call -func ParsePostApiAuthRefreshTokenResponse(rsp *http.Response) (*PostApiAuthRefreshTokenResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthRefreshTokenResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - AccessToken *string `json:"accessToken,omitempty"` - AccessTokenExpiresAt *time.Time `json:"accessTokenExpiresAt,omitempty"` - IdToken *string `json:"idToken,omitempty"` - RefreshToken *string `json:"refreshToken,omitempty"` - RefreshTokenExpiresAt *time.Time `json:"refreshTokenExpiresAt,omitempty"` - TokenType *string `json:"tokenType,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseRequestPasswordResetResponse parses an HTTP response from a RequestPasswordResetWithResponse call -func ParseRequestPasswordResetResponse(rsp *http.Response) (*RequestPasswordResetResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &RequestPasswordResetResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Message *string `json:"message,omitempty"` - Status *bool `json:"status,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseResetPasswordResponse parses an HTTP response from a ResetPasswordWithResponse call -func ParseResetPasswordResponse(rsp *http.Response) (*ResetPasswordResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ResetPasswordResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Status *bool `json:"status,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseResetPasswordCallbackResponse parses an HTTP response from a ResetPasswordCallbackWithResponse call -func ParseResetPasswordCallbackResponse(rsp *http.Response) (*ResetPasswordCallbackResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ResetPasswordCallbackResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Token *string `json:"token,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthRevokeOtherSessionsResponse parses an HTTP response from a PostApiAuthRevokeOtherSessionsWithResponse call -func ParsePostApiAuthRevokeOtherSessionsResponse(rsp *http.Response) (*PostApiAuthRevokeOtherSessionsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthRevokeOtherSessionsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Status Indicates if all other sessions were revoked successfully - Status bool `json:"status"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthRevokeSessionResponse parses an HTTP response from a PostApiAuthRevokeSessionWithResponse call -func ParsePostApiAuthRevokeSessionResponse(rsp *http.Response) (*PostApiAuthRevokeSessionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthRevokeSessionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Status Indicates if the session was revoked successfully - Status bool `json:"status"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthRevokeSessionsResponse parses an HTTP response from a PostApiAuthRevokeSessionsWithResponse call -func ParsePostApiAuthRevokeSessionsResponse(rsp *http.Response) (*PostApiAuthRevokeSessionsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthRevokeSessionsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Status Indicates if all sessions were revoked successfully - Status bool `json:"status"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseSendVerificationEmailResponse parses an HTTP response from a SendVerificationEmailWithResponse call -func ParseSendVerificationEmailResponse(rsp *http.Response) (*SendVerificationEmailResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &SendVerificationEmailResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Status Indicates if the email was sent successfully - Status *bool `json:"status,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - // Message Error message - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseSignInEmailResponse parses an HTTP response from a SignInEmailWithResponse call -func ParseSignInEmailResponse(rsp *http.Response) (*SignInEmailResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &SignInEmailResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Redirect SignInEmail200JSONResponseBodyRedirect `json:"redirect"` - - // Token Session token - Token string `json:"token"` - Url *string `json:"url,omitempty"` - User User `json:"user"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseSocialSignInResponse parses an HTTP response from a SocialSignInWithResponse call -func ParseSocialSignInResponse(rsp *http.Response) (*SocialSignInResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &SocialSignInResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Redirect bool `json:"redirect"` - Token *string `json:"token,omitempty"` - Url *string `json:"url,omitempty"` - User *User `json:"user,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthSignInUsernameResponse parses an HTTP response from a PostApiAuthSignInUsernameWithResponse call -func ParsePostApiAuthSignInUsernameResponse(rsp *http.Response) (*PostApiAuthSignInUsernameResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthSignInUsernameResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Redirect Whether the client should follow the Location header. True when callbackURL was provided. - Redirect bool `json:"redirect"` - - // Token Session token for the authenticated session - Token string `json:"token"` - - // Url The callbackURL echoed back so the client can redirect. - Url *string `json:"url,omitempty"` - User User `json:"user"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseSignOutResponse parses an HTTP response from a SignOutWithResponse call -func ParseSignOutResponse(rsp *http.Response) (*SignOutResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &SignOutResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Success *bool `json:"success,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseSignUpWithEmailAndPasswordResponse parses an HTTP response from a SignUpWithEmailAndPasswordWithResponse call -func ParseSignUpWithEmailAndPasswordResponse(rsp *http.Response) (*SignUpWithEmailAndPasswordResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &SignUpWithEmailAndPasswordResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Token Authentication token for the session - Token *string `json:"token,omitempty"` - User struct { - // CreatedAt When the user was created - CreatedAt time.Time `json:"createdAt"` - - // Email The email address of the user - Email openapi_types.Email `json:"email"` - - // EmailVerified Whether the email has been verified - EmailVerified bool `json:"emailVerified"` - - // Id The unique identifier of the user - Id string `json:"id"` - - // Image The profile image URL of the user - Image *string `json:"image,omitempty"` - - // Name The name of the user - Name string `json:"name"` - - // UpdatedAt When the user was last updated - UpdatedAt time.Time `json:"updatedAt"` - } `json:"user"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetJSONWebTokenResponse parses an HTTP response from a GetJSONWebTokenWithResponse call -func ParseGetJSONWebTokenResponse(rsp *http.Response) (*GetJSONWebTokenResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetJSONWebTokenResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Token *string `json:"token,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePostApiAuthUnlinkAccountResponse parses an HTTP response from a PostApiAuthUnlinkAccountWithResponse call -func ParsePostApiAuthUnlinkAccountResponse(rsp *http.Response) (*PostApiAuthUnlinkAccountResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostApiAuthUnlinkAccountResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Status *bool `json:"status,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseUpdateSessionResponse parses an HTTP response from a UpdateSessionWithResponse call -func ParseUpdateSessionResponse(rsp *http.Response) (*UpdateSessionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateSessionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Session *Session `json:"session,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseUpdateUserResponse parses an HTTP response from a UpdateUserWithResponse call -func ParseUpdateUserResponse(rsp *http.Response) (*UpdateUserResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateUserResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - User *User `json:"user,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetApiAuthVerifyEmailResponse parses an HTTP response from a GetApiAuthVerifyEmailWithResponse call -func ParseGetApiAuthVerifyEmailResponse(rsp *http.Response) (*GetApiAuthVerifyEmailResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetApiAuthVerifyEmailResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Status Indicates if the email was verified successfully - Status bool `json:"status"` - User User `json:"user"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseVerifyPasswordResponse parses an HTTP response from a VerifyPasswordWithResponse call -func ParseVerifyPasswordResponse(rsp *http.Response) (*VerifyPasswordResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &VerifyPasswordResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Status *bool `json:"status,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest struct { - Message string `json:"message"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest struct { - Message *string `json:"message,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - // ParseListBackgroundJobsResponse parses an HTTP response from a ListBackgroundJobsWithResponse call func ParseListBackgroundJobsResponse(rsp *http.Response) (*ListBackgroundJobsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/docs/architecture.md b/docs/architecture.md index 9950ab0e..bba8fb43 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -147,8 +147,11 @@ The server follows a ports-and-adapters shape. ### `server/app.ts` Creates the Hono app, installs global middleware, exposes OpenAPI/Scalar docs, -mounts WebDAV, and mounts each API resource. It also merges Better Auth's -generated OpenAPI schema into `/api/openapi.json`. +mounts WebDAV, and mounts each API resource. `/api/openapi.json` includes ZPan's +explicit resource contracts plus operations admitted by the declarative Better +Auth OpenAPI registry. The registry currently contains only the two Downloader +Device Flow operations. Better Auth's full runtime schema remains available +only from its own reference endpoints. ### `server/http/` @@ -311,8 +314,11 @@ external URLs that are not ZPan APIs, such as presigned S3 upload URLs. - `/api/*` — primary JSON API, mounted from route modules in `server/http/` - `/api/auth/*` — Better Auth routes -- `/api/openapi.json` — combined OpenAPI document for ZPan routes and Better - Auth routes +- `/api/openapi.json` — public ZPan product contract; Better Auth operations are + denied by default and currently only the registered Downloader Device Flow + operations are included +- `/api/auth/reference` and `/api/auth/open-api/generate-schema` — Better Auth's + complete reference UI and generated runtime schema - `/api/docs` — Scalar API reference - `/dav/*` — WebDAV endpoint - `/api/events` — one resumable server-sent event stream for scoped durable diff --git a/docs/design/oauth-server.md b/docs/design/oauth-server.md index 79b744f6..5a8050f0 100644 --- a/docs/design/oauth-server.md +++ b/docs/design/oauth-server.md @@ -56,9 +56,23 @@ OpenAPI uses standard `security` declarations. Every protected ZPan operation declares its OAuth scopes, plus cookie and bearer alternatives. Role constraints that OpenAPI cannot express use the narrow `x-zpan-authorization-constraints` extension. Better Auth operations and their -generated OpenAPI definitions remain owned by Better Auth. ZPan augments the -dynamic-registration response and adds the RFC 7592 configuration endpoint that -is implemented at its auth boundary. +complete generated definitions remain owned by Better Auth and available from +its reference endpoints. The public product contract uses a deny-by-default +operation registry. Each admitted entry names the exact source path and method, +public path, stable operation ID, tags, and security policy; it may also declare +a narrow contract correction. The aggregator copies only path-item parameters +and the transitive local component closure reachable from that operation, +rejecting missing sources, collisions, dangling references, and external +references. + +The registry currently imports only `POST /device/code` and `POST +/device/token`, under their `/api/auth` runtime mount, for the Downloader Device +Flow protocol; both explicitly require no existing session or bearer +credential. Adding a Better Auth operation to the product contract is therefore +an explicit contract and authorization decision made in one registry entry, not +an automatic consequence of installing or updating a plugin. ZPan separately +publishes its dynamic-registration and RFC 7592 configuration operations +implemented at the auth boundary. ## Workspace Authorization Details diff --git a/scripts/openapi-client.ts b/scripts/openapi-client.ts index a57e7480..023f3622 100644 --- a/scripts/openapi-client.ts +++ b/scripts/openapi-client.ts @@ -1,7 +1,9 @@ // Generates the downloader's Go OpenAPI client (cmd/internal/openapi/client.gen.go) -// straight from the complete, live /api/openapi.json — no committed intermediate -// spec, no hand-curated subset. The spec is written to a temp file only so -// oapi-codegen has something to read, then discarded. +// straight from the live public product contract at /api/openapi.json, including +// its explicitly registered Better Auth operations (currently Downloader +// Device Flow). Code generation applies no further endpoint subset and commits +// no intermediate spec; the temporary spec exists only as oapi-codegen input +// and is discarded. // // pnpm openapi:client regenerate the committed Go client // pnpm openapi:client --check fail if the committed client is stale @@ -36,10 +38,9 @@ function downconvertTo30(node: unknown): void { for (const v of Object.values(obj)) downconvertTo30(v) } -// The client attaches its bearer token manually via a RequestEditorFn, so it -// needs no security metadata. Strip it: better-auth's bearerAuth scheme otherwise -// makes oapi-codegen (client-only) emit a `BearerAuthScopes` const whose -// context-key type is only generated in server mode → undefined symbol. +// The client attaches credentials manually via a RequestEditorFn, so the +// generated transport needs no product-wide security metadata. Stripping it +// also avoids client-only oapi-codegen emitting server-mode scope helpers. function stripSecurity(doc: Doc): void { delete (doc as Record).security if (doc.components) delete (doc.components as Record).securitySchemes @@ -53,9 +54,8 @@ function stripSecurity(doc: Doc): void { const HTTP_METHODS = new Set(['get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace']) -// better-auth omits path-parameter declarations on some operations (e.g. -// /api/auth/callback/{id}), which oapi-codegen rejects. Declare any `{param}` -// segment that an operation is missing. Whole-document, mechanical. +// Declare any `{param}` segment that an operation is missing because +// oapi-codegen rejects undeclared path parameters. Whole-document, mechanical. function declareMissingPathParams(doc: Doc): void { for (const [path, item] of Object.entries(doc.paths)) { const names = [...path.matchAll(/\{([^}]+)\}/g)].map((m) => m[1]) diff --git a/server/app.ts b/server/app.ts index 0c509dc8..8925151f 100644 --- a/server/app.ts +++ b/server/app.ts @@ -15,6 +15,7 @@ import { adminStats } from './http/admin-stats' import { ARAZZO_DOCUMENT_PATH, ARAZZO_MEDIA_TYPE, createArazzoDocument } from './http/arazzo' import { serveAvatarBlob } from './http/avatar-blobs' import backgroundJobs from './http/background-jobs' +import { addRegisteredBetterAuthOpenApiOperations, DOWNLOADER_DEVICE_FLOW_TAG } from './http/better-auth-openapi' import { configz } from './http/configz' import downloadTasks, { downloaderTasksRoute } from './http/downloads/download-tasks' import downloaders, { downloaderSelfRoute } from './http/downloads/downloaders' @@ -224,10 +225,10 @@ export function createApp(platform: Platform, auth: Auth, deps: Deps = createDep return c.newResponse(JSON.stringify(createArazzoDocument(new URL(c.req.url).origin)), 200, headers) }) - // Global OpenAPI document. Aggregates every route defined with `.openapi()` - // across all mounted sub-apps — a route appears here as soon as its resource is - // converted to OpenAPIHono, no curation needed. better-auth endpoints (incl. the - // device flow) document themselves separately at /api/auth/reference. + // Global OpenAPI document. ZPan routes defined with `.openapi()` are + // aggregated across all mounted sub-apps. Better Auth documents its complete + // runtime surface separately at /api/auth/reference; only the Downloader + // Device Flow protocol is explicitly admitted to this product contract. app.get('/api/openapi.json', async (c) => { const doc = app.getOpenAPIDocument({ openapi: '3.1.0', @@ -243,41 +244,13 @@ export function createApp(platform: Platform, auth: Auth, deps: Deps = createDep { name: 'Events', description: 'Multiplexed server-sent event stream' }, { name: 'Download Tasks', description: 'Remote download tasks' }, { name: 'Downloaders', description: 'Download agents and their heartbeats' }, + { + name: DOWNLOADER_DEVICE_FLOW_TAG, + description: 'Public device authorization protocol used by downloader clients', + }, ], }) - // Merge better-auth's own auto-generated schema (sign-in/up, organization, - // the device-authorization flow, …) into the same document. Both halves are - // generated — nothing here is a hand-maintained endpoint definition; new - // better-auth endpoints appear automatically. Its paths are relative to the - // /api/auth mount, so prefix them. - const authDoc = (await c.get('auth').api.generateOpenAPISchema()) as { - paths?: Record - components?: { schemas?: Record } - } - for (const [path, item] of Object.entries(authDoc.paths ?? {})) { - doc.paths[`/api/auth${path}`] = item as (typeof doc.paths)[string] - } - // better-auth 1.7.0-rc.2 documents POST /device/token with its session - // response even though the handler returns an OAuth device token. Keep the - // generated contract aligned with the wire response until upstream fixes it. - const deviceTokenJson = ( - doc.paths['/api/auth/device/token'] as - | { post?: { responses?: Record }> } } - | undefined - )?.post?.responses?.['200']?.content?.['application/json'] - if (deviceTokenJson) { - deviceTokenJson.schema = { - type: 'object', - properties: { - access_token: { type: 'string' }, - token_type: { type: 'string' }, - expires_in: { type: 'integer' }, - scope: { type: 'string' }, - }, - required: ['access_token', 'token_type', 'expires_in'], - } - } doc.components ??= {} doc.components.securitySchemes = { ...(doc.components.securitySchemes ?? {}), @@ -298,10 +271,14 @@ export function createApp(platform: Platform, auth: Auth, deps: Deps = createDep }, } addOAuthClientRegistrationManagementOpenApi(doc) - doc.components.schemas = { - ...(authDoc.components?.schemas as typeof doc.components.schemas), - ...doc.components.schemas, - } + + // Better Auth owns the runtime routes and its complete reference schema. + // The product contract imports only operations whose path, method, public + // identity, tags, security, and any narrow correction are registered + // explicitly. Reachable components are copied transitively; everything + // else remains private by default. + const authDoc = await c.get('auth').api.generateOpenAPISchema() + addRegisteredBetterAuthOpenApiOperations(doc, authDoc) Object.assign(doc, { 'x-zpan-discovery': { oauthAuthorizationServer: '/.well-known/oauth-authorization-server/api/auth', diff --git a/server/auth.ts b/server/auth.ts index 156dbaa9..1c710116 100644 --- a/server/auth.ts +++ b/server/auth.ts @@ -648,10 +648,11 @@ export async function createAuth( }, plugins: [ admin(), - // Self-documents every better-auth endpoint (incl. the device-authorization - // flow) at GET /api/auth/reference (Scalar UI) and - // /api/auth/open-api/generate-schema. Replaces the old hand-written device - // route stubs; our own routes live in the global doc at /api/openapi.json. + // Self-documents Better Auth's complete runtime surface at + // GET /api/auth/reference (Scalar UI) and + // /api/auth/open-api/generate-schema. The global product contract at + // /api/openapi.json admits only explicitly registered path/methods + // (currently the Downloader Device Flow protocol). openAPI(), organization({ roles: { diff --git a/server/auth/oauth-client-registration-management.ts b/server/auth/oauth-client-registration-management.ts index e7827738..66fe14e5 100644 --- a/server/auth/oauth-client-registration-management.ts +++ b/server/auth/oauth-client-registration-management.ts @@ -62,6 +62,42 @@ const KNOWN_METADATA_FIELDS = new Set([ 'resources', 'require_pkce', ]) +const oauthClientMetadataOpenApiProperties = { + redirect_uris: { type: 'array', items: { type: 'string', format: 'uri' } }, + token_endpoint_auth_method: { type: 'string' }, + grant_types: { type: 'array', items: { type: 'string' } }, + response_types: { type: 'array', items: { type: 'string' } }, + client_name: { type: 'string' }, + client_uri: { type: 'string', format: 'uri' }, + logo_uri: { type: 'string', format: 'uri' }, + scope: { type: 'string' }, + contacts: { type: 'array', items: { type: 'string' } }, + tos_uri: { type: 'string', format: 'uri' }, + policy_uri: { type: 'string', format: 'uri' }, + jwks_uri: { type: 'string', format: 'uri' }, + jwks: { + oneOf: [ + { type: 'array', items: { type: 'object', additionalProperties: true } }, + { + type: 'object', + additionalProperties: true, + properties: { keys: { type: 'array', items: { type: 'object', additionalProperties: true } } }, + }, + ], + }, + software_id: { type: 'string' }, + software_version: { type: 'string' }, + software_statement: { type: 'string' }, + post_logout_redirect_uris: { type: 'array', items: { type: 'string', format: 'uri' } }, + backchannel_logout_uri: { type: 'string', format: 'uri' }, + backchannel_logout_session_required: { type: 'boolean' }, + type: { type: 'string', enum: ['web', 'native', 'user-agent-based'] }, + subject_type: { type: 'string', enum: ['public', 'pairwise'] }, + dpop_bound_access_tokens: { type: 'boolean' }, + authorization_details_types: { type: 'array', items: { type: 'string' } }, + resources: { type: 'array', items: { type: 'string', format: 'uri' } }, + require_pkce: { type: 'boolean' }, +} as const const absoluteUrl = z.string().url() const updateSchema = z @@ -102,37 +138,48 @@ const updateSchema = z .passthrough() export function addOAuthClientRegistrationManagementOpenApi(document: { paths: Record }): void { - const registration = document.paths['/api/auth/oauth2/register'] as - | { post?: { responses?: Record }> }> } } - | undefined - const registrationSchema = registration?.post?.responses?.['201']?.content?.['application/json']?.schema - if (registrationSchema) { - const properties = (registrationSchema.properties ?? {}) as Record - registrationSchema.properties = { - ...properties, - registration_client_uri: { type: 'string', format: 'uri' }, - registration_access_token: { type: 'string' }, - } - registrationSchema.required = [ - ...new Set([ - ...(Array.isArray(registrationSchema.required) ? registrationSchema.required : []), - 'registration_client_uri', - 'registration_access_token', - ]), - ] - } - const clientInformationSchema = { type: 'object', additionalProperties: true, properties: { + ...oauthClientMetadataOpenApiProperties, client_id: { type: 'string' }, + client_secret: { type: 'string' }, + client_id_issued_at: { type: 'integer' }, + client_secret_expires_at: { type: 'integer' }, registration_client_uri: { type: 'string', format: 'uri' }, registration_access_token: { type: 'string' }, - scope: { type: 'string' }, }, required: ['client_id', 'registration_client_uri', 'registration_access_token'], } + document.paths['/api/auth/oauth2/register'] = { + post: { + operationId: 'createDynamicOAuthClientRegistration', + tags: ['OAuth'], + summary: 'Create a dynamic OAuth client registration', + security: [], + requestBody: { + required: true, + content: { + 'application/json': { + schema: { + type: 'object', + additionalProperties: true, + properties: oauthClientMetadataOpenApiProperties, + }, + }, + }, + }, + responses: { + '201': { + description: 'OAuth client registration created', + content: { 'application/json': { schema: clientInformationSchema } }, + }, + '400': { description: 'Invalid client metadata' }, + }, + }, + } + const bearerSecurity = [{ bearerAuth: [] }] document.paths['/api/auth/oauth2/register/{clientId}'] = { parameters: [{ name: 'clientId', in: 'path', required: true, schema: { type: 'string' } }], diff --git a/server/http/better-auth-openapi.test.ts b/server/http/better-auth-openapi.test.ts new file mode 100644 index 00000000..ebaa40fb --- /dev/null +++ b/server/http/better-auth-openapi.test.ts @@ -0,0 +1,378 @@ +import { describe, expect, it } from 'vitest' +import { + addRegisteredBetterAuthOpenApiOperations, + type BetterAuthOpenApiOperationRegistration, + DOWNLOADER_DEVICE_FLOW_TAG, +} from './better-auth-openapi' + +type TestOperation = Record & { + responses?: Record }> +} + +type TestPathItem = { + parameters?: unknown[] + delete?: TestOperation + get?: TestOperation + patch?: TestOperation + post?: TestOperation + put?: TestOperation +} + +type TestOpenApiDocument = { + paths: Record + components?: Record> +} + +describe('Better Auth OpenAPI operation registry', () => { + it('publishes only the registered Device Flow methods with their declared contract policy', () => { + const doc: TestOpenApiDocument = { paths: { '/api/objects': { get: { operationId: 'listObjects' } } } } + const authDoc = { + paths: { + '/device/code': { + get: { operationId: 'futureDeviceCodeRead' }, + post: { operationId: 'upstreamDeviceCode', security: [{ bearerAuth: [] }], responses: {} }, + }, + '/device/token': { + delete: { operationId: 'futureDeviceTokenDelete' }, + post: { + operationId: 'upstreamDeviceToken', + security: [{ bearerAuth: [] }], + responses: { + '200': { + content: { + 'application/json': { schema: { $ref: '#/components/schemas/Session' } }, + }, + }, + }, + }, + }, + '/sign-in/email': { post: { operationId: 'signInEmail' } }, + }, + components: { schemas: { Session: {}, User: {} } }, + } + + addRegisteredBetterAuthOpenApiOperations(doc, authDoc) + + expect(Object.keys(doc.paths)).toEqual(['/api/objects', '/api/auth/device/code', '/api/auth/device/token']) + expect(Object.keys(doc.paths['/api/auth/device/code'] ?? {})).toEqual(['post']) + expect(Object.keys(doc.paths['/api/auth/device/token'] ?? {})).toEqual(['post']) + expect(doc.paths['/api/auth/device/code'].post).toMatchObject({ + operationId: 'createDeviceAuthorization', + tags: [DOWNLOADER_DEVICE_FLOW_TAG], + security: [], + }) + expect(doc.paths['/api/auth/device/token'].post).toMatchObject({ + operationId: 'createDeviceAccessToken', + tags: [DOWNLOADER_DEVICE_FLOW_TAG], + security: [], + responses: { + '200': { + content: { + 'application/json': { + schema: { + properties: { + access_token: { type: 'string' }, + token_type: { type: 'string' }, + expires_in: { type: 'integer' }, + scope: { type: 'string' }, + }, + required: ['access_token', 'token_type', 'expires_in'], + }, + }, + }, + }, + }, + }) + expect(doc.components?.schemas?.Session).toBeUndefined() + expect(doc.components?.schemas?.User).toBeUndefined() + }) + + it('merges registered methods on one public path and applies security per operation', () => { + const doc: TestOpenApiDocument = { paths: {} } + const authDoc = { + paths: { + '/sessions': { + get: { responses: {} }, + post: { responses: {} }, + }, + }, + } + const registry = [ + registration({ + sourcePath: '/sessions', + method: 'get', + publicPath: '/api/auth/sessions', + operationId: 'listAuthSessions', + tags: ['Auth Sessions'], + security: { mode: 'requirements', requirements: [{ cookieAuth: [] }, { bearerAuth: [] }] }, + }), + registration({ + sourcePath: '/sessions', + method: 'post', + publicPath: '/api/auth/sessions', + operationId: 'createAuthSession', + tags: ['Auth Session Creation'], + security: { mode: 'public' }, + }), + ] + + addRegisteredBetterAuthOpenApiOperations(doc, authDoc, registry) + + expect(Object.keys(doc.paths['/api/auth/sessions'] ?? {})).toEqual(['get', 'post']) + expect(doc.paths['/api/auth/sessions'].get).toMatchObject({ + operationId: 'listAuthSessions', + tags: ['Auth Sessions'], + security: [{ cookieAuth: [] }, { bearerAuth: [] }], + }) + expect(doc.paths['/api/auth/sessions'].post).toMatchObject({ + operationId: 'createAuthSession', + tags: ['Auth Session Creation'], + security: [], + }) + }) + + it('copies path-item parameters and their reachable component closure', () => { + const doc: TestOpenApiDocument = { paths: {}, components: { schemas: { Existing: { type: 'string' } } } } + const authDoc = { + paths: { + '/devices/{deviceId}': { + parameters: [{ $ref: '#/components/parameters/DeviceId' }], + get: { responses: {} }, + }, + }, + components: { + parameters: { + DeviceId: { + name: 'deviceId', + in: 'path', + required: true, + schema: { $ref: '#/components/schemas/DeviceIdentifier' }, + }, + }, + schemas: { + DeviceIdentifier: { type: 'string', pattern: '^device_' }, + Unrelated: { type: 'object' }, + }, + }, + } + + addRegisteredBetterAuthOpenApiOperations(doc, authDoc, [ + registration({ sourcePath: '/devices/{deviceId}', method: 'get', publicPath: '/api/auth/devices/{deviceId}' }), + ]) + + expect(doc.paths['/api/auth/devices/{deviceId}'].parameters).toEqual([{ $ref: '#/components/parameters/DeviceId' }]) + expect(doc.components).toEqual({ + parameters: { DeviceId: authDoc.components.parameters.DeviceId }, + schemas: { + Existing: { type: 'string' }, + DeviceIdentifier: authDoc.components.schemas.DeviceIdentifier, + }, + }) + }) + + it('copies only the transitive component closure and handles circular references', () => { + const doc: TestOpenApiDocument = { paths: {} } + const authDoc = { + paths: { + '/source': { + post: { + responses: { + '200': { content: { 'application/json': { schema: { $ref: '#/components/schemas/Root' } } } }, + }, + }, + }, + }, + components: { + schemas: { + Root: { type: 'object', properties: { child: { $ref: '#/components/schemas/Child' } } }, + Child: { type: 'object', properties: { parent: { $ref: '#/components/schemas/Root' } } }, + Session: { type: 'object' }, + User: { type: 'object' }, + }, + }, + } + + addRegisteredBetterAuthOpenApiOperations(doc, authDoc, [registration()]) + + expect(Object.keys(doc.components?.schemas ?? {}).sort()).toEqual(['Child', 'Root']) + expect(doc.components?.schemas).toMatchObject({ + Root: authDoc.components.schemas.Root, + Child: authDoc.components.schemas.Child, + }) + }) + + it('fails closed when a registered source operation is missing and names its actual method', () => { + const doc: TestOpenApiDocument = { paths: {} } + const registry = [registration({ sourcePath: '/source', method: 'delete', operationId: 'deleteAuthSession' })] + + expect(() => addRegisteredBetterAuthOpenApiOperations(doc, { paths: {} }, registry)).toThrow( + 'Better Auth OpenAPI is missing DELETE /source', + ) + expect(doc).toEqual({ paths: {} }) + }) + + it('rejects duplicate source and target registrations before aggregation', () => { + const sourceDuplicate = [ + registration(), + registration({ publicPath: '/api/auth/other', operationId: 'createOther' }), + ] + const targetDuplicate = [registration(), registration({ sourcePath: '/other', operationId: 'createOther' })] + + expect(() => addRegisteredBetterAuthOpenApiOperations({ paths: {} }, { paths: {} }, sourceDuplicate)).toThrow( + 'Duplicate Better Auth OpenAPI source registration: POST /source', + ) + expect(() => addRegisteredBetterAuthOpenApiOperations({ paths: {} }, { paths: {} }, targetDuplicate)).toThrow( + 'Duplicate Better Auth OpenAPI target registration: POST /api/auth/source', + ) + }) + + it('rejects duplicate registry and existing-document operationIds', () => { + const duplicateRegistry = [registration(), registration({ sourcePath: '/other', publicPath: '/api/auth/other' })] + expect(() => addRegisteredBetterAuthOpenApiOperations({ paths: {} }, { paths: {} }, duplicateRegistry)).toThrow( + 'Duplicate Better Auth OpenAPI operationId registration: createAuthSource', + ) + + const doc = { paths: { '/api/existing': { get: { operationId: 'createAuthSource' } } } } + const authDoc = { paths: { '/source': { post: { responses: {} } } } } + expect(() => addRegisteredBetterAuthOpenApiOperations(doc, authDoc, [registration()])).toThrow( + 'OpenAPI operationId createAuthSource conflicts between GET /api/existing and POST /api/auth/source', + ) + expect(doc).toEqual({ paths: { '/api/existing': { get: { operationId: 'createAuthSource' } } } }) + }) + + it('rejects an existing target method without overwriting it', () => { + const doc = { paths: { '/api/auth/source': { post: { operationId: 'existingSource' } } } } + const authDoc = { paths: { '/source': { post: { responses: {} } } } } + + expect(() => addRegisteredBetterAuthOpenApiOperations(doc, authDoc, [registration()])).toThrow( + 'OpenAPI target already defines POST /api/auth/source', + ) + expect(doc.paths['/api/auth/source'].post).toEqual({ operationId: 'existingSource' }) + }) + + it('rejects conflicting target path parameters', () => { + const doc = { + paths: { + '/api/auth/source': { + parameters: [{ name: 'tenantId', in: 'path' }], + get: { operationId: 'getExistingSource' }, + }, + }, + } + const authDoc = { + paths: { + '/source': { + parameters: [{ name: 'sourceId', in: 'path' }], + post: { responses: {} }, + }, + }, + } + + expect(() => addRegisteredBetterAuthOpenApiOperations(doc, authDoc, [registration()])).toThrow( + 'OpenAPI path parameters conflict at /api/auth/source', + ) + }) + + it('rejects a reachable component collision', () => { + const doc = { paths: {}, components: { schemas: { Shared: { type: 'integer' } } } } + const authDoc = { + paths: { + '/source': { + post: { + responses: { + '200': { content: { 'application/json': { schema: { $ref: '#/components/schemas/Shared' } } } }, + }, + }, + }, + }, + components: { schemas: { Shared: { type: 'string' } } }, + } + + expect(() => addRegisteredBetterAuthOpenApiOperations(doc, authDoc, [registration()])).toThrow( + 'OpenAPI component collision at #/components/schemas/Shared', + ) + expect(doc.components.schemas.Shared).toEqual({ type: 'integer' }) + }) + + it.each([ + ['dangling local', '#/components/schemas/Missing', 'has a dangling reference'], + [ + 'external', + 'https://example.com/schema.json', + 'external reference https://example.com/schema.json is not allowed', + ], + ['non-component local', '#/paths/~1other', 'must target a component'], + ])('rejects %s references', (_name, reference, error) => { + const authDoc = { + paths: { + '/source': { + post: { + responses: { '200': { content: { 'application/json': { schema: { $ref: reference } } } } }, + }, + }, + }, + } + + expect(() => addRegisteredBetterAuthOpenApiOperations({ paths: {} }, authDoc, [registration()])).toThrow(error) + }) + + it('uses a registry-declared response schema override before resolving references', () => { + const doc: TestOpenApiDocument = { paths: {} } + const authDoc = { + paths: { + '/source': { + post: { + responses: { + '200': { content: { 'application/json': { schema: { $ref: '#/components/schemas/Incorrect' } } } }, + }, + }, + }, + }, + components: { schemas: { Incorrect: { type: 'object' } } }, + } + const registry = [ + registration({ + contract: { + responseSchemas: { + '200': { 'application/json': { type: 'object', required: ['access_token'] } }, + }, + }, + }), + ] + + addRegisteredBetterAuthOpenApiOperations(doc, authDoc, registry) + + expect(doc.paths['/api/auth/source']?.post?.responses?.['200']?.content?.['application/json']?.schema).toEqual({ + type: 'object', + required: ['access_token'], + }) + expect(doc.components?.schemas?.Incorrect).toBeUndefined() + }) + + it('fails closed when a declared response schema override cannot be applied', () => { + const authDoc = { paths: { '/source': { post: { responses: {} } } } } + const registry = [ + registration({ + contract: { responseSchemas: { '201': { 'application/problem+json': { type: 'object' } } } }, + }), + ] + + expect(() => addRegisteredBetterAuthOpenApiOperations({ paths: {} }, authDoc, registry)).toThrow( + 'Better Auth OpenAPI cannot apply the 201 application/problem+json response schema override for POST /source', + ) + }) +}) + +function registration( + overrides: Partial = {}, +): BetterAuthOpenApiOperationRegistration { + return { + sourcePath: '/source', + method: 'post', + publicPath: '/api/auth/source', + operationId: 'createAuthSource', + tags: ['Auth Sources'], + security: { mode: 'public' }, + ...overrides, + } +} diff --git a/server/http/better-auth-openapi.ts b/server/http/better-auth-openapi.ts new file mode 100644 index 00000000..9f917c9d --- /dev/null +++ b/server/http/better-auth-openapi.ts @@ -0,0 +1,431 @@ +type OpenApiObject = Record +type OpenApiOperation = OpenApiObject + +type OpenApiDocument = { + paths?: Record + components?: object +} + +type ZPanOpenApiDocument = OpenApiDocument & { + paths: Record +} + +export type BetterAuthOpenApiMethod = 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace' + +type OpenApiSecurityRequirement = Record + +export type BetterAuthOpenApiSecurityPolicy = + | { mode: 'public' } + | { + mode: 'requirements' + requirements: readonly OpenApiSecurityRequirement[] + } + +type BetterAuthOpenApiContractNormalization = { + responseSchemas?: Readonly>>> +} + +export type BetterAuthOpenApiOperationRegistration = { + sourcePath: string + method: BetterAuthOpenApiMethod + publicPath: string + operationId: string + tags: readonly [string, ...string[]] + security: BetterAuthOpenApiSecurityPolicy + contract?: BetterAuthOpenApiContractNormalization +} + +export const DOWNLOADER_DEVICE_FLOW_TAG = 'Downloader Device Flow' + +const deviceAccessTokenResponseSchema = { + type: 'object', + properties: { + access_token: { type: 'string' }, + token_type: { type: 'string' }, + expires_in: { type: 'integer' }, + scope: { type: 'string' }, + }, + required: ['access_token', 'token_type', 'expires_in'], +} + +// This registry is the complete Better Auth boundary of the ZPan product +// contract. Adding an entry is an explicit compatibility and authorization +// decision; unregistered Better Auth operations remain runtime-only. +export const BETTER_AUTH_OPENAPI_OPERATION_REGISTRY = [ + { + sourcePath: '/device/code', + method: 'post', + publicPath: '/api/auth/device/code', + operationId: 'createDeviceAuthorization', + tags: [DOWNLOADER_DEVICE_FLOW_TAG], + security: { mode: 'public' }, + }, + { + sourcePath: '/device/token', + method: 'post', + publicPath: '/api/auth/device/token', + operationId: 'createDeviceAccessToken', + tags: [DOWNLOADER_DEVICE_FLOW_TAG], + security: { mode: 'public' }, + contract: { + responseSchemas: { + '200': { + 'application/json': deviceAccessTokenResponseSchema, + }, + }, + }, + }, +] as const satisfies readonly BetterAuthOpenApiOperationRegistration[] + +const OPENAPI_METHODS = new Set([ + 'delete', + 'get', + 'head', + 'options', + 'patch', + 'post', + 'put', + 'trace', +]) + +export function addRegisteredBetterAuthOpenApiOperations( + doc: ZPanOpenApiDocument, + authDoc: OpenApiDocument, + registry: readonly BetterAuthOpenApiOperationRegistration[] = BETTER_AUTH_OPENAPI_OPERATION_REGISTRY, +): void { + validateRegistry(registry) + + const nextPaths = structuredClone(doc.paths) + const nextComponents = structuredClone(doc.components ?? {}) as OpenApiObject + const importedComponentRoots = new Set() + + for (const registration of registry) { + const sourcePathValue = authDoc.paths?.[registration.sourcePath] + const sourcePathItem = + sourcePathValue === undefined + ? undefined + : requireObject(sourcePathValue, `Better Auth OpenAPI path ${registration.sourcePath} is not a path item`) + const sourceOperationValue = sourcePathItem?.[registration.method] + if (!isObject(sourceOperationValue) || !sourcePathItem) { + throw new Error(`Better Auth OpenAPI is missing ${formatOperation(registration.method, registration.sourcePath)}`) + } + const sourceParameters = readPathParameters(sourcePathItem, registration) + + const operation = structuredClone(sourceOperationValue) as OpenApiOperation + applyContractNormalization(operation, registration) + operation.operationId = registration.operationId + operation.tags = [...registration.tags] + operation.security = openApiSecurity(registration.security, registration) + + importReachableComponents( + [operation, ...(sourceParameters === undefined ? [] : [sourceParameters])], + authDoc, + nextComponents, + importedComponentRoots, + registration, + ) + + const existingPathItem = nextPaths[registration.publicPath] + const targetPathItem = + existingPathItem === undefined + ? {} + : requireObject(existingPathItem, `OpenAPI target path ${registration.publicPath} is not a path item`) + + if (Object.hasOwn(targetPathItem, registration.method)) { + throw new Error(`OpenAPI target already defines ${formatOperation(registration.method, registration.publicPath)}`) + } + mergePathParameters(targetPathItem, sourceParameters, registration) + targetPathItem[registration.method] = operation + nextPaths[registration.publicPath] = targetPathItem + } + + assertUniqueOperationIds(nextPaths) + assertImportedReferencesResolve(nextPaths, nextComponents, registry, importedComponentRoots) + + doc.paths = nextPaths + doc.components = nextComponents +} + +function validateRegistry(registry: readonly BetterAuthOpenApiOperationRegistration[]): void { + const sources = new Set() + const targets = new Set() + const operationIds = new Set() + + for (const registration of registry) { + const source = `${registration.method} ${registration.sourcePath}` + if (sources.has(source)) { + throw new Error( + `Duplicate Better Auth OpenAPI source registration: ${formatOperation(registration.method, registration.sourcePath)}`, + ) + } + sources.add(source) + + const target = `${registration.method} ${registration.publicPath}` + if (targets.has(target)) { + throw new Error( + `Duplicate Better Auth OpenAPI target registration: ${formatOperation(registration.method, registration.publicPath)}`, + ) + } + targets.add(target) + + if (operationIds.has(registration.operationId)) { + throw new Error(`Duplicate Better Auth OpenAPI operationId registration: ${registration.operationId}`) + } + operationIds.add(registration.operationId) + + if (registration.tags.length === 0) { + throw new Error(`Better Auth OpenAPI registration ${registration.operationId} must declare at least one tag`) + } + if (registration.security.mode === 'requirements' && registration.security.requirements.length === 0) { + throw new Error( + `Better Auth OpenAPI registration ${registration.operationId} must use mode public for an empty security requirement`, + ) + } + } +} + +function readPathParameters( + sourcePathItem: OpenApiObject, + registration: BetterAuthOpenApiOperationRegistration, +): unknown[] | undefined { + if (!Object.hasOwn(sourcePathItem, 'parameters')) return undefined + if (!Array.isArray(sourcePathItem.parameters)) { + throw new Error( + `Better Auth OpenAPI path parameters for ${formatOperation(registration.method, registration.sourcePath)} must be an array`, + ) + } + return structuredClone(sourcePathItem.parameters) +} + +function mergePathParameters( + targetPathItem: OpenApiObject, + sourceParameters: unknown[] | undefined, + registration: BetterAuthOpenApiOperationRegistration, +): void { + const hasTargetParameters = Object.hasOwn(targetPathItem, 'parameters') + if (!hasTargetParameters && sourceParameters === undefined) return + if (!hasTargetParameters && sourceParameters !== undefined) { + targetPathItem.parameters = sourceParameters + return + } + if (sourceParameters === undefined || !jsonEqual(targetPathItem.parameters, sourceParameters)) { + throw new Error(`OpenAPI path parameters conflict at ${registration.publicPath}`) + } +} + +function applyContractNormalization( + operation: OpenApiOperation, + registration: BetterAuthOpenApiOperationRegistration, +): void { + for (const [status, mediaTypes] of Object.entries(registration.contract?.responseSchemas ?? {})) { + for (const [mediaType, schema] of Object.entries(mediaTypes)) { + const response = requireObject( + requireObject(operation.responses, missingResponseSchemaError(registration, status, mediaType))[status], + missingResponseSchemaError(registration, status, mediaType), + ) + const content = requireObject(response.content, missingResponseSchemaError(registration, status, mediaType)) + const representation = requireObject( + content[mediaType], + missingResponseSchemaError(registration, status, mediaType), + ) + representation.schema = structuredClone(schema) + } + } +} + +function missingResponseSchemaError( + registration: BetterAuthOpenApiOperationRegistration, + status: string, + mediaType: string, +): string { + return `Better Auth OpenAPI cannot apply the ${status} ${mediaType} response schema override for ${formatOperation(registration.method, registration.sourcePath)}` +} + +function openApiSecurity( + policy: BetterAuthOpenApiSecurityPolicy, + registration: BetterAuthOpenApiOperationRegistration, +): OpenApiSecurityRequirement[] { + if (policy.mode === 'public') return [] + if (policy.requirements.length === 0) { + throw new Error( + `Better Auth OpenAPI registration ${registration.operationId} must use mode public for an empty security requirement`, + ) + } + return structuredClone(policy.requirements) as OpenApiSecurityRequirement[] +} + +function importReachableComponents( + values: readonly unknown[], + authDoc: OpenApiDocument, + targetComponents: OpenApiObject, + importedComponentRoots: Set, + registration: BetterAuthOpenApiOperationRegistration, +): void { + for (const value of values) { + for (const reference of collectReferences(value)) { + const segments = parseComponentReference(reference, registration) + if (resolvePointer(authDoc, segments) === undefined) { + throw new Error( + `Better Auth OpenAPI has a dangling reference ${reference} in ${formatOperation(registration.method, registration.sourcePath)}`, + ) + } + + const [componentType, componentName] = [segments[1], segments[2]] + const rootKey = JSON.stringify([componentType, componentName]) + if (importedComponentRoots.has(rootKey)) continue + + const sourceRoot = resolvePointer(authDoc, ['components', componentType, componentName]) + if (sourceRoot === undefined) { + throw new Error( + `Better Auth OpenAPI has a dangling component reference ${reference} in ${formatOperation(registration.method, registration.sourcePath)}`, + ) + } + + const targetSection = targetComponents[componentType] + const section = + targetSection === undefined + ? {} + : requireObject(targetSection, `OpenAPI component section components.${componentType} is not an object`) + if (Object.hasOwn(section, componentName)) { + if (!jsonEqual(section[componentName], sourceRoot)) { + throw new Error(`OpenAPI component collision at #/components/${componentType}/${componentName}`) + } + } else { + section[componentName] = structuredClone(sourceRoot) + } + targetComponents[componentType] = section + importedComponentRoots.add(rootKey) + + importReachableComponents([sourceRoot], authDoc, targetComponents, importedComponentRoots, registration) + } + } +} + +function parseComponentReference(reference: string, registration: BetterAuthOpenApiOperationRegistration): string[] { + if (!reference.startsWith('#/')) { + throw new Error( + `Better Auth OpenAPI external reference ${reference} is not allowed in ${formatOperation(registration.method, registration.sourcePath)}`, + ) + } + const segments = parseJsonPointer(reference) + if (segments.length < 3 || segments[0] !== 'components') { + throw new Error( + `Better Auth OpenAPI local reference ${reference} must target a component in ${formatOperation(registration.method, registration.sourcePath)}`, + ) + } + return segments +} + +function assertImportedReferencesResolve( + paths: Record, + components: OpenApiObject, + registry: readonly BetterAuthOpenApiOperationRegistration[], + importedComponentRoots: ReadonlySet, +): void { + const document = { paths, components } + const values: unknown[] = [] + + for (const registration of registry) { + const pathItem = requireObject( + paths[registration.publicPath], + `OpenAPI target path ${registration.publicPath} is missing`, + ) + values.push(pathItem[registration.method]) + if (Object.hasOwn(pathItem, 'parameters')) values.push(pathItem.parameters) + } + for (const rootKey of importedComponentRoots) { + const [componentType, componentName] = JSON.parse(rootKey) as [string, string] + values.push(resolvePointer(document, ['components', componentType, componentName])) + } + + for (const value of values) { + for (const reference of collectReferences(value)) { + if (!reference.startsWith('#/')) { + throw new Error(`OpenAPI imported operation contains unsupported external reference ${reference}`) + } + if (resolvePointer(document, parseJsonPointer(reference)) === undefined) { + throw new Error(`OpenAPI imported operation contains dangling reference ${reference}`) + } + } + } +} + +function assertUniqueOperationIds(paths: Record): void { + const operationIds = new Map() + for (const [path, value] of Object.entries(paths)) { + if (!isObject(value)) continue + for (const [method, operation] of Object.entries(value)) { + if (!OPENAPI_METHODS.has(method as BetterAuthOpenApiMethod) || !isObject(operation)) continue + if (typeof operation.operationId !== 'string') continue + const existing = operationIds.get(operation.operationId) + const current = formatOperation(method as BetterAuthOpenApiMethod, path) + if (existing) { + throw new Error(`OpenAPI operationId ${operation.operationId} conflicts between ${existing} and ${current}`) + } + operationIds.set(operation.operationId, current) + } + } +} + +function collectReferences(value: unknown, seen = new WeakSet()): string[] { + if (!value || typeof value !== 'object') return [] + if (seen.has(value)) return [] + seen.add(value) + if (Array.isArray(value)) return value.flatMap((item) => collectReferences(item, seen)) + + const object = value as OpenApiObject + return [ + ...(typeof object.$ref === 'string' ? [object.$ref] : []), + ...Object.values(object).flatMap((item) => collectReferences(item, seen)), + ] +} + +function parseJsonPointer(reference: string): string[] { + try { + return reference + .slice(2) + .split('/') + .map((segment) => decodeURIComponent(segment).replaceAll('~1', '/').replaceAll('~0', '~')) + } catch { + throw new Error(`Invalid OpenAPI JSON reference: ${reference}`) + } +} + +function resolvePointer(value: unknown, segments: readonly string[]): unknown { + return segments.reduce((current, segment) => { + if (!isObject(current) && !Array.isArray(current)) return undefined + return (current as Record)[segment] + }, value) +} + +function requireObject(value: unknown, error: string): OpenApiObject { + if (!isObject(value)) throw new Error(error) + return value +} + +function isObject(value: unknown): value is OpenApiObject { + return !!value && typeof value === 'object' && !Array.isArray(value) +} + +function jsonEqual(left: unknown, right: unknown): boolean { + if (Object.is(left, right)) return true + if (Array.isArray(left) || Array.isArray(right)) { + return ( + Array.isArray(left) && + Array.isArray(right) && + left.length === right.length && + left.every((v, i) => jsonEqual(v, right[i])) + ) + } + if (!isObject(left) || !isObject(right)) return false + const leftKeys = Object.keys(left) + const rightKeys = Object.keys(right) + return ( + leftKeys.length === rightKeys.length && + leftKeys.every((key) => Object.hasOwn(right, key) && jsonEqual(left[key], right[key])) + ) +} + +function formatOperation(method: BetterAuthOpenApiMethod, path: string): string { + return `${method.toUpperCase()} ${path}` +} diff --git a/server/openapi.test.ts b/server/openapi.test.ts index a806a5f3..ba26cde0 100644 --- a/server/openapi.test.ts +++ b/server/openapi.test.ts @@ -19,7 +19,7 @@ describe('global OpenAPI document', () => { expect(doc.paths['/api/objects']?.get?.tags).toContain('Objects') expect(doc.paths['/api/events']?.get?.tags).toContain('Events') expect((doc.tags ?? []).map((t) => t.name)).toEqual( - expect.arrayContaining(['Objects', 'Events', 'Download Tasks', 'Downloaders']), + expect.arrayContaining(['Objects', 'Events', 'Download Tasks', 'Downloaders', 'Downloader Device Flow']), ) // Every resource already converted to `.openapi()` shows up automatically. expect(Object.keys(doc.paths)).toEqual( @@ -788,27 +788,53 @@ describe('global OpenAPI document', () => { }) }) - it("merges better-auth's auto-generated schema (incl. the device flow) into the same doc", async () => { + it('publishes only the registered Better Auth Downloader Device Flow operations', async () => { const { app } = await createTestApp({ DOWNLOAD_TOKEN_SECRET: 'test-download-token-secret' }) const res = await app.request('/api/openapi.json') const doc = (await res.json()) as { paths: Record< string, { + get?: Record post?: { + operationId?: string + tags?: string[] + security?: Record[] responses?: Record< string, - { content?: { 'application/json'?: { schema?: { properties?: Record } } } } + { + content?: { + 'application/json'?: { + schema?: { properties?: Record; required?: string[] } + } + } + } > } } > + components?: { + headers?: Record + schemas?: Record + } } - // better-auth's device-authorization endpoints come from its openAPI plugin, - // not hand-written stubs — prefixed under /api/auth. - const authPaths = Object.keys(doc.paths).filter((p) => p.startsWith('/api/auth/')) - expect(authPaths.length).toBeGreaterThan(0) - expect(authPaths.some((p) => p.includes('/device/'))).toBe(true) + + expect(Object.keys(doc.paths).filter((path) => path.startsWith('/api/auth/device/'))).toEqual([ + '/api/auth/device/code', + '/api/auth/device/token', + ]) + expect(Object.keys(doc.paths['/api/auth/device/code'] ?? {})).toEqual(['post']) + expect(Object.keys(doc.paths['/api/auth/device/token'] ?? {})).toEqual(['post']) + expect(doc.paths['/api/auth/device/code']?.post).toMatchObject({ + operationId: 'createDeviceAuthorization', + tags: ['Downloader Device Flow'], + security: [], + }) + expect(doc.paths['/api/auth/device/token']?.post).toMatchObject({ + operationId: 'createDeviceAccessToken', + tags: ['Downloader Device Flow'], + security: [], + }) expect( doc.paths['/api/auth/device/token']?.post?.responses?.['200']?.content?.['application/json']?.schema?.properties, ).toMatchObject({ @@ -817,5 +843,75 @@ describe('global OpenAPI document', () => { expires_in: { type: 'integer' }, scope: { type: 'string' }, }) + expect( + doc.paths['/api/auth/device/token']?.post?.responses?.['200']?.content?.['application/json']?.schema?.required, + ).toEqual(['access_token', 'token_type', 'expires_in']) + + expect(doc.paths['/api/auth/sign-in/email']).toBeUndefined() + expect(doc.paths['/api/auth/organization/create']).toBeUndefined() + expect(doc.paths['/api/auth/admin/list-users']).toBeUndefined() + expect(doc.paths['/api/auth/api-key/create']).toBeUndefined() + expect(doc.components?.schemas?.Session).toBeUndefined() + expect(doc.components?.schemas?.User).toBeUndefined() + // The registered Better Auth operations need no imported components after + // their declared normalization. ZPan's later framework-level response + // decoration adds only the shared RequestId header reference. + const requestIdReference = '#/components/headers/RequestId' + for (const path of ['/api/auth/device/code', '/api/auth/device/token']) { + const references = collectOpenApiReferences(doc.paths[path]) + expect(references.length).toBeGreaterThan(0) + expect([...new Set(references)]).toEqual([requestIdReference]) + for (const reference of references) { + expect(resolveLocalOpenApiReference(doc, reference)).toBe(doc.components?.headers?.RequestId) + } + } + const operationIds = Object.values(doc.paths).flatMap((path) => + Object.values(path).flatMap((operation) => + operation && typeof operation === 'object' && 'operationId' in operation ? [operation.operationId] : [], + ), + ) + expect(operationIds.filter((id) => id === 'createDeviceAuthorization')).toHaveLength(1) + expect(operationIds.filter((id) => id === 'createDeviceAccessToken')).toHaveLength(1) + }) + + it('keeps Better Auth runtime login, reference, and schema routes mounted', async () => { + const { app } = await createTestApp({ DOWNLOAD_TOKEN_SECRET: 'test-download-token-secret' }) + const [login, reference, schema] = await Promise.all([ + app.request('/api/auth/sign-in/email', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ email: 'missing@example.com', password: 'wrong-password' }), + }), + app.request('/api/auth/reference'), + app.request('/api/auth/open-api/generate-schema'), + ]) + + expect(login.status).not.toBe(404) + expect(reference.status).toBe(200) + expect(reference.headers.get('content-type')).toContain('text/html') + expect(schema.status).toBe(200) + await expect(schema.json()).resolves.toMatchObject({ paths: expect.any(Object) }) }) }) + +function collectOpenApiReferences(value: unknown): string[] { + if (Array.isArray(value)) return value.flatMap(collectOpenApiReferences) + if (!value || typeof value !== 'object') return [] + const object = value as Record + return [ + ...(typeof object.$ref === 'string' ? [object.$ref] : []), + ...Object.values(object).flatMap(collectOpenApiReferences), + ] +} + +function resolveLocalOpenApiReference(document: unknown, reference: string): unknown { + if (!reference.startsWith('#/')) return undefined + return reference + .slice(2) + .split('/') + .map((segment) => segment.replaceAll('~1', '/').replaceAll('~0', '~')) + .reduce((value, segment) => { + if (!value || typeof value !== 'object') return undefined + return (value as Record)[segment] + }, document) +}